public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Thierry Reding <thierry.reding@avionic-design.de>
Cc: Dong Aisheng <b29396@freescale.com>,
	Alexander Shiyan <shc_work@mail.ru>,
	linux-kernel@vger.kernel.org,
	Dong Aisheng <dong.aisheng@linaro.org>,
	Samuel Ortiz <sameo@linux.intel.com>,
	Mark Brown <broonie@opensource.wolfsonmicro.com>,
	gregkh@linuxfoundation.org
Subject: Re: [PATCH v4] mfd: syscon: Add non-DT support
Date: Fri, 22 Feb 2013 09:11:53 +0000	[thread overview]
Message-ID: <201302220911.53537.arnd@arndb.de> (raw)
In-Reply-To: <20130222072718.GA24114@avionic-0098.mockup.avionic-design.de>

On Friday 22 February 2013, Thierry Reding wrote:
> On Fri, Feb 22, 2013 at 03:13:12PM +0800, Dong Aisheng wrote:
> > On Fri, Feb 22, 2013 at 11:01:18AM +0400, Alexander Shiyan wrote:
> > > > On Thu, Feb 21, 2013 at 07:29:02PM +0400, Alexander Shiyan wrote:
> > > > > This patch allow using syscon driver from the platform data, i.e.
> > > > > possibility using driver on systems without oftree support.
> > > > > For search syscon device from the client drivers,
> > > > > "syscon_regmap_lookup_by_pdevname" function was added.
> > > > > 
> > > > > Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
> > > > 
> > > > [...]
> > > > 
> > > > > +       syscon->base = devm_ioremap_resource(dev, res);
> > > > > +       if (!syscon->base)
> > > > 
> > > > Is this correct?
> > > 
> > > Hmm, of course IS_ERR should be used here...
> > > v5?
> > > 
> > 
> > Yes.
> > >From here:
> > https://lkml.org/lkml/2013/1/21/140
> > It seems it is.
> 
> Yes, devm_ioremap_resource() never returns NULL. You always need to
> check the returned pointer with IS_ERR(). The value that you return
> should be extracted from the pointer with PTR_ERR().
> 

Well, devm_ioremap_resource also tries to request the resource, which
as someone (Dong or Shawn?) pointed out, we should not do for the imx6q
case. I think this has to be reverted to platform_get_resource
and dev_ioremap.

	Arnd

  parent reply	other threads:[~2013-02-22  9:12 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-21 15:29 [PATCH v4] mfd: syscon: Add non-DT support Alexander Shiyan
2013-02-21 16:18 ` [PATCH v4] mfd: syscon: Add non-DT suppor Arnd Bergmann
2013-02-22  6:55 ` [PATCH v4] mfd: syscon: Add non-DT support Dong Aisheng
2013-02-22  7:01   ` Re[2]: " Alexander Shiyan
2013-02-22  7:13     ` Dong Aisheng
2013-02-22  7:27       ` Thierry Reding
2013-02-22  8:29         ` Dong Aisheng
2013-02-22  8:52           ` Thierry Reding
2013-02-22  9:20             ` Dong Aisheng
2013-02-22  9:24               ` Thierry Reding
2013-02-22  9:31                 ` Dong Aisheng
2013-02-23  5:10             ` Re[2]: " Alexander Shiyan
2013-02-22  9:11         ` Arnd Bergmann [this message]
2013-02-22  9:19           ` Dong Aisheng

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=201302220911.53537.arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=b29396@freescale.com \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=dong.aisheng@linaro.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sameo@linux.intel.com \
    --cc=shc_work@mail.ru \
    --cc=thierry.reding@avionic-design.de \
    /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