From: Thierry Reding <thierry.reding@gmail.com>
To: Wolfram Sang <wsa@the-dreams.de>
Cc: devicetree@vger.kernel.org,
davinci-linux-open-source@linux.davincidsp.com,
linux-samsung-soc@vger.kernel.org, linux-doc@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org,
linux-i2c@vger.kernel.org, linux-tegra@vger.kernel.org,
linux-omap@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
linux-arm-kernel@lists.infradead.org,
linux-media@vger.kernel.org
Subject: Re: [PATCH RESEND] i2c: move of helpers into the core
Date: Mon, 19 Aug 2013 21:46:04 +0200 [thread overview]
Message-ID: <20130819194603.GC4961@mithrandir> (raw)
In-Reply-To: <1376935183-11218-1-git-send-email-wsa@the-dreams.de>
[-- Attachment #1: Type: text/plain, Size: 986 bytes --]
On Mon, Aug 19, 2013 at 07:59:40PM +0200, Wolfram Sang wrote:
[...]
> diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c
[...]
> +#if IS_ENABLED(CONFIG_OF)
> +static void of_i2c_register_devices(struct i2c_adapter *adap)
> +{
[...]
> +}
[...]
> +#endif /* CONFIG_OF */
Isn't this missing the dummy implementation for !OF.
> static int i2c_do_add_adapter(struct i2c_driver *driver,
> struct i2c_adapter *adap)
> {
> @@ -1058,6 +1160,8 @@ static int i2c_register_adapter(struct i2c_adapter *adap)
>
> exit_recovery:
> /* create pre-declared device nodes */
> + of_i2c_register_devices(adap);
Alternatively you could remove the of_i2c_register_devices() from the
"#ifdef CONFIG_OF" block so that it will always be compiled. You could
turn the above into
if (IS_ENABLED(CONFIG_OF))
of_i2c_register_devices(adap);
and let the compiler throw the static function away if it sees that the
condition is always false.
Thierry
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2013-08-19 19:46 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-19 13:19 [PATCH] i2c: move of helpers into the core Wolfram Sang
2013-08-19 17:59 ` [PATCH RESEND] " Wolfram Sang
2013-08-19 18:22 ` Sylwester Nawrocki
2013-08-19 18:56 ` Wolfram Sang
2013-08-19 19:46 ` Thierry Reding [this message]
2013-08-19 21:16 ` Wolfram Sang
2013-08-19 20:10 ` Felipe Balbi
2013-08-19 22:01 ` Rob Herring
2013-08-19 23:04 ` [PATCH] " Rafael J. Wysocki
2013-08-19 22:56 ` Stephen Warren
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=20130819194603.GC4961@mithrandir \
--to=thierry.reding@gmail.com \
--cc=davinci-linux-open-source@linux.davincidsp.com \
--cc=devicetree@vger.kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=wsa@the-dreams.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;
as well as URLs for NNTP newsgroup(s).