mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thierry Reding <thierry.reding@avionic-design.de>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Laxman Dewangan <ldewangan@nvidia.com>,
	grant.likely@secretlab.ca, rob.herring@calxeda.com,
	swarren@nvidia.com, devicetree-discuss@lists.ozlabs.org,
	linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-input@vger.kernel.org, linux-tegra@vger.kernel.org
Subject: Re: [PATCH v2 2/4] input: keyboard: tegra: use devm_* for resource allocation
Date: Sun, 6 Jan 2013 20:27:39 +0100	[thread overview]
Message-ID: <20130106192739.GA11566@avionic-0098.adnet.avionic-design.de> (raw)
In-Reply-To: <20130105080658.GA1315@core.coreip.homeip.net>

[-- Attachment #1: Type: text/plain, Size: 1154 bytes --]

On Sat, Jan 05, 2013 at 12:06:58AM -0800, Dmitry Torokhov wrote:
> On Sat, Jan 05, 2013 at 01:15:08PM +0530, Laxman Dewangan wrote:
[...]
> > @@ -735,25 +738,16 @@ static int tegra_kbc_probe(struct platform_device *pdev)
> >  	spin_lock_init(&kbc->lock);
> >  	setup_timer(&kbc->timer, tegra_kbc_keypress_timer, (unsigned long)kbc);
> >  
> > -	res = request_mem_region(res->start, resource_size(res), pdev->name);
> > -	if (!res) {
> > -		dev_err(&pdev->dev, "failed to request I/O memory\n");
> > -		err = -EBUSY;
> > -		goto err_free_mem;
> > -	}
> > -
> > -	kbc->mmio = ioremap(res->start, resource_size(res));
> > +	kbc->mmio = devm_request_and_ioremap(&pdev->dev, res);
> >  	if (!kbc->mmio) {
> > -		dev_err(&pdev->dev, "failed to remap I/O memory\n");
> > -		err = -ENXIO;
> > -		goto err_free_mem_region;
> > +		dev_err(&pdev->dev, "Cannot request memregion/iomap address\n");
> > +		return -EADDRNOTAVAIL;
> 
> Erm, no, -EBUSY please.

EADDRNOTAVAIL is the canonical error for devm_request_and_ioremap()
failure. The kerneldoc comment in lib/devres.c even gives a short
example that uses this error code.

Thierry

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

  parent reply	other threads:[~2013-01-06 19:28 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-05  7:45 [PATCH V2 0/4] input: keyboard: tegra: cleanups and DT supports Laxman Dewangan
2013-01-05  7:45 ` [PATCH v2 1/4] input: keyboard: tegra: fix build warning Laxman Dewangan
2013-01-05  7:45 ` [PATCH v2 2/4] input: keyboard: tegra: use devm_* for resource allocation Laxman Dewangan
2013-01-05  8:06   ` Dmitry Torokhov
2013-01-05 11:20     ` Laxman Dewangan
2013-01-05 23:18       ` Dmitry Torokhov
2013-01-06 11:00         ` Laxman Dewangan
2013-01-06 19:27     ` Thierry Reding [this message]
2013-01-06 19:57       ` Dmitry Torokhov
2013-01-09  7:07         ` Thierry Reding
2013-01-09  9:19           ` Dmitry Torokhov
2013-01-09  9:23             ` Thierry Reding
2013-01-14 15:49               ` Thierry Reding
2013-01-14 16:16                 ` Greg Kroah-Hartman
2013-01-14 22:15                   ` Thierry Reding
2013-01-14 22:24                     ` Arnd Bergmann
2013-01-15  6:44                       ` Thierry Reding
2013-01-15 12:32                       ` Wolfram Sang
2013-01-15 13:06                 ` Wolfram Sang
2013-01-15 15:44                   ` Thierry Reding
2013-01-16  6:35                     ` Wolfram Sang
2013-02-09  9:04             ` Grant Likely
2013-01-05  7:45 ` [PATCH v2] input: keyboard: tegra: add support for rows/cols configuration from dt Laxman Dewangan
2013-01-05  7:45 ` [PATCH v2 4/4] input: keyboard: tegra: remove default key mapping Laxman Dewangan

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=20130106192739.GA11566@avionic-0098.adnet.avionic-design.de \
    --to=thierry.reding@avionic-design.de \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=grant.likely@secretlab.ca \
    --cc=ldewangan@nvidia.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=rob.herring@calxeda.com \
    --cc=swarren@nvidia.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

Powered by JetHome