mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Antony Pavlov <antonynpavlov@gmail.com>
To: barebox@lists.infradead.org
Subject: [PATCH v2 1/2] gpio: gpio-generic: fix bgpio_map()
Date: Thu,  7 Sep 2017 12:34:37 +0300	[thread overview]
Message-ID: <20170907093438.30895-2-antonynpavlov@gmail.com> (raw)
In-Reply-To: <20170907093438.30895-1-antonynpavlov@gmail.com>

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
---
 drivers/gpio/gpio-generic.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpio/gpio-generic.c b/drivers/gpio/gpio-generic.c
index c6202fc651..01a66d6645 100644
--- a/drivers/gpio/gpio-generic.c
+++ b/drivers/gpio/gpio-generic.c
@@ -308,7 +308,7 @@ static void __iomem *bgpio_map(struct device_d *dev, const char *name,
 			       resource_size_t sane_sz, int *err)
 {
 	struct resource *r;
-	void __iomem *ret;
+	struct resource *ret;
 
 	*err = 0;
 
@@ -327,7 +327,7 @@ static void __iomem *bgpio_map(struct device_d *dev, const char *name,
 		return NULL;
 	}
 
-	return ret;
+	return IOMEM(ret->start);
 }
 
 static int bgpio_dev_probe(struct device_d *dev)
-- 
2.14.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2017-09-07  9:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-07  9:34 [PATCH v2 0/2] gpio: gpio-generic: add dt support Antony Pavlov
2017-09-07  9:34 ` Antony Pavlov [this message]
2017-09-07  9:34 ` [PATCH v2 2/2] " Antony Pavlov
2017-09-08  6:27 ` [PATCH v2 0/2] " Sascha Hauer

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=20170907093438.30895-2-antonynpavlov@gmail.com \
    --to=antonynpavlov@gmail.com \
    --cc=barebox@lists.infradead.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