mirror of
https://github.com/lkl/linux.git
synced 2025-12-19 16:13:19 +09:00
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. Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Acked-by: William Breathitt Gray <vilhelm.gray@gmail.com> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Link: https://lore.kernel.org/r/20211230150300.72196-24-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
02758cb20d
commit
f2ee4759fb
@@ -314,8 +314,6 @@ struct counter_device {
|
||||
struct counter_comp *ext;
|
||||
size_t num_ext;
|
||||
|
||||
void *priv;
|
||||
|
||||
struct device dev;
|
||||
struct cdev chrdev;
|
||||
struct list_head events_list;
|
||||
@@ -327,25 +325,15 @@ struct counter_device {
|
||||
spinlock_t events_in_lock;
|
||||
struct mutex events_out_lock;
|
||||
struct mutex ops_exist_lock;
|
||||
|
||||
/*
|
||||
* This can go away once all drivers are converted to
|
||||
* counter_alloc()/counter_add().
|
||||
*/
|
||||
bool legacy_device;
|
||||
};
|
||||
|
||||
void *counter_priv(const struct counter_device *const counter);
|
||||
|
||||
int counter_register(struct counter_device *const counter);
|
||||
|
||||
struct counter_device *counter_alloc(size_t sizeof_priv);
|
||||
void counter_put(struct counter_device *const counter);
|
||||
int counter_add(struct counter_device *const counter);
|
||||
|
||||
void counter_unregister(struct counter_device *const counter);
|
||||
int devm_counter_register(struct device *dev,
|
||||
struct counter_device *const counter);
|
||||
struct counter_device *devm_counter_alloc(struct device *dev,
|
||||
size_t sizeof_priv);
|
||||
int devm_counter_add(struct device *dev,
|
||||
|
||||
Reference in New Issue
Block a user