History

counter: remove old and now unused registration API

Usage of counter_register() yields issues in device lifetime tracking. All drivers were converted to the new API, so the old one can go away.

Uwe Kleine-König committed 4 years ago

Commit f2ee4751 parent 02758cb2 files · +4 −108Browse files

Showing the changes to include (1 of 2 files). Show all

Unified · Split

include/linux/counter.h+0−12
@@ -314,8 +314,6 @@ struct counter_device { · 313 unmodified lines
314 struct counter_comp *ext;314 struct counter_comp *ext;
315 size_t num_ext;315 size_t num_ext;
316 316
317 void *priv;
318
319 struct device dev;317 struct device dev;
320 struct cdev chrdev;318 struct cdev chrdev;
321 struct list_head events_list;319 struct list_head events_list;
@@ -327,25 +325,15 @@ struct counter_device { · 5 unmodified lines
327 spinlock_t events_in_lock;325 spinlock_t events_in_lock;
328 struct mutex events_out_lock;326 struct mutex events_out_lock;
329 struct mutex ops_exist_lock;327 struct mutex ops_exist_lock;
330
331 /*
332 * This can go away once all drivers are converted to
333 * counter_alloc()/counter_add().
334 */
335 bool legacy_device;
336};328};
337 329
338void *counter_priv(const struct counter_device *const counter);330void *counter_priv(const struct counter_device *const counter);
339 331
340int counter_register(struct counter_device *const counter);
341
342struct counter_device *counter_alloc(size_t sizeof_priv);332struct counter_device *counter_alloc(size_t sizeof_priv);
343void counter_put(struct counter_device *const counter);333void counter_put(struct counter_device *const counter);
344int counter_add(struct counter_device *const counter);334int counter_add(struct counter_device *const counter);
345 335
346void counter_unregister(struct counter_device *const counter);336void counter_unregister(struct counter_device *const counter);
347int devm_counter_register(struct device *dev,
348 struct counter_device *const counter);
349struct counter_device *devm_counter_alloc(struct device *dev,337struct counter_device *devm_counter_alloc(struct device *dev,
350 size_t sizeof_priv);338 size_t sizeof_priv);
351int devm_counter_add(struct device *dev,339int devm_counter_add(struct device *dev,

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t