Re: [PATCH] i2c: Simplified CONFIG_I2C=n interface.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux