mirror of
git://git.yoctoproject.org/linux-yocto.git
synced 2025-10-23 07:23:12 +02:00
pwm: core: Get rid of unused devm_of_pwm_get()
The devm_of_pwm_get() has recently lost its single user, drop the dead API as well. Note, the new code should use either plain pwm_get() or managed devm_pwm_get() or devm_fwnode_pwm_get() APIs. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Link: https://lore.kernel.org/r/20220826172642.16404-2-andriy.shevchenko@linux.intel.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
This commit is contained in:
parent
2e2aa25cf5
commit
b88c48bfdd
|
@ -401,7 +401,6 @@ POWER
|
||||||
|
|
||||||
PWM
|
PWM
|
||||||
devm_pwm_get()
|
devm_pwm_get()
|
||||||
devm_of_pwm_get()
|
|
||||||
devm_fwnode_pwm_get()
|
devm_fwnode_pwm_get()
|
||||||
|
|
||||||
REGULATOR
|
REGULATOR
|
||||||
|
|
|
@ -40,8 +40,7 @@ after usage with pwm_free().
|
||||||
|
|
||||||
New users should use the pwm_get() function and pass to it the consumer
|
New users should use the pwm_get() function and pass to it the consumer
|
||||||
device or a consumer name. pwm_put() is used to free the PWM device. Managed
|
device or a consumer name. pwm_put() is used to free the PWM device. Managed
|
||||||
variants of the getter, devm_pwm_get(), devm_of_pwm_get(),
|
variants of the getter, devm_pwm_get() and devm_fwnode_pwm_get(), also exist.
|
||||||
devm_fwnode_pwm_get(), also exist.
|
|
||||||
|
|
||||||
After being requested, a PWM has to be configured using::
|
After being requested, a PWM has to be configured using::
|
||||||
|
|
||||||
|
|
|
@ -1070,36 +1070,6 @@ struct pwm_device *devm_pwm_get(struct device *dev, const char *con_id)
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(devm_pwm_get);
|
EXPORT_SYMBOL_GPL(devm_pwm_get);
|
||||||
|
|
||||||
/**
|
|
||||||
* devm_of_pwm_get() - resource managed of_pwm_get()
|
|
||||||
* @dev: device for PWM consumer
|
|
||||||
* @np: device node to get the PWM from
|
|
||||||
* @con_id: consumer name
|
|
||||||
*
|
|
||||||
* This function performs like of_pwm_get() but the acquired PWM device will
|
|
||||||
* automatically be released on driver detach.
|
|
||||||
*
|
|
||||||
* Returns: A pointer to the requested PWM device or an ERR_PTR()-encoded
|
|
||||||
* error code on failure.
|
|
||||||
*/
|
|
||||||
struct pwm_device *devm_of_pwm_get(struct device *dev, struct device_node *np,
|
|
||||||
const char *con_id)
|
|
||||||
{
|
|
||||||
struct pwm_device *pwm;
|
|
||||||
int ret;
|
|
||||||
|
|
||||||
pwm = of_pwm_get(dev, np, con_id);
|
|
||||||
if (IS_ERR(pwm))
|
|
||||||
return pwm;
|
|
||||||
|
|
||||||
ret = devm_add_action_or_reset(dev, devm_pwm_release, pwm);
|
|
||||||
if (ret)
|
|
||||||
return ERR_PTR(ret);
|
|
||||||
|
|
||||||
return pwm;
|
|
||||||
}
|
|
||||||
EXPORT_SYMBOL_GPL(devm_of_pwm_get);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* devm_fwnode_pwm_get() - request a resource managed PWM from firmware node
|
* devm_fwnode_pwm_get() - request a resource managed PWM from firmware node
|
||||||
* @dev: device for PWM consumer
|
* @dev: device for PWM consumer
|
||||||
|
|
|
@ -408,8 +408,6 @@ struct pwm_device *of_pwm_get(struct device *dev, struct device_node *np,
|
||||||
void pwm_put(struct pwm_device *pwm);
|
void pwm_put(struct pwm_device *pwm);
|
||||||
|
|
||||||
struct pwm_device *devm_pwm_get(struct device *dev, const char *con_id);
|
struct pwm_device *devm_pwm_get(struct device *dev, const char *con_id);
|
||||||
struct pwm_device *devm_of_pwm_get(struct device *dev, struct device_node *np,
|
|
||||||
const char *con_id);
|
|
||||||
struct pwm_device *devm_fwnode_pwm_get(struct device *dev,
|
struct pwm_device *devm_fwnode_pwm_get(struct device *dev,
|
||||||
struct fwnode_handle *fwnode,
|
struct fwnode_handle *fwnode,
|
||||||
const char *con_id);
|
const char *con_id);
|
||||||
|
@ -517,14 +515,6 @@ static inline struct pwm_device *devm_pwm_get(struct device *dev,
|
||||||
return ERR_PTR(-ENODEV);
|
return ERR_PTR(-ENODEV);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline struct pwm_device *devm_of_pwm_get(struct device *dev,
|
|
||||||
struct device_node *np,
|
|
||||||
const char *con_id)
|
|
||||||
{
|
|
||||||
might_sleep();
|
|
||||||
return ERR_PTR(-ENODEV);
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline struct pwm_device *
|
static inline struct pwm_device *
|
||||||
devm_fwnode_pwm_get(struct device *dev, struct fwnode_handle *fwnode,
|
devm_fwnode_pwm_get(struct device *dev, struct fwnode_handle *fwnode,
|
||||||
const char *con_id)
|
const char *con_id)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user