From: Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>
To: Paul Mundt <lethal-M7jkjyW5wf5g9hUCZPvPmw@public.gmane.org>
Cc: linux-next-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-media-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] i2c: Simplified CONFIG_I2C=n interface.
Date: Wed, 27 May 2009 09:18:31 +0200 [thread overview]
Message-ID: <20090527091831.26b60d6d@hyperion.delvare> (raw)
In-Reply-To: <20090527070850.GA11221-M7jkjyW5wf5g9hUCZPvPmw@public.gmane.org>
On Wed, 27 May 2009 16:08:50 +0900, Paul Mundt wrote:
> Another day, another module-related failure due to the i2c interface
> being used in code that optionally uses it:
>
> ERROR: "i2c_new_device" [drivers/media/video/soc_camera.ko] undefined!
> ERROR: "i2c_get_adapter" [drivers/media/video/soc_camera.ko] undefined!
> ERROR: "i2c_put_adapter" [drivers/media/video/soc_camera.ko] undefined!
> ERROR: "i2c_unregister_device" [drivers/media/video/soc_camera.ko] undefined!
> make[2]: *** [__modpost] Error 1
> make[1]: *** [modules] Error 2
> make: *** [sub-make] Error 2
>
> In the interest of not continually inserting i2c ifdefs in to every
> driver that supports an optional i2c interface, this provides a stubbed
> set of interfaces for the CONFIG_I2C=n case.
>
> I've covered the obvious ones that cause the majority of the build
> failures, anything more involved really ought to have its dependencies
> fixed instead.
Violent nack. Drivers which optionally use I2C are a minority.
Designing them in such a way that a single #ifdef CONFIG_I2C will make
them work can't be that hard, really. Not to mention that having a
dozen stubs in i2c.h in the CONFIG_I2C=n case won't save you much work
at the driver level anyway, because you certainly need to run different
code paths depending on how the device is connected, and you also have
to differentiate between the "I2C support is missing" case and the "I2C
device registration failed" case, etc.
--
Jean Delvare
next prev parent reply other threads:[~2009-05-27 7:18 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-27 7:08 [PATCH] i2c: Simplified CONFIG_I2C=n interface Paul Mundt
[not found] ` <20090527070850.GA11221-M7jkjyW5wf5g9hUCZPvPmw@public.gmane.org>
2009-05-27 7:18 ` Jean Delvare [this message]
[not found] ` <20090527091831.26b60d6d-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2009-05-27 7:28 ` Paul Mundt
2009-05-27 12:01 ` Mark Brown
2009-06-02 7:12 ` Jean Delvare
2009-06-02 9:34 ` Mark Brown
2009-06-05 8:13 ` [PATCH] i2c: Don't advertise i2c functions when not available Jean Delvare
[not found] ` <20090605101330.2f93e9ab-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2009-06-05 8:42 ` Mark Brown
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=20090527091831.26b60d6d@hyperion.delvare \
--to=khali-puyad+kwke1g9huczpvpmw@public.gmane.org \
--cc=lethal-M7jkjyW5wf5g9hUCZPvPmw@public.gmane.org \
--cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-media-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-next-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
/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).