Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge git://git.infradead.org/battery-2.6

* git://git.infradead.org/battery-2.6:
PMU battery: filenames in sysfs with spaces
pda_power: add init and exit function callbacks

+16 -1
+11
drivers/power/pda_power.c
··· 209 209 210 210 pdata = pdev->dev.platform_data; 211 211 212 + if (pdata->init) { 213 + ret = pdata->init(dev); 214 + if (ret < 0) 215 + goto init_failed; 216 + } 217 + 212 218 update_status(); 213 219 update_charger(); 214 220 ··· 304 298 if (pdata->is_ac_online) 305 299 power_supply_unregister(&pda_psy_ac); 306 300 ac_supply_failed: 301 + if (pdata->exit) 302 + pdata->exit(dev); 303 + init_failed: 307 304 wrongid: 308 305 return ret; 309 306 } ··· 327 318 power_supply_unregister(&pda_psy_usb); 328 319 if (pdata->is_ac_online) 329 320 power_supply_unregister(&pda_psy_ac); 321 + if (pdata->exit) 322 + pdata->exit(dev); 330 323 331 324 return 0; 332 325 }
+1 -1
drivers/power/pmu_battery.c
··· 159 159 if (!pbat) 160 160 break; 161 161 162 - sprintf(pbat->name, "PMU battery %d", i); 162 + sprintf(pbat->name, "PMU_battery_%d", i); 163 163 pbat->bat.name = pbat->name; 164 164 pbat->bat.properties = pmu_bat_props; 165 165 pbat->bat.num_properties = ARRAY_SIZE(pmu_bat_props);
+4
include/linux/pda_power.h
··· 16 16 #define PDA_POWER_CHARGE_AC (1 << 0) 17 17 #define PDA_POWER_CHARGE_USB (1 << 1) 18 18 19 + struct device; 20 + 19 21 struct pda_power_pdata { 22 + int (*init)(struct device *dev); 20 23 int (*is_ac_online)(void); 21 24 int (*is_usb_online)(void); 22 25 void (*set_charge)(int flags); 26 + void (*exit)(struct device *dev); 23 27 24 28 char **supplied_to; 25 29 size_t num_supplicants;