From: Thierry Reding <thierry.reding@gmail.com>
To: Jingoo Han <jg1.han@samsung.com>
Cc: 'Russell King' <rmk+kernel@arm.linux.org.uk>,
dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] DRM: Armada: Use devm_ioremap_resource()
Date: Mon, 7 Apr 2014 12:53:18 +0200 [thread overview]
Message-ID: <20140407105316.GF25718@ulmo> (raw)
In-Reply-To: <001e01cf4ed3$ff410170$fdc30450$%han@samsung.com>
[-- Attachment #1.1: Type: text/plain, Size: 1082 bytes --]
On Thu, Apr 03, 2014 at 09:31:04AM +0900, Jingoo Han wrote:
> Use devm_ioremap_resource() because devm_request_and_ioremap() is
> obsoleted by devm_ioremap_resource().
>
> Signed-off-by: Jingoo Han <jg1.han@samsung.com>
> ---
> drivers/gpu/drm/armada/armada_crtc.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/armada/armada_crtc.c b/drivers/gpu/drm/armada/armada_crtc.c
> index d8e3982..23b0123 100644
> --- a/drivers/gpu/drm/armada/armada_crtc.c
> +++ b/drivers/gpu/drm/armada/armada_crtc.c
> @@ -1037,10 +1037,10 @@ int armada_drm_crtc_create(struct drm_device *dev, unsigned num,
> if (ret)
> return ret;
>
> - base = devm_request_and_ioremap(dev->dev, res);
> - if (!base) {
> + base = devm_ioremap_resource(dev->dev, res);
> + if (IS_ERR(base)) {
> DRM_ERROR("failed to ioremap register\n");
> - return -ENOMEM;
> + return PTR_ERR(base);
While at it, perhaps you should drop the error message too because
devm_ioremap_resource() already prints one in all failure cases.
Thierry
[-- Attachment #1.2: Type: application/pgp-signature, Size: 836 bytes --]
[-- Attachment #2: Type: text/plain, Size: 159 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2014-04-07 10:54 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-03 0:31 [PATCH] DRM: Armada: Use devm_ioremap_resource() Jingoo Han
2014-04-07 10:53 ` Thierry Reding [this message]
2014-04-08 4:38 ` Jingoo Han
2014-04-08 4:55 ` [PATCH V2] " Jingoo Han
-- strict thread matches above, loose matches on Subject: below --
2014-02-10 21:57 [PATCH] drm: armada: " Fabio Estevam
2014-02-24 13:56 ` Fabio Estevam
2014-02-24 14:05 ` Russell King - ARM Linux
2014-02-24 14:16 ` Fabio Estevam
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=20140407105316.GF25718@ulmo \
--to=thierry.reding@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=jg1.han@samsung.com \
--cc=rmk+kernel@arm.linux.org.uk \
/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