From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-pf0-x242.google.com ([2607:f8b0:400e:c00::242]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cljmG-0006e2-1P for barebox@lists.infradead.org; Wed, 08 Mar 2017 22:09:53 +0000 Received: by mail-pf0-x242.google.com with SMTP id v190so5076382pfb.0 for ; Wed, 08 Mar 2017 14:09:27 -0800 (PST) From: Andrey Smirnov Date: Wed, 8 Mar 2017 14:08:52 -0800 Message-Id: <20170308220909.4560-4-andrew.smirnov@gmail.com> In-Reply-To: <20170308220909.4560-1-andrew.smirnov@gmail.com> References: <20170308220909.4560-1-andrew.smirnov@gmail.com> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH 03/20] pinctrl: at91: Fix a bug in at91_pinctrl_set_conf() To: barebox@lists.infradead.org Cc: Andrey Smirnov Pin_to_controller returns struct at91_gpio_chip, whereas at91_mux_* functions expect void __iomem * pointing to controller register window. Fix the code to do appropriate conversion between the two. Signed-off-by: Andrey Smirnov --- drivers/pinctrl/pinctrl-at91.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/pinctrl/pinctrl-at91.c b/drivers/pinctrl/pinctrl-at91.c index ebbc6f6..e24c9be 100644 --- a/drivers/pinctrl/pinctrl-at91.c +++ b/drivers/pinctrl/pinctrl-at91.c @@ -414,8 +414,10 @@ static int at91_pinctrl_set_conf(struct at91_pinctrl *info, unsigned int pin_num { unsigned int mask; void __iomem *pio; + struct at91_gpio_chip *at91_gpio; - pio = pin_to_controller(pin_num); + at91_gpio = pin_to_controller(pin_num); + pio = at91_gpio->regbase; mask = pin_to_mask(pin_num); if (conf & PULL_UP && conf & PULL_DOWN) -- 2.9.3 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox