lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 23 Jan 2013 09:38:00 +0000
From:	"Kim, Milo" <Milo.Kim@...com>
To:	Bryan Wu <cooloney@...il.com>
CC:	Stephen Rothwell <sfr@...b.auug.org.au>,
	"linux-leds@...r.kernel.org" <linux-leds@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: [PATCH v2] leds: fix build error for LP55xx Common driver

To solve undefined symbols for LED class and I2C, lp55xx-common driver should
support a module build as well.

In case of CONFIG_I2C=m, CONFIG_LEDS_LP5521/5523=m, it still has undefined
symbol problems because CONFIG_LEDS_LP55XX_COMMON can be selected as 'y'.
Moreover, I2C functions are used in both LP5521 and LP5523 drivers.
Therefore, each LP55xx driver should have an 'I2C' dependency.

make x86_64 allmodconfig failed like this:

drivers/built-in.o: In function `lp55xx_unregister_leds':
(.text+0x161dab): undefined reference to `led_classdev_unregister'

drivers/built-in.o: In function `lp55xx_init_led':
leds-lp55xx-common.c:(.text+0x161f23): undefined reference to `led_classdev_register'
leds-lp55xx-common.c:(.text+0x161f9f): undefined reference to `led_classdev_unregister'

drivers/built-in.o: In function `lp55xx_read':
(.text+0x1621b3): undefined reference to `i2c_smbus_read_byte_data'
drivers/built-in.o: In function `lp55xx_init_device':
(.text+0x1622f0): undefined reference to `i2c_smbus_write_byte_data'
drivers/built-in.o: In function `lp55xx_init_device':
(.text+0x162331): undefined reference to `i2c_smbus_write_byte_data'
drivers/built-in.o: In function `lp55xx_update_bits':
(.text+0x162492): undefined reference to `i2c_smbus_write_byte_data'
drivers/built-in.o: In function `lp55xx_write':
(.text+0x1624c5): undefined reference to `i2c_smbus_write_byte_data'

Signed-off-by: Milo(Woogyom) Kim <milo.kim@...com>
---
 drivers/leds/Kconfig |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/leds/Kconfig b/drivers/leds/Kconfig
index c7c5280..09a6984 100644
--- a/drivers/leds/Kconfig
+++ b/drivers/leds/Kconfig
@@ -194,9 +194,8 @@ config LEDS_LP3944
 	  module will be called leds-lp3944.
 
 config LEDS_LP55XX_COMMON
-	bool "Common Driver for TI/National LP5521 and LP5523/55231"
+	tristate "Common Driver for TI/National LP5521 and LP5523/55231"
 	depends on LEDS_LP5521 || LEDS_LP5523
-	depends on I2C
 	select FW_LOADER
 	help
 	  This option supports common operations for LP5521 and LP5523/55231
@@ -205,6 +204,7 @@ config LEDS_LP55XX_COMMON
 config LEDS_LP5521
 	tristate "LED Support for N.S. LP5521 LED driver chip"
 	depends on LEDS_CLASS
+	depends on I2C
 	select LEDS_LP55XX_COMMON
 	help
 	  If you say yes here you get support for the National Semiconductor
@@ -215,6 +215,7 @@ config LEDS_LP5521
 config LEDS_LP5523
 	tristate "LED Support for TI/National LP5523/55231 LED driver chip"
 	depends on LEDS_CLASS
+	depends on I2C
 	select LEDS_LP55XX_COMMON
 	help
 	  If you say yes here you get support for TI/National Semiconductor
-- 
1.7.9.5


Best Regards,
Milo


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ