From: Arnd Bergmann <arnd@arndb.de>
To: Dong Aisheng <b29396@freescale.com>
Cc: 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>,
Thierry Reding <thierry.reding@avionic-design.de>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
Dmitry Torokhov <dmitry.torokhov@gmail.com>,
Stephen Warren <swarren@wwwdotorg.org>
Subject: Re: [PATCH v6 2/2] mfd: syscon: Add non-DT support
Date: Mon, 11 Mar 2013 13:38:56 +0000 [thread overview]
Message-ID: <201303111338.56679.arnd@arndb.de> (raw)
In-Reply-To: <20130311103541.GC6280@b29396-Latitude-E6410>
On Monday 11 March 2013, Dong Aisheng wrote:
> > > > + dev = driver_find_device(&syscon_driver.driver, NULL, (void *)s,
> > > > + syscon_match_pdevname);
> > > > + if (!dev)
> > > > + return ERR_PTR(-ENODEV);
> > >
> > > Should it be ERR_PTR(-EPROBE_DEFER)?
> >
> > I have no idea what better using here. Think that is not so important
> > since we may have only one possible error code here.
>
> I'm not quite understand your meaning.
> Since the syscon device may be still not registered,
> so it may be better to return a EPROBE_DERFER which is the same
> as dt version.
I'm guessing that Alexander has not encountered deferred probing yet.
Alexander, the point here is that returning -EPROBE_DEFER has the
advantage that a probe() callback calling this function can
simply return that error code to the driver core. If the driver
core sees -EPROBE_DEFER, it will retry the same probe function
later, after all other device probe functions have been called
and at least one of them was successful. This way you can load the
syscon driver after loading a driver depending on it and everything
will still work.
Arnd
next prev parent reply other threads:[~2013-03-11 13:39 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-28 14:57 [PATCH v6 1/2] mfd: syscon: Removed unneeded field "dev" from private driver structure Alexander Shiyan
2013-02-28 14:57 ` [PATCH v6 2/2] mfd: syscon: Add non-DT support Alexander Shiyan
2013-03-11 9:40 ` Dong Aisheng
2013-03-11 10:16 ` Alexander Shiyan
2013-03-11 10:35 ` Dong Aisheng
2013-03-11 13:38 ` Arnd Bergmann [this message]
2013-03-11 16:17 ` Re[2]: " Alexander Shiyan
2013-03-07 4:06 ` [PATCH v6 1/2] mfd: syscon: Removed unneeded field "dev" from private driver structure Alexander Shiyan
2013-03-11 9:41 ` 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=201303111338.56679.arnd@arndb.de \
--to=arnd@arndb.de \
--cc=b29396@freescale.com \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=dmitry.torokhov@gmail.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=swarren@wwwdotorg.org \
--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