Skip to content

Commit

Permalink
Merge git://git.infradead.org/battery-2.6
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
Linus Torvalds committed Jul 15, 2007
2 parents bc06cff + 0909fca commit 8f41958
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 49 deletions.
10 changes: 10 additions & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -2869,6 +2869,16 @@ M: george@mvista.com
L: linux-kernel@vger.kernel.org
S: Supported

POWER SUPPLY CLASS/SUBSYSTEM and DRIVERS
P: Anton Vorontsov
M: cbou@mail.ru
P: David Woodhouse
M: dwmw2@infradead.org
L: linux-kernel@vger.kernel.org
L: kernel-discuss@handhelds.org
T: git git.infradead.org/battery-2.6.git
S: Maintained

POWERPC 4xx EMAC DRIVER
P: Eugene Surovegin
M: ebs@ebshome.net
Expand Down
4 changes: 0 additions & 4 deletions drivers/power/apm_power.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ static void find_main_battery(void)
}
if (!main_battery)
main_battery = batm;

return;
}

static int calculate_time(int status)
Expand Down Expand Up @@ -218,7 +216,6 @@ static void apm_battery_apm_get_power_status(struct apm_power_info *info)
}

up(&power_supply_class->sem);
return;
}

static int __init apm_battery_init(void)
Expand All @@ -232,7 +229,6 @@ static int __init apm_battery_init(void)
static void __exit apm_battery_exit(void)
{
apm_get_power_status = NULL;
return;
}

module_init(apm_battery_init);
Expand Down
7 changes: 0 additions & 7 deletions drivers/power/ds2760_battery.c
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,6 @@ static void ds2760_battery_update_status(struct ds2760_device_info *di)

if (di->charge_status != old_charge_status)
power_supply_changed(&di->bat);

return;
}

static void ds2760_battery_work(struct work_struct *work)
Expand All @@ -268,8 +266,6 @@ static void ds2760_battery_work(struct work_struct *work)

ds2760_battery_update_status(di);
queue_delayed_work(di->monitor_wqueue, &di->monitor_work, interval);

return;
}

#define to_ds2760_device_info(x) container_of((x), struct ds2760_device_info, \
Expand All @@ -283,8 +279,6 @@ static void ds2760_battery_external_power_changed(struct power_supply *psy)

cancel_delayed_work(&di->monitor_work);
queue_delayed_work(di->monitor_wqueue, &di->monitor_work, HZ/10);

return;
}

static int ds2760_battery_get_property(struct power_supply *psy,
Expand Down Expand Up @@ -457,7 +451,6 @@ static int __init ds2760_battery_init(void)
static void __exit ds2760_battery_exit(void)
{
platform_driver_unregister(&ds2760_battery_driver);
return;
}

module_init(ds2760_battery_init);
Expand Down
1 change: 0 additions & 1 deletion drivers/power/olpc_battery.c
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,6 @@ static void __exit olpc_bat_exit(void)
power_supply_unregister(&olpc_bat);
power_supply_unregister(&olpc_ac);
platform_device_unregister(bat_pdev);
return;
}

module_init(olpc_bat_init);
Expand Down
22 changes: 8 additions & 14 deletions drivers/power/pda_power.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down
2 changes: 0 additions & 2 deletions drivers/power/pmu_battery.c
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,6 @@ static void __exit pmu_bat_exit(void)
}
power_supply_unregister(&pmu_ac);
platform_device_unregister(bat_pdev);

return;
}

module_init(pmu_bat_init);
Expand Down
6 changes: 0 additions & 6 deletions drivers/power/power_supply_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,13 @@ static void power_supply_changed_work(struct work_struct *work)
power_supply_update_leds(psy);

kobject_uevent(&psy->dev->kobj, KOBJ_CHANGE);

return;
}

void power_supply_changed(struct power_supply *psy)
{
dev_dbg(psy->dev, "%s\n", __FUNCTION__);

schedule_work(&psy->changed_work);

return;
}

int power_supply_am_i_supplied(struct power_supply *psy)
Expand Down Expand Up @@ -129,7 +125,6 @@ void power_supply_unregister(struct power_supply *psy)
power_supply_remove_triggers(psy);
power_supply_remove_attrs(psy);
device_unregister(psy->dev);
return;
}

static int __init power_supply_class_init(void)
Expand All @@ -147,7 +142,6 @@ static int __init power_supply_class_init(void)
static void __exit power_supply_class_exit(void)
{
class_destroy(power_supply_class);
return;
}

EXPORT_SYMBOL_GPL(power_supply_changed);
Expand Down
8 changes: 0 additions & 8 deletions drivers/power/power_supply_leds.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ static void power_supply_update_bat_leds(struct power_supply *psy)
led_trigger_event(psy->full_trig, LED_OFF);
break;
}

return;
}

static int power_supply_create_bat_triggers(struct power_supply *psy)
Expand Down Expand Up @@ -97,7 +95,6 @@ static void power_supply_remove_bat_triggers(struct power_supply *psy)
kfree(psy->full_trig_name);
kfree(psy->charging_trig_name);
kfree(psy->charging_full_trig_name);
return;
}

/* Generated power specific LEDs triggers. */
Expand All @@ -115,8 +112,6 @@ static void power_supply_update_gen_leds(struct power_supply *psy)
led_trigger_event(psy->online_trig, LED_FULL);
else
led_trigger_event(psy->online_trig, LED_OFF);

return;
}

static int power_supply_create_gen_triggers(struct power_supply *psy)
Expand Down Expand Up @@ -145,7 +140,6 @@ static void power_supply_remove_gen_triggers(struct power_supply *psy)
{
led_trigger_unregister_simple(psy->online_trig);
kfree(psy->online_trig_name);
return;
}

/* Choice what triggers to create&update. */
Expand All @@ -156,7 +150,6 @@ void power_supply_update_leds(struct power_supply *psy)
power_supply_update_bat_leds(psy);
else
power_supply_update_gen_leds(psy);
return;
}

int power_supply_create_triggers(struct power_supply *psy)
Expand All @@ -172,5 +165,4 @@ void power_supply_remove_triggers(struct power_supply *psy)
power_supply_remove_bat_triggers(psy);
else
power_supply_remove_gen_triggers(psy);
return;
}
2 changes: 0 additions & 2 deletions drivers/power/power_supply_sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,6 @@ void power_supply_remove_attrs(struct power_supply *psy)
for (i = 0; i < psy->num_properties; i++)
device_remove_file(psy->dev,
&power_supply_attrs[psy->properties[i]]);

return;
}

static char *kstruprdup(const char *str, gfp_t gfp)
Expand Down
7 changes: 2 additions & 5 deletions drivers/w1/slaves/w1_ds2760.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ int w1_ds2760_write(struct device *dev, char *buf, int addr, size_t count)
return w1_ds2760_io(dev, buf, addr, count, 1);
}

static ssize_t w1_ds2760_read_bin(struct kobject *kobj, struct bin_attribute *attr,
static ssize_t w1_ds2760_read_bin(struct kobject *kobj,
struct bin_attribute *bin_attr,
char *buf, loff_t off, size_t count)
{
struct device *dev = container_of(kobj, struct device, kobj);
Expand Down Expand Up @@ -121,8 +122,6 @@ static void release_bat_id(int id)
mutex_lock(&bat_idr_lock);
idr_remove(&bat_idr, id);
mutex_unlock(&bat_idr_lock);

return;
}

static int w1_ds2760_add_slave(struct w1_slave *sl)
Expand Down Expand Up @@ -174,8 +173,6 @@ static void w1_ds2760_remove_slave(struct w1_slave *sl)
platform_device_unregister(pdev);
release_bat_id(id);
sysfs_remove_bin_file(&sl->dev.kobj, &w1_ds2760_bin_attr);

return;
}

static struct w1_family_ops w1_ds2760_fops = {
Expand Down

0 comments on commit 8f41958

Please sign in to comment.