mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 23:32:14 +00:00
pwm: add devm_pwm_get() and devm_pwm_put()
Add resource managed variants of pwm_get() and pwm_put() for convenience. Code is largely inspired by the equivalent devm functions of the regulator framework. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
This commit is contained in:
parent
0aa0869c3c
commit
6354316dbe
4 changed files with 67 additions and 1 deletions
|
@ -148,6 +148,9 @@ struct pwm_device *pwm_request_from_chip(struct pwm_chip *chip,
|
|||
struct pwm_device *pwm_get(struct device *dev, const char *consumer);
|
||||
void pwm_put(struct pwm_device *pwm);
|
||||
|
||||
struct pwm_device *devm_pwm_get(struct device *dev, const char *consumer);
|
||||
void devm_pwm_put(struct device *dev, struct pwm_device *pwm);
|
||||
|
||||
struct pwm_lookup {
|
||||
struct list_head list;
|
||||
const char *provider;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue