Skip to contentSkip to conversation

ds2760_battery: add HAS_IOMEM dependency

PATCH Applied Martin Schwidefsky 2 participants 4 messages Sep 23, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ds2760_battery: add HAS_IOMEM dependency

From: Martin Schwidefsky <[email protected]>

Fix this Kconfig warning on allmodconfig for s390:

warning: (BATTERY_DS2760 && POWER_SUPPLY) selects W1 which has unmet direct dependencies (HAS_IOMEM)

---

 drivers/power/Kconfig |    1 +
 1 file changed, 1 insertion(+)
drivers/power/Kconfig +1 -0
diff -urpN linux-2.6/drivers/power/Kconfig linux-2.6-patched/drivers/power/Kconfig
@@ -64,6 +64,7 @@ config TEST_POWER
 
 config BATTERY_DS2760
 	tristate "DS2760 battery driver (HP iPAQ & others)"
+	depends on HAS_IOMEM
 	select W1
 	select W1_SLAVE_DS2760
 	help
#1 lore raw
Quoted 17 lines · Martin Schwidefsky

From: Martin Schwidefsky <[email protected]>

Fix this Kconfig warning on allmodconfig for s390:

warning: (BATTERY_DS2760 && POWER_SUPPLY) selects W1 which has unmet direct dependencies (HAS_IOMEM)

---

 drivers/power/Kconfig |    1 +
 1 file changed, 1 insertion(+)

diff -urpN linux-2.6/drivers/power/Kconfig linux-2.6-patched/drivers/power/Kconfig

drivers/power/Kconfig config TEST_POWER · line 69

Quoted 6 lines
drivers/power/Kconfig +1 -0
@@ -64,6 +64,7 @@ config TEST_POWER
 
 config BATTERY_DS2760
 	tristate "DS2760 battery driver (HP iPAQ & others)"
+	depends on HAS_IOMEM
 	select W1
 	select W1_SLAVE_DS2760

I think the better fix would be to turn this into 'depends on W1', and remove these selects.

Thanks,

Signature · 3 lines
Anton Vorontsov
email: [email protected]
irc://irc.freenode.net/bd2
#2 lore raw
Quoted 19 lines · On Thu, 23 Sep 2010 14:57:27 +0400 Anton Vorontsov <[email protected]>…
Quoted 18 lines · Martin Schwidefsky

From: Martin Schwidefsky <[email protected]>

Fix this Kconfig warning on allmodconfig for s390:

warning: (BATTERY_DS2760 && POWER_SUPPLY) selects W1 which has unmet direct dependencies (HAS_IOMEM)

---

 drivers/power/Kconfig |    1 +
 1 file changed, 1 insertion(+)

diff -urpN linux-2.6/drivers/power/Kconfig linux-2.6-patched/drivers/power/Kconfig

drivers/power/Kconfig +0 -0
@@ -64,6 +64,7 @@ config TEST_POWER
 
Quoted 8 lines

drivers/power/Kconfig config TEST_POWER · line 69

Quoted 5 lines
drivers/power/Kconfig +1 -0
 config BATTERY_DS2760
 	tristate "DS2760 battery driver (HP iPAQ & others)"
+	depends on HAS_IOMEM
 	select W1
 	select W1_SLAVE_DS2760

I think the better fix would be to turn this into 'depends on W1', and remove these selects.

That would work as well. Dunno what is better, W1 is a bus for a certain class of devices. The bus is only needed if at least one driver that uses it is configured. Which would argue for the select method but that has the dependency problem. Anyway, either method is fine with me. If you prefer the "depends on W1" lets do it that way.
--
[PATCH] ds2760_battery: fix W1 and W1_SLAVE_DS2760 dependency

From: Martin Schwidefsky <[email protected]>

Fix this Kconfig warning on allmodconfig for s390:

warning: (BATTERY_DS2760 && POWER_SUPPLY) selects W1 which has unmet direct dependencies (HAS_IOMEM)

---

 drivers/power/Kconfig |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/power/Kconfig +1 -2
diff -urpN linux-2.6/drivers/power/Kconfig linux-2.6-patched/drivers/power/Kconfig
@@ -64,8 +64,7 @@ config TEST_POWER
 
 config BATTERY_DS2760
 	tristate "DS2760 battery driver (HP iPAQ & others)"
-	select W1
-	select W1_SLAVE_DS2760
+	depends on W1 && W1_SLAVE_DS2760
 	help
 	  Say Y here to enable support for batteries with ds2760 chip.
 
Signature · 4 lines
blue skies,
   Martin.

"Reality continues to ruin my life." - Calvin.
#3 lore raw

On Thu, Sep 23, 2010 at 03:21:36PM +0200, Martin Schwidefsky wrote:
[...]

Quoted 13 lines
Quoted 2 lines

I think the better fix would be to turn this into 'depends on W1', and remove these selects.

That would work as well. Dunno what is better, W1 is a bus for a certain class of devices. The bus is only needed if at least one driver that uses it is configured. Which would argue for the select method but that has the dependency problem. Anyway, either method is fine with me. If you prefer the "depends on W1" lets do it that way.
--
[PATCH] ds2760_battery: fix W1 and W1_SLAVE_DS2760 dependency

From: Martin Schwidefsky <[email protected]>

Quoted 7 lines

Fix this Kconfig warning on allmodconfig for s390:

warning: (BATTERY_DS2760 && POWER_SUPPLY) selects W1 which has unmet direct dependencies (HAS_IOMEM)

---

Applied, thanks!

Quoted 22 lines
 drivers/power/Kconfig |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff -urpN linux-2.6/drivers/power/Kconfig linux-2.6-patched/drivers/power/Kconfig

drivers/power/Kconfig +1 -2
@@ -64,8 +64,7 @@ config TEST_POWER
 
 config BATTERY_DS2760
 	tristate "DS2760 battery driver (HP iPAQ & others)"
-	select W1
-	select W1_SLAVE_DS2760
+	depends on W1 && W1_SLAVE_DS2760
 	help
 	  Say Y here to enable support for batteries with ds2760 chip.
 
Signature · 5 lines
-- 
blue skies,
   Martin.

"Reality continues to ruin my life." - Calvin.
Signature · 3 lines
Anton Vorontsov
email: [email protected]
irc://irc.freenode.net/bd2