From: Marc Kleine-Budde <mkl@pengutronix.de>
To: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 1/7] generic_memmap_ro/rw: switch to resource
Date: Fri, 29 Jul 2011 12:22:08 +0200 [thread overview]
Message-ID: <4E3289D0.6010706@pengutronix.de> (raw)
In-Reply-To: <1311918777-26719-1-git-send-email-plagnioj@jcrosoft.com>
[-- Attachment #1.1: Type: text/plain, Size: 1235 bytes --]
On 07/29/2011 07:52 AM, Jean-Christophe PLAGNIOL-VILLARD wrote:
> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
> ---
> drivers/base/driver.c | 5 +++--
> 1 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/base/driver.c b/drivers/base/driver.c
> index b5166c8..3efb538 100644
> --- a/drivers/base/driver.c
> +++ b/drivers/base/driver.c
> @@ -263,7 +263,7 @@ int generic_memmap_ro(struct cdev *cdev, void **map, int flags)
>
> if (flags & PROT_WRITE)
> return -EACCES;
> - *map = (void *)cdev->dev->map_base;
> + *map = dev_get_mem_region(cdev->dev, 0);
> return 0;
> }
>
> @@ -272,7 +272,8 @@ int generic_memmap_rw(struct cdev *cdev, void **map, int flags)
> if (!cdev->dev)
> return -EINVAL;
>
> - *map = (void *)cdev->dev->map_base;
> + *map = dev_get_mem_region(cdev->dev, 0);
> + return 0;
> return 0;
one return should be enough
> }
>
Marc
--
Pengutronix e.K. | Marc Kleine-Budde |
Industrial Linux Solutions | Phone: +49-231-2826-924 |
Vertretung West/Dortmund | Fax: +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de |
[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]
[-- Attachment #2: Type: text/plain, Size: 149 bytes --]
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2011-07-29 10:22 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-29 5:52 Jean-Christophe PLAGNIOL-VILLARD
2011-07-29 5:52 ` [PATCH 2/7] devinfo: " Jean-Christophe PLAGNIOL-VILLARD
2011-07-29 5:52 ` [PATCH 3/7] dm9000: replace DM9000_WIDTH_8/16/32 by IORESOURCE_MEM_8/16/32BIT Jean-Christophe PLAGNIOL-VILLARD
2011-07-29 5:52 ` [PATCH 4/7] dm9000: introduce add_dm9000_device to register dm9000 device Jean-Christophe PLAGNIOL-VILLARD
2011-07-29 5:52 ` [PATCH 5/7] resource: introduce add_usb_ehci_device to register echi device Jean-Christophe PLAGNIOL-VILLARD
2011-07-29 9:52 ` Sascha Hauer
2011-07-29 12:17 ` Jean-Christophe PLAGNIOL-VILLARD
2011-07-29 5:52 ` [PATCH 6/7] omap: switch to add_generic_device Jean-Christophe PLAGNIOL-VILLARD
2011-07-29 7:07 ` Franck JULLIEN
2011-07-29 13:36 ` Jean-Christophe PLAGNIOL-VILLARD
2011-07-29 5:52 ` [PATCH 7/7] fb: switch to "struct resource" Jean-Christophe PLAGNIOL-VILLARD
2011-07-29 10:22 ` Marc Kleine-Budde [this message]
2011-07-29 10:57 ` [PATCH 1/7] generic_memmap_ro/rw: switch to resource Sascha Hauer
2011-07-29 13:40 ` Jean-Christophe PLAGNIOL-VILLARD
2011-07-29 15:53 [PULL] final switch to resoruce Jean-Christophe PLAGNIOL-VILLARD
2011-07-29 15:59 ` [PATCH 1/7] generic_memmap_ro/rw: switch to resource Jean-Christophe PLAGNIOL-VILLARD
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=4E3289D0.6010706@pengutronix.de \
--to=mkl@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=plagnioj@jcrosoft.com \
/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