aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/pwm.h
diff options
context:
space:
mode:
authorAlexandre Courbot <acourbot@nvidia.com>2012-08-01 06:20:58 -0400
committerThierry Reding <thierry.reding@avionic-design.de>2012-09-10 11:05:45 -0400
commit6354316dbe5a13b25bea15d7ffc891be025eb267 (patch)
tree8163ca9c16c872732d37b39ca26e5cf4a686b7ea /include/linux/pwm.h
parent0aa0869c3c9b10338dd92a20fa4a9b6959f177b5 (diff)
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>
Diffstat (limited to 'include/linux/pwm.h')
-rw-r--r--include/linux/pwm.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/pwm.h b/include/linux/pwm.h
index 354764cf5f7a..40c764318957 100644
--- a/include/linux/pwm.h
+++ b/include/linux/pwm.h
@@ -148,6 +148,9 @@ struct pwm_device *pwm_request_from_chip(struct pwm_chip *chip,
148struct pwm_device *pwm_get(struct device *dev, const char *consumer); 148struct pwm_device *pwm_get(struct device *dev, const char *consumer);
149void pwm_put(struct pwm_device *pwm); 149void pwm_put(struct pwm_device *pwm);
150 150
151struct pwm_device *devm_pwm_get(struct device *dev, const char *consumer);
152void devm_pwm_put(struct device *dev, struct pwm_device *pwm);
153
151struct pwm_lookup { 154struct pwm_lookup {
152 struct list_head list; 155 struct list_head list;
153 const char *provider; 156 const char *provider;