diff options
author | Peter Rosin <peda@axentia.se> | 2018-01-17 14:34:21 +0100 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2018-01-18 11:04:30 +0100 |
commit | 0657cb50b5a75abd92956028727dc255d690a4a6 (patch) | |
tree | 6156e6c4309303379447eb645a23d29f807e477a /drivers/pinctrl/pinctrl-sx150x.c | |
parent | 119fcf47fdb7c672e328cd3e5b6a9a42f0c5ffd1 (diff) |
pinctrl: sx150x: Unregister the pinctrl on release
There is no matching call to pinctrl_unregister, so switch to the
managed devm_pinctrl_register to clean up properly when done.
Cc: stable@vger.kernel.org
Fixes: 9e80f9064e73 ("pinctrl: Add SX150X GPIO Extender Pinctrl Driver")
Signed-off-by: Peter Rosin <peda@axentia.se>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/pinctrl-sx150x.c')
-rw-r--r-- | drivers/pinctrl/pinctrl-sx150x.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pinctrl/pinctrl-sx150x.c b/drivers/pinctrl/pinctrl-sx150x.c index fb242c542dc9..f926ba044577 100644 --- a/drivers/pinctrl/pinctrl-sx150x.c +++ b/drivers/pinctrl/pinctrl-sx150x.c @@ -1225,7 +1225,7 @@ static int sx150x_probe(struct i2c_client *client, pctl->pinctrl_desc.npins = pctl->data->npins; pctl->pinctrl_desc.owner = THIS_MODULE; - pctl->pctldev = pinctrl_register(&pctl->pinctrl_desc, dev, pctl); + pctl->pctldev = devm_pinctrl_register(dev, &pctl->pinctrl_desc, pctl); if (IS_ERR(pctl->pctldev)) { dev_err(dev, "Failed to register pinctrl device\n"); return PTR_ERR(pctl->pctldev); |