From: Tomi Valkeinen <tomi.valkeinen@ti.com>
To: Ricardo Neri <ricardo.neri@ti.com>
Cc: s-guiriec@ti.com, peter.ujfalusi@ti.com, b-cousson@ti.com,
linux-omap@vger.kernel.org
Subject: Re: [PATCH 2/6] OMAPDSS: Convert to devm_ioremap
Date: Mon, 22 Oct 2012 10:22:41 +0300 [thread overview]
Message-ID: <5084F441.4060502@ti.com> (raw)
In-Reply-To: <1350350839-30408-3-git-send-email-ricardo.neri@ti.com>
[-- Attachment #1: Type: text/plain, Size: 1056 bytes --]
On 2012-10-16 04:27, Ricardo Neri wrote:
> Using devm_ioremap provides better memory handling and improves
> readability.
>
> Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
> ---
> drivers/video/omap2/dss/hdmi.c | 11 +++++++----
> 1 files changed, 7 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/video/omap2/dss/hdmi.c b/drivers/video/omap2/dss/hdmi.c
> index 2cba177..6773e2c 100644
> --- a/drivers/video/omap2/dss/hdmi.c
> +++ b/drivers/video/omap2/dss/hdmi.c
> @@ -1010,8 +1010,13 @@ static int __init omapdss_hdmihw_probe(struct platform_device *pdev)
> return -EINVAL;
> }
>
> + if (!devm_request_mem_region(&pdev->dev, res->start,
> + resource_size(res), "HDMI"))
> + return -EBUSY;
> +
> /* Base address taken from platform */
> - hdmi.ip_data.base_wp = ioremap(res->start, resource_size(res));
> + hdmi.ip_data.base_wp = devm_ioremap(&pdev->dev, res->start,
> + resource_size(res));
I think you can use devm_request_and_ioremap() here to simplify it even
more.
Tomi
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 897 bytes --]
next prev parent reply other threads:[~2012-10-22 7:22 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-16 1:27 [PATCH 0/6] Create platform device for audio support Ricardo Neri
2012-10-16 1:27 ` [PATCH 1/6] OMAPDSS: HDMI: Rename resource variable at probe Ricardo Neri
2012-10-16 1:27 ` [PATCH 2/6] OMAPDSS: Convert to devm_ioremap Ricardo Neri
2012-10-22 7:22 ` Tomi Valkeinen [this message]
2012-10-22 22:59 ` Ricardo Neri
2012-10-16 1:27 ` [PATCH 3/6] OMAPDSS: HDMI: Make panel return error if cannot register driver Ricardo Neri
2012-10-16 1:27 ` [PATCH 4/6] OMAPDSS: HDMI: Uninit display if unable to register device Ricardo Neri
2012-10-16 1:27 ` [PATCH 5/6] OMAPDSS: HDMI: Handle error when initing the display at probe Ricardo Neri
2012-10-16 1:27 ` [PATCH 6/6] OMAPDSS: HDMI: Create platform device to support audio Ricardo Neri
2012-10-16 9:30 ` Péter Ujfalusi
2012-10-16 11:11 ` Ricardo Neri
2012-10-22 7:40 ` Tomi Valkeinen
2012-10-23 0:48 ` Ricardo Neri
2012-10-23 9:37 ` Tomi Valkeinen
2012-10-23 15:42 ` Ricardo Neri
2012-10-23 16:17 ` Tomi Valkeinen
2012-10-23 17:21 ` Ricardo Neri
2012-10-24 4:29 ` Tomi Valkeinen
2012-10-25 14:31 ` Ricardo Neri
2012-10-25 14:54 ` Tomi Valkeinen
2012-10-26 0:46 ` Ricardo Neri
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=5084F441.4060502@ti.com \
--to=tomi.valkeinen@ti.com \
--cc=b-cousson@ti.com \
--cc=linux-omap@vger.kernel.org \
--cc=peter.ujfalusi@ti.com \
--cc=ricardo.neri@ti.com \
--cc=s-guiriec@ti.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.