diff options
author | Laxman Dewangan <ldewangan@nvidia.com> | 2016-02-24 14:12:59 +0530 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2016-04-21 00:01:21 +0200 |
commit | 80e0f8d94d3090f0f7bf3faf3e6180e920ee0d22 (patch) | |
tree | 3f35ef471617c2575c635ef226ed418f319fb15c /include/linux/pinctrl | |
parent | 1417b35e29367b3ea73f80c564e4ce7a9a09b729 (diff) | |
download | linux-stable-80e0f8d94d3090f0f7bf3faf3e6180e920ee0d22.tar.gz linux-stable-80e0f8d94d3090f0f7bf3faf3e6180e920ee0d22.tar.bz2 linux-stable-80e0f8d94d3090f0f7bf3faf3e6180e920ee0d22.zip |
pinctrl: Add devm_ apis for pinctrl_{register, unregister}
Add device managed APIs devm_pinctrl_register() and
devm_pinctrl_unregister() for the APIs pinctrl_register()
and pinctrl_unregister().
This helps in reducing code in error path and sometimes
removal of .remove callback for driver unbind.
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Acked-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'include/linux/pinctrl')
-rw-r--r-- | include/linux/pinctrl/pinctrl.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/pinctrl/pinctrl.h b/include/linux/pinctrl/pinctrl.h index 9ba59fcba549..a42e57da270d 100644 --- a/include/linux/pinctrl/pinctrl.h +++ b/include/linux/pinctrl/pinctrl.h @@ -144,6 +144,12 @@ struct pinctrl_desc { extern struct pinctrl_dev *pinctrl_register(struct pinctrl_desc *pctldesc, struct device *dev, void *driver_data); extern void pinctrl_unregister(struct pinctrl_dev *pctldev); +extern struct pinctrl_dev *devm_pinctrl_register(struct device *dev, + struct pinctrl_desc *pctldesc, + void *driver_data); +extern void devm_pinctrl_unregister(struct device *dev, + struct pinctrl_dev *pctldev); + extern bool pin_is_valid(struct pinctrl_dev *pctldev, int pin); extern void pinctrl_add_gpio_range(struct pinctrl_dev *pctldev, struct pinctrl_gpio_range *range); |