aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Vorontsov <cbou@mail.ru>2007-07-14 21:18:25 -0400
committerAnton Vorontsov <cbou@mail.ru>2007-07-15 14:32:38 -0400
commit7b3d54a8c30d2c524889a05d0c1334813d516b93 (patch)
tree7bcbfadc8604f04bea356a8fc61f8069daf24b85
parent5ebf6e6a96e41220edec23a90e4140985d1a5732 (diff)
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>
-rw-r--r--drivers/power/apm_power.c4
-rw-r--r--drivers/power/ds2760_battery.c7
-rw-r--r--drivers/power/olpc_battery.c1
-rw-r--r--drivers/power/pda_power.c5
-rw-r--r--drivers/power/pmu_battery.c2
-rw-r--r--drivers/power/power_supply_core.c6
-rw-r--r--drivers/power/power_supply_leds.c8
-rw-r--r--drivers/power/power_supply_sysfs.c2
-rw-r--r--drivers/w1/slaves/w1_ds2760.c4
9 files changed, 0 insertions, 39 deletions
diff --git a/drivers/power/apm_power.c b/drivers/power/apm_power.c
index 042bd950d036..39a90a6f0f80 100644
--- a/drivers/power/apm_power.c
+++ b/drivers/power/apm_power.c
@@ -48,8 +48,6 @@ static void find_main_battery(void)
48 } 48 }
49 if (!main_battery) 49 if (!main_battery)
50 main_battery = batm; 50 main_battery = batm;
51
52 return;
53} 51}
54 52
55static int calculate_time(int status) 53static int calculate_time(int status)
@@ -218,7 +216,6 @@ static void apm_battery_apm_get_power_status(struct apm_power_info *info)
218 } 216 }
219 217
220 up(&power_supply_class->sem); 218 up(&power_supply_class->sem);
221 return;
222} 219}
223 220
224static int __init apm_battery_init(void) 221static int __init apm_battery_init(void)
@@ -232,7 +229,6 @@ static int __init apm_battery_init(void)
232static void __exit apm_battery_exit(void) 229static void __exit apm_battery_exit(void)
233{ 230{
234 apm_get_power_status = NULL; 231 apm_get_power_status = NULL;
235 return;
236} 232}
237 233
238module_init(apm_battery_init); 234module_init(apm_battery_init);
diff --git a/drivers/power/ds2760_battery.c b/drivers/power/ds2760_battery.c
index 00e1ea6f1de2..be7021ee3611 100644
--- a/drivers/power/ds2760_battery.c
+++ b/drivers/power/ds2760_battery.c
@@ -254,8 +254,6 @@ static void ds2760_battery_update_status(struct ds2760_device_info *di)
254 254
255 if (di->charge_status != old_charge_status) 255 if (di->charge_status != old_charge_status)
256 power_supply_changed(&di->bat); 256 power_supply_changed(&di->bat);
257
258 return;
259} 257}
260 258
261static void ds2760_battery_work(struct work_struct *work) 259static void ds2760_battery_work(struct work_struct *work)
@@ -268,8 +266,6 @@ static void ds2760_battery_work(struct work_struct *work)
268 266
269 ds2760_battery_update_status(di); 267 ds2760_battery_update_status(di);
270 queue_delayed_work(di->monitor_wqueue, &di->monitor_work, interval); 268 queue_delayed_work(di->monitor_wqueue, &di->monitor_work, interval);
271
272 return;
273} 269}
274 270
275#define to_ds2760_device_info(x) container_of((x), struct ds2760_device_info, \ 271#define to_ds2760_device_info(x) container_of((x), struct ds2760_device_info, \
@@ -283,8 +279,6 @@ static void ds2760_battery_external_power_changed(struct power_supply *psy)
283 279
284 cancel_delayed_work(&di->monitor_work); 280 cancel_delayed_work(&di->monitor_work);
285 queue_delayed_work(di->monitor_wqueue, &di->monitor_work, HZ/10); 281 queue_delayed_work(di->monitor_wqueue, &di->monitor_work, HZ/10);
286
287 return;
288} 282}
289 283
290static int ds2760_battery_get_property(struct power_supply *psy, 284static int ds2760_battery_get_property(struct power_supply *psy,
@@ -457,7 +451,6 @@ static int __init ds2760_battery_init(void)
457static void __exit ds2760_battery_exit(void) 451static void __exit ds2760_battery_exit(void)
458{ 452{
459 platform_driver_unregister(&ds2760_battery_driver); 453 platform_driver_unregister(&ds2760_battery_driver);
460 return;
461} 454}
462 455
463module_init(ds2760_battery_init); 456module_init(ds2760_battery_init);
diff --git a/drivers/power/olpc_battery.c b/drivers/power/olpc_battery.c
index 878684df7667..c998e68d060f 100644
--- a/drivers/power/olpc_battery.c
+++ b/drivers/power/olpc_battery.c
@@ -341,7 +341,6 @@ static void __exit olpc_bat_exit(void)
341 power_supply_unregister(&olpc_bat); 341 power_supply_unregister(&olpc_bat);
342 power_supply_unregister(&olpc_ac); 342 power_supply_unregister(&olpc_ac);
343 platform_device_unregister(bat_pdev); 343 platform_device_unregister(bat_pdev);
344 return;
345} 344}
346 345
347module_init(olpc_bat_init); 346module_init(olpc_bat_init);
diff --git a/drivers/power/pda_power.c b/drivers/power/pda_power.c
index cdc28923e0ce..c058f285be1a 100644
--- a/drivers/power/pda_power.c
+++ b/drivers/power/pda_power.c
@@ -97,8 +97,6 @@ static void update_charger(void)
97 dev_dbg(dev, "charger off\n"); 97 dev_dbg(dev, "charger off\n");
98 pdata->set_charge(0); 98 pdata->set_charge(0);
99 } 99 }
100
101 return;
102} 100}
103 101
104static void supply_timer_func(unsigned long power_supply_ptr) 102static void supply_timer_func(unsigned long power_supply_ptr)
@@ -106,7 +104,6 @@ static void supply_timer_func(unsigned long power_supply_ptr)
106 void *power_supply = (void *)power_supply_ptr; 104 void *power_supply = (void *)power_supply_ptr;
107 105
108 power_supply_changed(power_supply); 106 power_supply_changed(power_supply);
109 return;
110} 107}
111 108
112static void charger_timer_func(unsigned long power_supply_ptr) 109static void charger_timer_func(unsigned long power_supply_ptr)
@@ -118,7 +115,6 @@ static void charger_timer_func(unsigned long power_supply_ptr)
118 supply_timer.data = power_supply_ptr; 115 supply_timer.data = power_supply_ptr;
119 mod_timer(&supply_timer, 116 mod_timer(&supply_timer,
120 jiffies + msecs_to_jiffies(pdata->wait_for_charger)); 117 jiffies + msecs_to_jiffies(pdata->wait_for_charger));
121 return;
122} 118}
123 119
124static irqreturn_t power_changed_isr(int irq, void *power_supply) 120static irqreturn_t power_changed_isr(int irq, void *power_supply)
@@ -251,7 +247,6 @@ static int __init pda_power_init(void)
251static void __exit pda_power_exit(void) 247static void __exit pda_power_exit(void)
252{ 248{
253 platform_driver_unregister(&pda_power_pdrv); 249 platform_driver_unregister(&pda_power_pdrv);
254 return;
255} 250}
256 251
257module_init(pda_power_init); 252module_init(pda_power_init);
diff --git a/drivers/power/pmu_battery.c b/drivers/power/pmu_battery.c
index 2fea4af0e40a..60a8cf3a0431 100644
--- a/drivers/power/pmu_battery.c
+++ b/drivers/power/pmu_battery.c
@@ -203,8 +203,6 @@ static void __exit pmu_bat_exit(void)
203 } 203 }
204 power_supply_unregister(&pmu_ac); 204 power_supply_unregister(&pmu_ac);
205 platform_device_unregister(bat_pdev); 205 platform_device_unregister(bat_pdev);
206
207 return;
208} 206}
209 207
210module_init(pmu_bat_init); 208module_init(pmu_bat_init);
diff --git a/drivers/power/power_supply_core.c b/drivers/power/power_supply_core.c
index e87ea5156755..a63b75cf75e2 100644
--- a/drivers/power/power_supply_core.c
+++ b/drivers/power/power_supply_core.c
@@ -46,8 +46,6 @@ static void power_supply_changed_work(struct work_struct *work)
46 power_supply_update_leds(psy); 46 power_supply_update_leds(psy);
47 47
48 kobject_uevent(&psy->dev->kobj, KOBJ_CHANGE); 48 kobject_uevent(&psy->dev->kobj, KOBJ_CHANGE);
49
50 return;
51} 49}
52 50
53void power_supply_changed(struct power_supply *psy) 51void power_supply_changed(struct power_supply *psy)
@@ -55,8 +53,6 @@ void power_supply_changed(struct power_supply *psy)
55 dev_dbg(psy->dev, "%s\n", __FUNCTION__); 53 dev_dbg(psy->dev, "%s\n", __FUNCTION__);
56 54
57 schedule_work(&psy->changed_work); 55 schedule_work(&psy->changed_work);
58
59 return;
60} 56}
61 57
62int power_supply_am_i_supplied(struct power_supply *psy) 58int power_supply_am_i_supplied(struct power_supply *psy)
@@ -129,7 +125,6 @@ void power_supply_unregister(struct power_supply *psy)
129 power_supply_remove_triggers(psy); 125 power_supply_remove_triggers(psy);
130 power_supply_remove_attrs(psy); 126 power_supply_remove_attrs(psy);
131 device_unregister(psy->dev); 127 device_unregister(psy->dev);
132 return;
133} 128}
134 129
135static int __init power_supply_class_init(void) 130static int __init power_supply_class_init(void)
@@ -147,7 +142,6 @@ static int __init power_supply_class_init(void)
147static void __exit power_supply_class_exit(void) 142static void __exit power_supply_class_exit(void)
148{ 143{
149 class_destroy(power_supply_class); 144 class_destroy(power_supply_class);
150 return;
151} 145}
152 146
153EXPORT_SYMBOL_GPL(power_supply_changed); 147EXPORT_SYMBOL_GPL(power_supply_changed);
diff --git a/drivers/power/power_supply_leds.c b/drivers/power/power_supply_leds.c
index 7232490bb595..7f8f3590b02e 100644
--- a/drivers/power/power_supply_leds.c
+++ b/drivers/power/power_supply_leds.c
@@ -40,8 +40,6 @@ static void power_supply_update_bat_leds(struct power_supply *psy)
40 led_trigger_event(psy->full_trig, LED_OFF); 40 led_trigger_event(psy->full_trig, LED_OFF);
41 break; 41 break;
42 } 42 }
43
44 return;
45} 43}
46 44
47static int power_supply_create_bat_triggers(struct power_supply *psy) 45static int power_supply_create_bat_triggers(struct power_supply *psy)
@@ -97,7 +95,6 @@ static void power_supply_remove_bat_triggers(struct power_supply *psy)
97 kfree(psy->full_trig_name); 95 kfree(psy->full_trig_name);
98 kfree(psy->charging_trig_name); 96 kfree(psy->charging_trig_name);
99 kfree(psy->charging_full_trig_name); 97 kfree(psy->charging_full_trig_name);
100 return;
101} 98}
102 99
103/* Generated power specific LEDs triggers. */ 100/* Generated power specific LEDs triggers. */
@@ -115,8 +112,6 @@ static void power_supply_update_gen_leds(struct power_supply *psy)
115 led_trigger_event(psy->online_trig, LED_FULL); 112 led_trigger_event(psy->online_trig, LED_FULL);
116 else 113 else
117 led_trigger_event(psy->online_trig, LED_OFF); 114 led_trigger_event(psy->online_trig, LED_OFF);
118
119 return;
120} 115}
121 116
122static int power_supply_create_gen_triggers(struct power_supply *psy) 117static int power_supply_create_gen_triggers(struct power_supply *psy)
@@ -145,7 +140,6 @@ static void power_supply_remove_gen_triggers(struct power_supply *psy)
145{ 140{
146 led_trigger_unregister_simple(psy->online_trig); 141 led_trigger_unregister_simple(psy->online_trig);
147 kfree(psy->online_trig_name); 142 kfree(psy->online_trig_name);
148 return;
149} 143}
150 144
151/* Choice what triggers to create&update. */ 145/* Choice what triggers to create&update. */
@@ -156,7 +150,6 @@ void power_supply_update_leds(struct power_supply *psy)
156 power_supply_update_bat_leds(psy); 150 power_supply_update_bat_leds(psy);
157 else 151 else
158 power_supply_update_gen_leds(psy); 152 power_supply_update_gen_leds(psy);
159 return;
160} 153}
161 154
162int power_supply_create_triggers(struct power_supply *psy) 155int power_supply_create_triggers(struct power_supply *psy)
@@ -172,5 +165,4 @@ void power_supply_remove_triggers(struct power_supply *psy)
172 power_supply_remove_bat_triggers(psy); 165 power_supply_remove_bat_triggers(psy);
173 else 166 else
174 power_supply_remove_gen_triggers(psy); 167 power_supply_remove_gen_triggers(psy);
175 return;
176} 168}
diff --git a/drivers/power/power_supply_sysfs.c b/drivers/power/power_supply_sysfs.c
index c07d4258d347..c7c4574729b1 100644
--- a/drivers/power/power_supply_sysfs.c
+++ b/drivers/power/power_supply_sysfs.c
@@ -176,8 +176,6 @@ void power_supply_remove_attrs(struct power_supply *psy)
176 for (i = 0; i < psy->num_properties; i++) 176 for (i = 0; i < psy->num_properties; i++)
177 device_remove_file(psy->dev, 177 device_remove_file(psy->dev,
178 &power_supply_attrs[psy->properties[i]]); 178 &power_supply_attrs[psy->properties[i]]);
179
180 return;
181} 179}
182 180
183static char *kstruprdup(const char *str, gfp_t gfp) 181static char *kstruprdup(const char *str, gfp_t gfp)
diff --git a/drivers/w1/slaves/w1_ds2760.c b/drivers/w1/slaves/w1_ds2760.c
index 88a37fbccc3f..15e7f9af3bc3 100644
--- a/drivers/w1/slaves/w1_ds2760.c
+++ b/drivers/w1/slaves/w1_ds2760.c
@@ -121,8 +121,6 @@ static void release_bat_id(int id)
121 mutex_lock(&bat_idr_lock); 121 mutex_lock(&bat_idr_lock);
122 idr_remove(&bat_idr, id); 122 idr_remove(&bat_idr, id);
123 mutex_unlock(&bat_idr_lock); 123 mutex_unlock(&bat_idr_lock);
124
125 return;
126} 124}
127 125
128static int w1_ds2760_add_slave(struct w1_slave *sl) 126static int w1_ds2760_add_slave(struct w1_slave *sl)
@@ -174,8 +172,6 @@ static void w1_ds2760_remove_slave(struct w1_slave *sl)
174 platform_device_unregister(pdev); 172 platform_device_unregister(pdev);
175 release_bat_id(id); 173 release_bat_id(id);
176 sysfs_remove_bin_file(&sl->dev.kobj, &w1_ds2760_bin_attr); 174 sysfs_remove_bin_file(&sl->dev.kobj, &w1_ds2760_bin_attr);
177
178 return;
179} 175}
180 176
181static struct w1_family_ops w1_ds2760_fops = { 177static struct w1_family_ops w1_ds2760_fops = {