Linux GPIO subsystem development
 help / color / mirror / Atom feed
From: Peter Rosin <peda@axentia.se>
To: linux-kernel@vger.kernel.org
Cc: Peter Rosin <peda@axentia.se>,
	Linus Walleij <linus.walleij@linaro.org>,
	Andrew Jeffery <andrew@aj.id.au>,
	Charles Keepax <ckeepax@opensource.cirrus.com>,
	linux-gpio@vger.kernel.org
Subject: [PATCH 1/3] pinctrl: sx150x: unregister the pinctrl on release
Date: Wed, 17 Jan 2018 14:34:21 +0100	[thread overview]
Message-ID: <20180117133423.4482-2-peda@axentia.se> (raw)
In-Reply-To: <20180117133423.4482-1-peda@axentia.se>

There is no matching call to pinctrl_unregister, so switch to the
managed devm_pinctrl_register to clean up properly when done.

Fixes: 9e80f9064e73 ("pinctrl: Add SX150X GPIO Extender Pinctrl Driver")
Signed-off-by: Peter Rosin <peda@axentia.se>
---
 drivers/pinctrl/pinctrl-sx150x.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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);
-- 
2.11.0


  reply	other threads:[~2018-01-17 13:34 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-16 21:47 [REGRESSION] mux/gpio.c is not able to get any gpio pins Peter Rosin
2018-01-16 23:18 ` Linus Walleij
2018-01-16 23:57   ` Peter Rosin
2018-01-17  9:35     ` Linus Walleij
2018-01-17 10:39       ` Peter Rosin
2018-01-17 13:27         ` Linus Walleij
2018-01-17 13:34           ` [PATCH 0/3] pinctrl: sx150x: fixes for the probe Peter Rosin
2018-01-17 13:34             ` Peter Rosin [this message]
2018-01-18  7:53               ` [PATCH 1/3] pinctrl: sx150x: unregister the pinctrl on release Linus Walleij
2018-01-17 13:34             ` [PATCH 2/3] pinctrl: sx150x: register pinctrl before adding the gpiochip Peter Rosin
2018-01-17 13:34             ` [PATCH 3/3] pinctrl: sx150x: add a static gpio/pinctrl pin range mapping Peter Rosin
2018-01-17 15:05               ` Andrew Jeffery
2018-01-17 15:27                 ` Peter Rosin
2018-01-18  7:58               ` Linus Walleij
2018-01-18  8:19                 ` Peter Rosin
2018-01-18 10:03                   ` Linus Walleij

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180117133423.4482-2-peda@axentia.se \
    --to=peda@axentia.se \
    --cc=andrew@aj.id.au \
    --cc=ckeepax@opensource.cirrus.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox