Skip to contentSkip to conversation

power supply: tosa_battery: get rid of irq_to_gpio usage

PATCH Applied Andrea Adami 2 participants 2 messages Jul 20, 2013 – Aug 9, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 power supply: tosa_battery: get rid of irq_to_gpio usage

Fix
linux/drivers/power/tosa_battery.c:153:2: error: implicit declaration of function 'irq_to_gpio' [-Werror=implicit-function-declaration]
| pr_info("tosa_bat_gpio irq: %d\n",
gpio_get_value(irq_to_gpio(irq)));

as done for collie_battery.c with
commit 629bcb4b72d49b3631ae3dd0fe1d345820fadfcc

Since 9d08d5d77a355510c2f5657c86b0a4b25acfe72c, irq_to_gpio() is no longer available but still in use by collie_battery.c. As it's just for a debug message, just get rid of this call.

---
 drivers/power/tosa_battery.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/power/tosa_battery.c +1 -1
index 0224de5..f4d80df 100644
@@ -150,7 +150,7 @@ static void tosa_bat_external_power_changed(struct power_supply *psy)
 
 static irqreturn_t tosa_bat_gpio_isr(int irq, void *data)
 {
-	pr_info("tosa_bat_gpio irq: %d\n", gpio_get_value(irq_to_gpio(irq)));
+	pr_info("tosa_bat_gpio irq\n");
 	schedule_work(&bat_work);
 	return IRQ_HANDLED;
 }
Signature · 1 line
1.8.1.5
#1 lore raw
Quoted 9 lines · Andrea Adami

Fix
linux/drivers/power/tosa_battery.c:153:2: error: implicit declaration of function 'irq_to_gpio' [-Werror=implicit-function-declaration]
| pr_info("tosa_bat_gpio irq: %d\n",
gpio_get_value(irq_to_gpio(irq)));

as done for collie_battery.c with
commit 629bcb4b72d49b3631ae3dd0fe1d345820fadfcc

Quoted 6 lines

Since 9d08d5d77a355510c2f5657c86b0a4b25acfe72c, irq_to_gpio() is no longer available but still in use by collie_battery.c. As it's just for a debug message, just get rid of this call.

---

Applied, thanks!

Quoted 18 lines
 drivers/power/tosa_battery.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/power/tosa_battery.c +1 -1
index 0224de5..f4d80df 100644
@@ -150,7 +150,7 @@ static void tosa_bat_external_power_changed(struct power_supply *psy)
 
 static irqreturn_t tosa_bat_gpio_isr(int irq, void *data)
 {
-	pr_info("tosa_bat_gpio irq: %d\n", gpio_get_value(irq_to_gpio(irq)));
+	pr_info("tosa_bat_gpio irq\n");
 	schedule_work(&bat_work);
 	return IRQ_HANDLED;
 }
Signature · 1 line
1.8.1.5