Commit 7b3d54a8c30d2c524889a05d0c1334813d516b93
1 parent
5ebf6e6a96
Exists in
master
and in
7 other branches
Power supply class and drivers: remove non obligatory return statements
Per Jeff Garzik request. Signed-off-by: Jeff Garzik <jeff@garzik.org> Signed-off-by: Anton Vorontsov <cbou@mail.ru>
Showing 9 changed files with 0 additions and 39 deletions Side-by-side Diff
drivers/power/apm_power.c
... | ... | @@ -48,8 +48,6 @@ |
48 | 48 | } |
49 | 49 | if (!main_battery) |
50 | 50 | main_battery = batm; |
51 | - | |
52 | - return; | |
53 | 51 | } |
54 | 52 | |
55 | 53 | static int calculate_time(int status) |
... | ... | @@ -218,7 +216,6 @@ |
218 | 216 | } |
219 | 217 | |
220 | 218 | up(&power_supply_class->sem); |
221 | - return; | |
222 | 219 | } |
223 | 220 | |
224 | 221 | static int __init apm_battery_init(void) |
... | ... | @@ -232,7 +229,6 @@ |
232 | 229 | static void __exit apm_battery_exit(void) |
233 | 230 | { |
234 | 231 | apm_get_power_status = NULL; |
235 | - return; | |
236 | 232 | } |
237 | 233 | |
238 | 234 | module_init(apm_battery_init); |
drivers/power/ds2760_battery.c
... | ... | @@ -254,8 +254,6 @@ |
254 | 254 | |
255 | 255 | if (di->charge_status != old_charge_status) |
256 | 256 | power_supply_changed(&di->bat); |
257 | - | |
258 | - return; | |
259 | 257 | } |
260 | 258 | |
261 | 259 | static void ds2760_battery_work(struct work_struct *work) |
... | ... | @@ -268,8 +266,6 @@ |
268 | 266 | |
269 | 267 | ds2760_battery_update_status(di); |
270 | 268 | queue_delayed_work(di->monitor_wqueue, &di->monitor_work, interval); |
271 | - | |
272 | - return; | |
273 | 269 | } |
274 | 270 | |
275 | 271 | #define to_ds2760_device_info(x) container_of((x), struct ds2760_device_info, \ |
... | ... | @@ -283,8 +279,6 @@ |
283 | 279 | |
284 | 280 | cancel_delayed_work(&di->monitor_work); |
285 | 281 | queue_delayed_work(di->monitor_wqueue, &di->monitor_work, HZ/10); |
286 | - | |
287 | - return; | |
288 | 282 | } |
289 | 283 | |
290 | 284 | static int ds2760_battery_get_property(struct power_supply *psy, |
... | ... | @@ -457,7 +451,6 @@ |
457 | 451 | static void __exit ds2760_battery_exit(void) |
458 | 452 | { |
459 | 453 | platform_driver_unregister(&ds2760_battery_driver); |
460 | - return; | |
461 | 454 | } |
462 | 455 | |
463 | 456 | module_init(ds2760_battery_init); |
drivers/power/olpc_battery.c
drivers/power/pda_power.c
... | ... | @@ -97,8 +97,6 @@ |
97 | 97 | dev_dbg(dev, "charger off\n"); |
98 | 98 | pdata->set_charge(0); |
99 | 99 | } |
100 | - | |
101 | - return; | |
102 | 100 | } |
103 | 101 | |
104 | 102 | static void supply_timer_func(unsigned long power_supply_ptr) |
... | ... | @@ -106,7 +104,6 @@ |
106 | 104 | void *power_supply = (void *)power_supply_ptr; |
107 | 105 | |
108 | 106 | power_supply_changed(power_supply); |
109 | - return; | |
110 | 107 | } |
111 | 108 | |
112 | 109 | static void charger_timer_func(unsigned long power_supply_ptr) |
... | ... | @@ -118,7 +115,6 @@ |
118 | 115 | supply_timer.data = power_supply_ptr; |
119 | 116 | mod_timer(&supply_timer, |
120 | 117 | jiffies + msecs_to_jiffies(pdata->wait_for_charger)); |
121 | - return; | |
122 | 118 | } |
123 | 119 | |
124 | 120 | static irqreturn_t power_changed_isr(int irq, void *power_supply) |
... | ... | @@ -251,7 +247,6 @@ |
251 | 247 | static void __exit pda_power_exit(void) |
252 | 248 | { |
253 | 249 | platform_driver_unregister(&pda_power_pdrv); |
254 | - return; | |
255 | 250 | } |
256 | 251 | |
257 | 252 | module_init(pda_power_init); |
drivers/power/pmu_battery.c
drivers/power/power_supply_core.c
... | ... | @@ -46,8 +46,6 @@ |
46 | 46 | power_supply_update_leds(psy); |
47 | 47 | |
48 | 48 | kobject_uevent(&psy->dev->kobj, KOBJ_CHANGE); |
49 | - | |
50 | - return; | |
51 | 49 | } |
52 | 50 | |
53 | 51 | void power_supply_changed(struct power_supply *psy) |
... | ... | @@ -55,8 +53,6 @@ |
55 | 53 | dev_dbg(psy->dev, "%s\n", __FUNCTION__); |
56 | 54 | |
57 | 55 | schedule_work(&psy->changed_work); |
58 | - | |
59 | - return; | |
60 | 56 | } |
61 | 57 | |
62 | 58 | int power_supply_am_i_supplied(struct power_supply *psy) |
... | ... | @@ -129,7 +125,6 @@ |
129 | 125 | power_supply_remove_triggers(psy); |
130 | 126 | power_supply_remove_attrs(psy); |
131 | 127 | device_unregister(psy->dev); |
132 | - return; | |
133 | 128 | } |
134 | 129 | |
135 | 130 | static int __init power_supply_class_init(void) |
... | ... | @@ -147,7 +142,6 @@ |
147 | 142 | static void __exit power_supply_class_exit(void) |
148 | 143 | { |
149 | 144 | class_destroy(power_supply_class); |
150 | - return; | |
151 | 145 | } |
152 | 146 | |
153 | 147 | EXPORT_SYMBOL_GPL(power_supply_changed); |
drivers/power/power_supply_leds.c
... | ... | @@ -40,8 +40,6 @@ |
40 | 40 | led_trigger_event(psy->full_trig, LED_OFF); |
41 | 41 | break; |
42 | 42 | } |
43 | - | |
44 | - return; | |
45 | 43 | } |
46 | 44 | |
47 | 45 | static int power_supply_create_bat_triggers(struct power_supply *psy) |
... | ... | @@ -97,7 +95,6 @@ |
97 | 95 | kfree(psy->full_trig_name); |
98 | 96 | kfree(psy->charging_trig_name); |
99 | 97 | kfree(psy->charging_full_trig_name); |
100 | - return; | |
101 | 98 | } |
102 | 99 | |
103 | 100 | /* Generated power specific LEDs triggers. */ |
... | ... | @@ -115,8 +112,6 @@ |
115 | 112 | led_trigger_event(psy->online_trig, LED_FULL); |
116 | 113 | else |
117 | 114 | led_trigger_event(psy->online_trig, LED_OFF); |
118 | - | |
119 | - return; | |
120 | 115 | } |
121 | 116 | |
122 | 117 | static int power_supply_create_gen_triggers(struct power_supply *psy) |
... | ... | @@ -145,7 +140,6 @@ |
145 | 140 | { |
146 | 141 | led_trigger_unregister_simple(psy->online_trig); |
147 | 142 | kfree(psy->online_trig_name); |
148 | - return; | |
149 | 143 | } |
150 | 144 | |
151 | 145 | /* Choice what triggers to create&update. */ |
... | ... | @@ -156,7 +150,6 @@ |
156 | 150 | power_supply_update_bat_leds(psy); |
157 | 151 | else |
158 | 152 | power_supply_update_gen_leds(psy); |
159 | - return; | |
160 | 153 | } |
161 | 154 | |
162 | 155 | int power_supply_create_triggers(struct power_supply *psy) |
... | ... | @@ -172,6 +165,5 @@ |
172 | 165 | power_supply_remove_bat_triggers(psy); |
173 | 166 | else |
174 | 167 | power_supply_remove_gen_triggers(psy); |
175 | - return; | |
176 | 168 | } |
drivers/power/power_supply_sysfs.c
drivers/w1/slaves/w1_ds2760.c
... | ... | @@ -121,8 +121,6 @@ |
121 | 121 | mutex_lock(&bat_idr_lock); |
122 | 122 | idr_remove(&bat_idr, id); |
123 | 123 | mutex_unlock(&bat_idr_lock); |
124 | - | |
125 | - return; | |
126 | 124 | } |
127 | 125 | |
128 | 126 | static int w1_ds2760_add_slave(struct w1_slave *sl) |
... | ... | @@ -174,8 +172,6 @@ |
174 | 172 | platform_device_unregister(pdev); |
175 | 173 | release_bat_id(id); |
176 | 174 | sysfs_remove_bin_file(&sl->dev.kobj, &w1_ds2760_bin_attr); |
177 | - | |
178 | - return; | |
179 | 175 | } |
180 | 176 | |
181 | 177 | static struct w1_family_ops w1_ds2760_fops = { |