Message ID | 20241022003157.303127-1-linux@treblig.org (mailing list archive) |
---|---|
State | New |
Delegated to: | Chanwoo Choi |
Headers | show |
Series | PM / devfreq: Remove unused devfreq_event_reset_event | expand |
* linux@treblig.org (linux@treblig.org) wrote: > From: "Dr. David Alan Gilbert" <linux@treblig.org> > > devfreq_event_reset_event() was added in 2015 by > commit f262f28c1470 ("PM / devfreq: event: Add devfreq_event class") > > but has remained unused. > > Remove it. > > Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Ping. Thanks, Dave > --- > drivers/devfreq/devfreq-event.c | 26 -------------------------- > include/linux/devfreq-event.h | 6 ------ > 2 files changed, 32 deletions(-) > > diff --git a/drivers/devfreq/devfreq-event.c b/drivers/devfreq/devfreq-event.c > index 3ebac2496679..a60703374006 100644 > --- a/drivers/devfreq/devfreq-event.c > +++ b/drivers/devfreq/devfreq-event.c > @@ -183,32 +183,6 @@ int devfreq_event_get_event(struct devfreq_event_dev *edev, > } > EXPORT_SYMBOL_GPL(devfreq_event_get_event); > > -/** > - * devfreq_event_reset_event() - Reset all opeations of devfreq-event dev. > - * @edev : the devfreq-event device > - * > - * Note that this function stop all operations of devfreq-event dev and reset > - * the current event data to make the devfreq-event device into initial state. > - */ > -int devfreq_event_reset_event(struct devfreq_event_dev *edev) > -{ > - int ret = 0; > - > - if (!edev || !edev->desc) > - return -EINVAL; > - > - if (!devfreq_event_is_enabled(edev)) > - return -EPERM; > - > - mutex_lock(&edev->lock); > - if (edev->desc->ops && edev->desc->ops->reset) > - ret = edev->desc->ops->reset(edev); > - mutex_unlock(&edev->lock); > - > - return ret; > -} > -EXPORT_SYMBOL_GPL(devfreq_event_reset_event); > - > /** > * devfreq_event_get_edev_by_phandle() - Get the devfreq-event dev from > * devicetree. > diff --git a/include/linux/devfreq-event.h b/include/linux/devfreq-event.h > index 4a50a5c71a5f..461080280de9 100644 > --- a/include/linux/devfreq-event.h > +++ b/include/linux/devfreq-event.h > @@ -104,7 +104,6 @@ extern bool devfreq_event_is_enabled(struct devfreq_event_dev *edev); > extern int devfreq_event_set_event(struct devfreq_event_dev *edev); > extern int devfreq_event_get_event(struct devfreq_event_dev *edev, > struct devfreq_event_data *edata); > -extern int devfreq_event_reset_event(struct devfreq_event_dev *edev); > extern struct devfreq_event_dev *devfreq_event_get_edev_by_phandle( > struct device *dev, > const char *phandle_name, > @@ -149,11 +148,6 @@ static inline int devfreq_event_get_event(struct devfreq_event_dev *edev, > return -EINVAL; > } > > -static inline int devfreq_event_reset_event(struct devfreq_event_dev *edev) > -{ > - return -EINVAL; > -} > - > static inline struct devfreq_event_dev *devfreq_event_get_edev_by_phandle( > struct device *dev, > const char *phandle_name, > -- > 2.47.0 >
diff --git a/drivers/devfreq/devfreq-event.c b/drivers/devfreq/devfreq-event.c index 3ebac2496679..a60703374006 100644 --- a/drivers/devfreq/devfreq-event.c +++ b/drivers/devfreq/devfreq-event.c @@ -183,32 +183,6 @@ int devfreq_event_get_event(struct devfreq_event_dev *edev, } EXPORT_SYMBOL_GPL(devfreq_event_get_event); -/** - * devfreq_event_reset_event() - Reset all opeations of devfreq-event dev. - * @edev : the devfreq-event device - * - * Note that this function stop all operations of devfreq-event dev and reset - * the current event data to make the devfreq-event device into initial state. - */ -int devfreq_event_reset_event(struct devfreq_event_dev *edev) -{ - int ret = 0; - - if (!edev || !edev->desc) - return -EINVAL; - - if (!devfreq_event_is_enabled(edev)) - return -EPERM; - - mutex_lock(&edev->lock); - if (edev->desc->ops && edev->desc->ops->reset) - ret = edev->desc->ops->reset(edev); - mutex_unlock(&edev->lock); - - return ret; -} -EXPORT_SYMBOL_GPL(devfreq_event_reset_event); - /** * devfreq_event_get_edev_by_phandle() - Get the devfreq-event dev from * devicetree. diff --git a/include/linux/devfreq-event.h b/include/linux/devfreq-event.h index 4a50a5c71a5f..461080280de9 100644 --- a/include/linux/devfreq-event.h +++ b/include/linux/devfreq-event.h @@ -104,7 +104,6 @@ extern bool devfreq_event_is_enabled(struct devfreq_event_dev *edev); extern int devfreq_event_set_event(struct devfreq_event_dev *edev); extern int devfreq_event_get_event(struct devfreq_event_dev *edev, struct devfreq_event_data *edata); -extern int devfreq_event_reset_event(struct devfreq_event_dev *edev); extern struct devfreq_event_dev *devfreq_event_get_edev_by_phandle( struct device *dev, const char *phandle_name, @@ -149,11 +148,6 @@ static inline int devfreq_event_get_event(struct devfreq_event_dev *edev, return -EINVAL; } -static inline int devfreq_event_reset_event(struct devfreq_event_dev *edev) -{ - return -EINVAL; -} - static inline struct devfreq_event_dev *devfreq_event_get_edev_by_phandle( struct device *dev, const char *phandle_name,