summaryrefslogtreecommitdiffstats
path: root/drivers/power/pda_power.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-15 16:56:12 -0700
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-15 16:56:12 -0700
commit8f41958bdd577731f7411c9605cfaa9db6766809 (patch)
tree424776ff9ffe3fac011634c7c8db15dee839b0bb /drivers/power/pda_power.c
parentbc06cffdec85d487c77109dffcd2f285bdc502d3 (diff)
parent0909fca51346d0ece688532c54d41ebc986aef7f (diff)
Merge git://git.infradead.org/battery-2.6
* git://git.infradead.org/battery-2.6: git-battery vs git-acpi Power supply class and drivers: remove non obligatory return statements pda_power: clean up irq, timer MAINTAINERS: Add maintainers for power supply subsystem and drivers Fixed up trivial conflict in drivers/w1/slaves/w1_ds2760.c manually
Diffstat (limited to 'drivers/power/pda_power.c')
-rw-r--r--drivers/power/pda_power.c22
1 files changed, 8 insertions, 14 deletions
diff --git a/drivers/power/pda_power.c b/drivers/power/pda_power.c
index 4e1eb040e14..c058f285be1 100644
--- a/drivers/power/pda_power.c
+++ b/drivers/power/pda_power.c
@@ -97,36 +97,31 @@ static void update_charger(void)
dev_dbg(dev, "charger off\n");
pdata->set_charge(0);
}
-
- return;
}
-static void supply_timer_func(unsigned long irq)
+static void supply_timer_func(unsigned long power_supply_ptr)
{
- if (ac_irq && irq == ac_irq->start)
- power_supply_changed(&pda_power_supplies[0]);
- else if (usb_irq && irq == usb_irq->start)
- power_supply_changed(&pda_power_supplies[1]);
- return;
+ void *power_supply = (void *)power_supply_ptr;
+
+ power_supply_changed(power_supply);
}
-static void charger_timer_func(unsigned long irq)
+static void charger_timer_func(unsigned long power_supply_ptr)
{
update_charger();
/* Okay, charger set. Now wait a bit before notifying supplicants,
* charge power should stabilize. */
- supply_timer.data = irq;
+ supply_timer.data = power_supply_ptr;
mod_timer(&supply_timer,
jiffies + msecs_to_jiffies(pdata->wait_for_charger));
- return;
}
-static irqreturn_t power_changed_isr(int irq, void *unused)
+static irqreturn_t power_changed_isr(int irq, void *power_supply)
{
/* Wait a bit before reading ac/usb line status and setting charger,
* because ac/usb status readings may lag from irq. */
- charger_timer.data = irq;
+ charger_timer.data = (unsigned long)power_supply;
mod_timer(&charger_timer,
jiffies + msecs_to_jiffies(pdata->wait_for_status));
return IRQ_HANDLED;
@@ -252,7 +247,6 @@ static int __init pda_power_init(void)
static void __exit pda_power_exit(void)
{
platform_driver_unregister(&pda_power_pdrv);
- return;
}
module_init(pda_power_init);