linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] platform/x86: INT33FE: add i2c dependency
@ 2017-04-20 12:51 Tobias Regnery
  2017-04-21  7:19 ` Hans de Goede
  0 siblings, 1 reply; 5+ messages in thread
From: Tobias Regnery @ 2017-04-20 12:51 UTC (permalink / raw)
  To: dvhart, andy, hdegoede, platform-driver-x86, linux-kernel; +Cc: Tobias Regnery

With CONFIG_I2C=m and CONFIG_INTEL_CHT_INT33FE=y we see the following link
errors:

drivers/built-in.o: In function 'cht_int33fe_remove':
intel_cht_int33fe.c:(.text+0x391f6e): undefined reference to 'i2c_unregister_device'
intel_cht_int33fe.c:(.text+0x391f76): undefined reference to 'i2c_unregister_device'
intel_cht_int33fe.c:(.text+0x391f7d): undefined reference to 'i2c_unregister_device'
drivers/built-in.o: In function 'cht_int33fe_probe':
intel_cht_int33fe.c:(.text+0x392147): undefined reference to 'i2c_acpi_new_device'
intel_cht_int33fe.c:(.text+0x392185): undefined reference to 'i2c_acpi_new_device'
intel_cht_int33fe.c:(.text+0x3921bd): undefined reference to 'i2c_acpi_new_device'
intel_cht_int33fe.c:(.text+0x3921d9): undefined reference to 'i2c_unregister_device'
intel_cht_int33fe.c:(.text+0x3921e8): undefined reference to 'i2c_unregister_device'
drivers/built-in.o: In function 'cht_int33fe_driver_init':
intel_cht_int33fe.c:(.init.text+0x2386d): undefined reference to 'i2c_register_driver'
drivers/built-in.o: In function 'cht_int33fe_driver_exit':
intel_cht_int33fe.c:(.exit.text+0x206e): undefined reference to 'i2c_del_driver'

Fix this by adding a kconfig dependency on the I2C subsystem.

Fixes: 1cd706df8a9c ("platform/x86: Add Intel Cherry Trail ACPI INT33FE device driver")
Signed-off-by: Tobias Regnery <tobias.regnery@gmail.com>
---
 drivers/platform/x86/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig
index 6b33db6c9d22..ea264fefb845 100644
--- a/drivers/platform/x86/Kconfig
+++ b/drivers/platform/x86/Kconfig
@@ -783,7 +783,7 @@ config ACPI_CMPC
 
 config INTEL_CHT_INT33FE
 	tristate "Intel Cherry Trail ACPI INT33FE Driver"
-	depends on X86 && ACPI
+	depends on X86 && ACPI && I2C
 	---help---
 	  This driver add support for the INT33FE ACPI device found on
 	  some Intel Cherry Trail devices.
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 5+ messages in thread
* [PATCH] platform/x86: INT33FE: add I2C dependency
@ 2017-04-21 21:03 Arnd Bergmann
  2017-04-21 21:42 ` Darren Hart
  0 siblings, 1 reply; 5+ messages in thread
From: Arnd Bergmann @ 2017-04-21 21:03 UTC (permalink / raw)
  To: Darren Hart, Andy Shevchenko
  Cc: Arnd Bergmann, Hans de Goede, Rajneesh Bhardwaj,
	platform-driver-x86, linux-kernel

When I2C is disabled, we get a link error:

drivers/platform/built-in.o: In function `cht_int33fe_remove':
intel_cht_int33fe.c:(.text+0x8ba): undefined reference to `i2c_unregister_device'
drivers/platform/built-in.o: In function `cht_int33fe_probe':
intel_cht_int33fe.c:(.text+0x9ec): undefined reference to `i2c_acpi_new_device'
intel_cht_int33fe.c:(.text+0xa7a): undefined reference to `i2c_unregister_device'

This adds a Kconfig dependency to ensure I2C is available to this
driver.

Fixes: 1cd706df8a9c ("platform/x86: Add Intel Cherry Trail ACPI INT33FE device driver")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/platform/x86/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig
index 76ced87efde5..4c7db1fbac26 100644
--- a/drivers/platform/x86/Kconfig
+++ b/drivers/platform/x86/Kconfig
@@ -782,7 +782,7 @@ config ACPI_CMPC
 
 config INTEL_CHT_INT33FE
 	tristate "Intel Cherry Trail ACPI INT33FE Driver"
-	depends on X86 && ACPI
+	depends on X86 && ACPI && I2C
 	---help---
 	  This driver add support for the INT33FE ACPI device found on
 	  some Intel Cherry Trail devices.
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-04-21 21:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-20 12:51 [PATCH] platform/x86: INT33FE: add i2c dependency Tobias Regnery
2017-04-21  7:19 ` Hans de Goede
2017-04-21 21:41   ` Darren Hart
2017-04-21 21:03 [PATCH] platform/x86: INT33FE: add I2C dependency Arnd Bergmann
2017-04-21 21:42 ` Darren Hart

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).