diff options
author | Len Brown <len.brown@intel.com> | 2006-07-01 16:48:23 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2006-07-01 16:48:23 -0400 |
commit | 635227ee89929a6e2920fc8aa1cd48f7225d3d93 (patch) | |
tree | b40e81898310a364ca7be378f42212e06dd71238 /drivers/acpi | |
parent | 3f86b83243d59bb50caf5938d284d22e10d082a4 (diff) |
ACPI: remove function tracing macros from drivers/acpi/*.c
a few invocations appeared due to the SBS and other patches.
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi')
-rw-r--r-- | drivers/acpi/cm_sbs.c | 14 | ||||
-rw-r--r-- | drivers/acpi/i2c_ec.c | 34 | ||||
-rw-r--r-- | drivers/acpi/numa.c | 4 | ||||
-rw-r--r-- | drivers/acpi/sbs.c | 142 |
4 files changed, 56 insertions, 138 deletions
diff --git a/drivers/acpi/cm_sbs.c b/drivers/acpi/cm_sbs.c index d11507c7b8a4..574a75a166c5 100644 --- a/drivers/acpi/cm_sbs.c +++ b/drivers/acpi/cm_sbs.c | |||
@@ -46,7 +46,6 @@ static int lock_battery_dir_cnt = 0; | |||
46 | 46 | ||
47 | struct proc_dir_entry *acpi_lock_ac_dir(void) | 47 | struct proc_dir_entry *acpi_lock_ac_dir(void) |
48 | { | 48 | { |
49 | ACPI_FUNCTION_TRACE("acpi_lock_ac_dir"); | ||
50 | 49 | ||
51 | down(&cm_sbs_sem); | 50 | down(&cm_sbs_sem); |
52 | if (!acpi_ac_dir) { | 51 | if (!acpi_ac_dir) { |
@@ -59,14 +58,13 @@ struct proc_dir_entry *acpi_lock_ac_dir(void) | |||
59 | "Cannot create %s\n", ACPI_AC_CLASS)); | 58 | "Cannot create %s\n", ACPI_AC_CLASS)); |
60 | } | 59 | } |
61 | up(&cm_sbs_sem); | 60 | up(&cm_sbs_sem); |
62 | return (acpi_ac_dir); | 61 | return acpi_ac_dir; |
63 | } | 62 | } |
64 | 63 | ||
65 | EXPORT_SYMBOL(acpi_lock_ac_dir); | 64 | EXPORT_SYMBOL(acpi_lock_ac_dir); |
66 | 65 | ||
67 | void acpi_unlock_ac_dir(struct proc_dir_entry *acpi_ac_dir_param) | 66 | void acpi_unlock_ac_dir(struct proc_dir_entry *acpi_ac_dir_param) |
68 | { | 67 | { |
69 | ACPI_FUNCTION_TRACE("acpi_unlock_ac_dir"); | ||
70 | 68 | ||
71 | down(&cm_sbs_sem); | 69 | down(&cm_sbs_sem); |
72 | if (acpi_ac_dir_param) { | 70 | if (acpi_ac_dir_param) { |
@@ -83,7 +81,6 @@ EXPORT_SYMBOL(acpi_unlock_ac_dir); | |||
83 | 81 | ||
84 | struct proc_dir_entry *acpi_lock_battery_dir(void) | 82 | struct proc_dir_entry *acpi_lock_battery_dir(void) |
85 | { | 83 | { |
86 | ACPI_FUNCTION_TRACE("acpi_lock_battery_dir"); | ||
87 | 84 | ||
88 | down(&cm_sbs_sem); | 85 | down(&cm_sbs_sem); |
89 | if (!acpi_battery_dir) { | 86 | if (!acpi_battery_dir) { |
@@ -97,14 +94,13 @@ struct proc_dir_entry *acpi_lock_battery_dir(void) | |||
97 | "Cannot create %s\n", ACPI_BATTERY_CLASS)); | 94 | "Cannot create %s\n", ACPI_BATTERY_CLASS)); |
98 | } | 95 | } |
99 | up(&cm_sbs_sem); | 96 | up(&cm_sbs_sem); |
100 | return (acpi_battery_dir); | 97 | return acpi_battery_dir; |
101 | } | 98 | } |
102 | 99 | ||
103 | EXPORT_SYMBOL(acpi_lock_battery_dir); | 100 | EXPORT_SYMBOL(acpi_lock_battery_dir); |
104 | 101 | ||
105 | void acpi_unlock_battery_dir(struct proc_dir_entry *acpi_battery_dir_param) | 102 | void acpi_unlock_battery_dir(struct proc_dir_entry *acpi_battery_dir_param) |
106 | { | 103 | { |
107 | ACPI_FUNCTION_TRACE("acpi_unlock_battery_dir"); | ||
108 | 104 | ||
109 | down(&cm_sbs_sem); | 105 | down(&cm_sbs_sem); |
110 | if (acpi_battery_dir_param) { | 106 | if (acpi_battery_dir_param) { |
@@ -116,20 +112,20 @@ void acpi_unlock_battery_dir(struct proc_dir_entry *acpi_battery_dir_param) | |||
116 | acpi_battery_dir = 0; | 112 | acpi_battery_dir = 0; |
117 | } | 113 | } |
118 | up(&cm_sbs_sem); | 114 | up(&cm_sbs_sem); |
115 | return; | ||
119 | } | 116 | } |
120 | 117 | ||
121 | EXPORT_SYMBOL(acpi_unlock_battery_dir); | 118 | EXPORT_SYMBOL(acpi_unlock_battery_dir); |
122 | 119 | ||
123 | static int __init acpi_cm_sbs_init(void) | 120 | static int __init acpi_cm_sbs_init(void) |
124 | { | 121 | { |
125 | ACPI_FUNCTION_TRACE("acpi_cm_sbs_init"); | ||
126 | 122 | ||
127 | if (acpi_disabled) | 123 | if (acpi_disabled) |
128 | return_VALUE(0); | 124 | return 0; |
129 | 125 | ||
130 | init_MUTEX(&cm_sbs_sem); | 126 | init_MUTEX(&cm_sbs_sem); |
131 | 127 | ||
132 | return_VALUE(0); | 128 | return 0; |
133 | } | 129 | } |
134 | 130 | ||
135 | subsys_initcall(acpi_cm_sbs_init); | 131 | subsys_initcall(acpi_cm_sbs_init); |
diff --git a/drivers/acpi/i2c_ec.c b/drivers/acpi/i2c_ec.c index 72478a665c8c..84239d51dc0c 100644 --- a/drivers/acpi/i2c_ec.c +++ b/drivers/acpi/i2c_ec.c | |||
@@ -115,8 +115,6 @@ static int acpi_ec_smb_read(struct acpi_ec_smbus *smbus, u8 address, u8 * data) | |||
115 | u8 val; | 115 | u8 val; |
116 | int err; | 116 | int err; |
117 | 117 | ||
118 | ACPI_FUNCTION_TRACE("acpi_ec_smb_read"); | ||
119 | |||
120 | err = ec_read(smbus->base + address, &val); | 118 | err = ec_read(smbus->base + address, &val); |
121 | if (!err) { | 119 | if (!err) { |
122 | *data = val; | 120 | *data = val; |
@@ -129,8 +127,6 @@ static int acpi_ec_smb_write(struct acpi_ec_smbus *smbus, u8 address, u8 data) | |||
129 | { | 127 | { |
130 | int err; | 128 | int err; |
131 | 129 | ||
132 | ACPI_FUNCTION_TRACE("acpi_ec_smb_write"); | ||
133 | |||
134 | err = ec_write(smbus->base + address, data); | 130 | err = ec_write(smbus->base + address, data); |
135 | return (err); | 131 | return (err); |
136 | } | 132 | } |
@@ -144,8 +140,6 @@ acpi_ec_smb_access(struct i2c_adapter *adap, u16 addr, unsigned short flags, | |||
144 | unsigned char protocol, len = 0, pec, temp[2] = { 0, 0 }; | 140 | unsigned char protocol, len = 0, pec, temp[2] = { 0, 0 }; |
145 | int i; | 141 | int i; |
146 | 142 | ||
147 | ACPI_FUNCTION_TRACE("acpi_ec_smb_access"); | ||
148 | |||
149 | if (read_write == I2C_SMBUS_READ) { | 143 | if (read_write == I2C_SMBUS_READ) { |
150 | protocol = ACPI_EC_SMB_PRTCL_READ; | 144 | protocol = ACPI_EC_SMB_PRTCL_READ; |
151 | } else { | 145 | } else { |
@@ -290,7 +284,6 @@ acpi_ec_smb_access(struct i2c_adapter *adap, u16 addr, unsigned short flags, | |||
290 | 284 | ||
291 | static u32 acpi_ec_smb_func(struct i2c_adapter *adapter) | 285 | static u32 acpi_ec_smb_func(struct i2c_adapter *adapter) |
292 | { | 286 | { |
293 | ACPI_FUNCTION_TRACE("acpi_ec_smb_func"); | ||
294 | 287 | ||
295 | return (I2C_FUNC_SMBUS_QUICK | I2C_FUNC_SMBUS_BYTE | | 288 | return (I2C_FUNC_SMBUS_QUICK | I2C_FUNC_SMBUS_BYTE | |
296 | I2C_FUNC_SMBUS_BYTE_DATA | I2C_FUNC_SMBUS_WORD_DATA | | 289 | I2C_FUNC_SMBUS_BYTE_DATA | I2C_FUNC_SMBUS_WORD_DATA | |
@@ -312,22 +305,20 @@ static int acpi_ec_hc_add(struct acpi_device *device) | |||
312 | struct acpi_ec_hc *ec_hc; | 305 | struct acpi_ec_hc *ec_hc; |
313 | struct acpi_ec_smbus *smbus; | 306 | struct acpi_ec_smbus *smbus; |
314 | 307 | ||
315 | ACPI_FUNCTION_TRACE("acpi_ec_hc_add"); | ||
316 | |||
317 | if (!device) { | 308 | if (!device) { |
318 | return_VALUE(-EINVAL); | 309 | return -EINVAL; |
319 | } | 310 | } |
320 | 311 | ||
321 | ec_hc = kmalloc(sizeof(struct acpi_ec_hc), GFP_KERNEL); | 312 | ec_hc = kmalloc(sizeof(struct acpi_ec_hc), GFP_KERNEL); |
322 | if (!ec_hc) { | 313 | if (!ec_hc) { |
323 | return_VALUE(-ENOMEM); | 314 | return -ENOMEM; |
324 | } | 315 | } |
325 | memset(ec_hc, 0, sizeof(struct acpi_ec_hc)); | 316 | memset(ec_hc, 0, sizeof(struct acpi_ec_hc)); |
326 | 317 | ||
327 | smbus = kmalloc(sizeof(struct acpi_ec_smbus), GFP_KERNEL); | 318 | smbus = kmalloc(sizeof(struct acpi_ec_smbus), GFP_KERNEL); |
328 | if (!smbus) { | 319 | if (!smbus) { |
329 | kfree(ec_hc); | 320 | kfree(ec_hc); |
330 | return_VALUE(-ENOMEM); | 321 | return -ENOMEM; |
331 | } | 322 | } |
332 | memset(smbus, 0, sizeof(struct acpi_ec_smbus)); | 323 | memset(smbus, 0, sizeof(struct acpi_ec_smbus)); |
333 | 324 | ||
@@ -341,7 +332,7 @@ static int acpi_ec_hc_add(struct acpi_device *device) | |||
341 | ACPI_DEBUG_PRINT((ACPI_DB_WARN, "Error obtaining _EC\n")); | 332 | ACPI_DEBUG_PRINT((ACPI_DB_WARN, "Error obtaining _EC\n")); |
342 | kfree(ec_hc->smbus); | 333 | kfree(ec_hc->smbus); |
343 | kfree(smbus); | 334 | kfree(smbus); |
344 | return_VALUE(-EIO); | 335 | return -EIO; |
345 | } | 336 | } |
346 | 337 | ||
347 | smbus->ec = acpi_driver_data(device->parent); | 338 | smbus->ec = acpi_driver_data(device->parent); |
@@ -357,7 +348,7 @@ static int acpi_ec_hc_add(struct acpi_device *device) | |||
357 | "EC SMBus adapter: Failed to register adapter\n")); | 348 | "EC SMBus adapter: Failed to register adapter\n")); |
358 | kfree(smbus); | 349 | kfree(smbus); |
359 | kfree(ec_hc); | 350 | kfree(ec_hc); |
360 | return_VALUE(-EIO); | 351 | return -EIO; |
361 | } | 352 | } |
362 | 353 | ||
363 | ec_hc->smbus = smbus; | 354 | ec_hc->smbus = smbus; |
@@ -365,17 +356,15 @@ static int acpi_ec_hc_add(struct acpi_device *device) | |||
365 | printk(KERN_INFO PREFIX "%s [%s]\n", | 356 | printk(KERN_INFO PREFIX "%s [%s]\n", |
366 | acpi_device_name(device), acpi_device_bid(device)); | 357 | acpi_device_name(device), acpi_device_bid(device)); |
367 | 358 | ||
368 | return_VALUE(AE_OK); | 359 | return AE_OK; |
369 | } | 360 | } |
370 | 361 | ||
371 | static int acpi_ec_hc_remove(struct acpi_device *device, int type) | 362 | static int acpi_ec_hc_remove(struct acpi_device *device, int type) |
372 | { | 363 | { |
373 | struct acpi_ec_hc *ec_hc; | 364 | struct acpi_ec_hc *ec_hc; |
374 | 365 | ||
375 | ACPI_FUNCTION_TRACE("acpi_ec_hc_remove"); | ||
376 | |||
377 | if (!device) { | 366 | if (!device) { |
378 | return_VALUE(-EINVAL); | 367 | return -EINVAL; |
379 | } | 368 | } |
380 | ec_hc = acpi_driver_data(device); | 369 | ec_hc = acpi_driver_data(device); |
381 | 370 | ||
@@ -383,30 +372,27 @@ static int acpi_ec_hc_remove(struct acpi_device *device, int type) | |||
383 | kfree(ec_hc->smbus); | 372 | kfree(ec_hc->smbus); |
384 | kfree(ec_hc); | 373 | kfree(ec_hc); |
385 | 374 | ||
386 | return_VALUE(AE_OK); | 375 | return AE_OK; |
387 | } | 376 | } |
388 | 377 | ||
389 | static int __init acpi_ec_hc_init(void) | 378 | static int __init acpi_ec_hc_init(void) |
390 | { | 379 | { |
391 | int result; | 380 | int result; |
392 | 381 | ||
393 | ACPI_FUNCTION_TRACE("acpi_ec_hc_init"); | ||
394 | result = acpi_bus_register_driver(&acpi_ec_hc_driver); | 382 | result = acpi_bus_register_driver(&acpi_ec_hc_driver); |
395 | if (result < 0) { | 383 | if (result < 0) { |
396 | return_VALUE(-ENODEV); | 384 | return -ENODEV; |
397 | } | 385 | } |
398 | return_VALUE(0); | 386 | return 0; |
399 | } | 387 | } |
400 | 388 | ||
401 | static void __exit acpi_ec_hc_exit(void) | 389 | static void __exit acpi_ec_hc_exit(void) |
402 | { | 390 | { |
403 | ACPI_FUNCTION_TRACE("acpi_ec_hc_exit"); | ||
404 | acpi_bus_unregister_driver(&acpi_ec_hc_driver); | 391 | acpi_bus_unregister_driver(&acpi_ec_hc_driver); |
405 | } | 392 | } |
406 | 393 | ||
407 | struct acpi_ec_hc *acpi_get_ec_hc(struct acpi_device *device) | 394 | struct acpi_ec_hc *acpi_get_ec_hc(struct acpi_device *device) |
408 | { | 395 | { |
409 | ACPI_FUNCTION_TRACE("acpi_get_ec_hc"); | ||
410 | return ((struct acpi_ec_hc *)acpi_driver_data(device->parent)); | 396 | return ((struct acpi_ec_hc *)acpi_driver_data(device->parent)); |
411 | } | 397 | } |
412 | 398 | ||
diff --git a/drivers/acpi/numa.c b/drivers/acpi/numa.c index 4d622981f61a..e5e448edca41 100644 --- a/drivers/acpi/numa.c +++ b/drivers/acpi/numa.c | |||
@@ -259,12 +259,10 @@ int acpi_get_node(acpi_handle *handle) | |||
259 | { | 259 | { |
260 | int pxm, node = -1; | 260 | int pxm, node = -1; |
261 | 261 | ||
262 | ACPI_FUNCTION_TRACE("acpi_get_node"); | ||
263 | |||
264 | pxm = acpi_get_pxm(handle); | 262 | pxm = acpi_get_pxm(handle); |
265 | if (pxm >= 0) | 263 | if (pxm >= 0) |
266 | node = acpi_map_pxm_to_node(pxm); | 264 | node = acpi_map_pxm_to_node(pxm); |
267 | 265 | ||
268 | return_VALUE(node); | 266 | return node; |
269 | } | 267 | } |
270 | EXPORT_SYMBOL(acpi_get_node); | 268 | EXPORT_SYMBOL(acpi_get_node); |
diff --git a/drivers/acpi/sbs.c b/drivers/acpi/sbs.c index 8bebcebff5f0..db7b350a5035 100644 --- a/drivers/acpi/sbs.c +++ b/drivers/acpi/sbs.c | |||
@@ -187,8 +187,6 @@ static void acpi_battery_smbus_err_handler(struct acpi_ec_smbus *smbus) | |||
187 | char *err_str; | 187 | char *err_str; |
188 | int err_number; | 188 | int err_number; |
189 | 189 | ||
190 | ACPI_FUNCTION_TRACE("acpi_battery_smbus_err_handler"); | ||
191 | |||
192 | data.word = 0; | 190 | data.word = 0; |
193 | 191 | ||
194 | result = smbus->adapter.algo-> | 192 | result = smbus->adapter.algo-> |
@@ -239,8 +237,6 @@ acpi_sbs_smbus_read_word(struct acpi_ec_smbus *smbus, int addr, int func, | |||
239 | int result = 0; | 237 | int result = 0; |
240 | int i; | 238 | int i; |
241 | 239 | ||
242 | ACPI_FUNCTION_TRACE("acpi_sbs_smbus_read_word"); | ||
243 | |||
244 | if (err_handler == NULL) { | 240 | if (err_handler == NULL) { |
245 | err_handler = acpi_battery_smbus_err_handler; | 241 | err_handler = acpi_battery_smbus_err_handler; |
246 | } | 242 | } |
@@ -263,7 +259,7 @@ acpi_sbs_smbus_read_word(struct acpi_ec_smbus *smbus, int addr, int func, | |||
263 | } | 259 | } |
264 | } | 260 | } |
265 | 261 | ||
266 | return_VALUE(result); | 262 | return result; |
267 | } | 263 | } |
268 | 264 | ||
269 | static int | 265 | static int |
@@ -275,8 +271,6 @@ acpi_sbs_smbus_read_str(struct acpi_ec_smbus *smbus, int addr, int func, | |||
275 | int result = 0; | 271 | int result = 0; |
276 | int i; | 272 | int i; |
277 | 273 | ||
278 | ACPI_FUNCTION_TRACE("acpi_sbs_smbus_read_str"); | ||
279 | |||
280 | if (err_handler == NULL) { | 274 | if (err_handler == NULL) { |
281 | err_handler = acpi_battery_smbus_err_handler; | 275 | err_handler = acpi_battery_smbus_err_handler; |
282 | } | 276 | } |
@@ -302,7 +296,7 @@ acpi_sbs_smbus_read_str(struct acpi_ec_smbus *smbus, int addr, int func, | |||
302 | } | 296 | } |
303 | } | 297 | } |
304 | 298 | ||
305 | return_VALUE(result); | 299 | return result; |
306 | } | 300 | } |
307 | 301 | ||
308 | static int | 302 | static int |
@@ -314,8 +308,6 @@ acpi_sbs_smbus_write_word(struct acpi_ec_smbus *smbus, int addr, int func, | |||
314 | int result = 0; | 308 | int result = 0; |
315 | int i; | 309 | int i; |
316 | 310 | ||
317 | ACPI_FUNCTION_TRACE("acpi_sbs_smbus_write_word"); | ||
318 | |||
319 | if (err_handler == NULL) { | 311 | if (err_handler == NULL) { |
320 | err_handler = acpi_battery_smbus_err_handler; | 312 | err_handler = acpi_battery_smbus_err_handler; |
321 | } | 313 | } |
@@ -339,7 +331,7 @@ acpi_sbs_smbus_write_word(struct acpi_ec_smbus *smbus, int addr, int func, | |||
339 | } | 331 | } |
340 | } | 332 | } |
341 | 333 | ||
342 | return_VALUE(result); | 334 | return result; |
343 | } | 335 | } |
344 | 336 | ||
345 | /* -------------------------------------------------------------------------- | 337 | /* -------------------------------------------------------------------------- |
@@ -355,8 +347,6 @@ static int acpi_sbs_generate_event(struct acpi_device *device, | |||
355 | char class_saved[20]; | 347 | char class_saved[20]; |
356 | int result = 0; | 348 | int result = 0; |
357 | 349 | ||
358 | ACPI_FUNCTION_TRACE("acpi_sbs_generate_event"); | ||
359 | |||
360 | strcpy(bid_saved, acpi_device_bid(device)); | 350 | strcpy(bid_saved, acpi_device_bid(device)); |
361 | strcpy(class_saved, acpi_device_class(device)); | 351 | strcpy(class_saved, acpi_device_class(device)); |
362 | 352 | ||
@@ -368,7 +358,7 @@ static int acpi_sbs_generate_event(struct acpi_device *device, | |||
368 | strcpy(acpi_device_bid(device), bid_saved); | 358 | strcpy(acpi_device_bid(device), bid_saved); |
369 | strcpy(acpi_device_class(device), class_saved); | 359 | strcpy(acpi_device_class(device), class_saved); |
370 | 360 | ||
371 | return_VALUE(result); | 361 | return result; |
372 | } | 362 | } |
373 | 363 | ||
374 | static int acpi_battery_get_present(struct acpi_battery *battery) | 364 | static int acpi_battery_get_present(struct acpi_battery *battery) |
@@ -377,8 +367,6 @@ static int acpi_battery_get_present(struct acpi_battery *battery) | |||
377 | int result = 0; | 367 | int result = 0; |
378 | int is_present = 0; | 368 | int is_present = 0; |
379 | 369 | ||
380 | ACPI_FUNCTION_TRACE("acpi_battery_get_present"); | ||
381 | |||
382 | result = acpi_sbs_smbus_read_word(battery->sbs->smbus, | 370 | result = acpi_sbs_smbus_read_word(battery->sbs->smbus, |
383 | ACPI_SBSM_SMBUS_ADDR, 0x01, | 371 | ACPI_SBSM_SMBUS_ADDR, 0x01, |
384 | &state, NULL); | 372 | &state, NULL); |
@@ -391,7 +379,7 @@ static int acpi_battery_get_present(struct acpi_battery *battery) | |||
391 | } | 379 | } |
392 | battery->battery_present = is_present; | 380 | battery->battery_present = is_present; |
393 | 381 | ||
394 | return_VALUE(result); | 382 | return result; |
395 | } | 383 | } |
396 | 384 | ||
397 | static int acpi_battery_is_present(struct acpi_battery *battery) | 385 | static int acpi_battery_is_present(struct acpi_battery *battery) |
@@ -411,8 +399,6 @@ static int acpi_battery_select(struct acpi_battery *battery) | |||
411 | s16 state; | 399 | s16 state; |
412 | int foo; | 400 | int foo; |
413 | 401 | ||
414 | ACPI_FUNCTION_TRACE("acpi_battery_select"); | ||
415 | |||
416 | if (battery->sbs->sbsm_present) { | 402 | if (battery->sbs->sbsm_present) { |
417 | 403 | ||
418 | /* Take special care not to knobble other nibbles of | 404 | /* Take special care not to knobble other nibbles of |
@@ -440,7 +426,7 @@ static int acpi_battery_select(struct acpi_battery *battery) | |||
440 | } | 426 | } |
441 | 427 | ||
442 | end: | 428 | end: |
443 | return_VALUE(result); | 429 | return result; |
444 | } | 430 | } |
445 | 431 | ||
446 | static int acpi_sbsm_get_info(struct acpi_sbs *sbs) | 432 | static int acpi_sbsm_get_info(struct acpi_sbs *sbs) |
@@ -449,8 +435,6 @@ static int acpi_sbsm_get_info(struct acpi_sbs *sbs) | |||
449 | int result = 0; | 435 | int result = 0; |
450 | s16 battery_system_info; | 436 | s16 battery_system_info; |
451 | 437 | ||
452 | ACPI_FUNCTION_TRACE("acpi_sbsm_get_info"); | ||
453 | |||
454 | result = acpi_sbs_smbus_read_word(smbus, ACPI_SBSM_SMBUS_ADDR, 0x04, | 438 | result = acpi_sbs_smbus_read_word(smbus, ACPI_SBSM_SMBUS_ADDR, 0x04, |
455 | &battery_system_info, NULL); | 439 | &battery_system_info, NULL); |
456 | if (result) { | 440 | if (result) { |
@@ -463,7 +447,7 @@ static int acpi_sbsm_get_info(struct acpi_sbs *sbs) | |||
463 | 447 | ||
464 | end: | 448 | end: |
465 | 449 | ||
466 | return_VALUE(result); | 450 | return result; |
467 | } | 451 | } |
468 | 452 | ||
469 | static int acpi_battery_get_info(struct acpi_battery *battery) | 453 | static int acpi_battery_get_info(struct acpi_battery *battery) |
@@ -473,8 +457,6 @@ static int acpi_battery_get_info(struct acpi_battery *battery) | |||
473 | s16 battery_mode; | 457 | s16 battery_mode; |
474 | s16 specification_info; | 458 | s16 specification_info; |
475 | 459 | ||
476 | ACPI_FUNCTION_TRACE("acpi_battery_get_info"); | ||
477 | |||
478 | result = acpi_sbs_smbus_read_word(smbus, ACPI_SB_SMBUS_ADDR, 0x03, | 460 | result = acpi_sbs_smbus_read_word(smbus, ACPI_SB_SMBUS_ADDR, 0x03, |
479 | &battery_mode, | 461 | &battery_mode, |
480 | &acpi_battery_smbus_err_handler); | 462 | &acpi_battery_smbus_err_handler); |
@@ -583,12 +565,11 @@ static int acpi_battery_get_info(struct acpi_battery *battery) | |||
583 | } | 565 | } |
584 | 566 | ||
585 | end: | 567 | end: |
586 | return_VALUE(result); | 568 | return result; |
587 | } | 569 | } |
588 | 570 | ||
589 | static void acpi_update_delay(struct acpi_sbs *sbs) | 571 | static void acpi_update_delay(struct acpi_sbs *sbs) |
590 | { | 572 | { |
591 | ACPI_FUNCTION_TRACE("acpi_update_delay"); | ||
592 | if (sbs->zombie) { | 573 | if (sbs->zombie) { |
593 | return; | 574 | return; |
594 | } | 575 | } |
@@ -602,8 +583,6 @@ static int acpi_battery_get_state(struct acpi_battery *battery) | |||
602 | struct acpi_ec_smbus *smbus = battery->sbs->smbus; | 583 | struct acpi_ec_smbus *smbus = battery->sbs->smbus; |
603 | int result = 0; | 584 | int result = 0; |
604 | 585 | ||
605 | ACPI_FUNCTION_TRACE("acpi_battery_get_state"); | ||
606 | |||
607 | acpi_update_delay(battery->sbs); | 586 | acpi_update_delay(battery->sbs); |
608 | result = acpi_sbs_smbus_read_word(smbus, ACPI_SB_SMBUS_ADDR, 0x09, | 587 | result = acpi_sbs_smbus_read_word(smbus, ACPI_SB_SMBUS_ADDR, 0x09, |
609 | &battery->state.voltage, | 588 | &battery->state.voltage, |
@@ -667,7 +646,7 @@ static int acpi_battery_get_state(struct acpi_battery *battery) | |||
667 | acpi_update_delay(battery->sbs); | 646 | acpi_update_delay(battery->sbs); |
668 | 647 | ||
669 | end: | 648 | end: |
670 | return_VALUE(result); | 649 | return result; |
671 | } | 650 | } |
672 | 651 | ||
673 | static int acpi_battery_get_alarm(struct acpi_battery *battery) | 652 | static int acpi_battery_get_alarm(struct acpi_battery *battery) |
@@ -675,8 +654,6 @@ static int acpi_battery_get_alarm(struct acpi_battery *battery) | |||
675 | struct acpi_ec_smbus *smbus = battery->sbs->smbus; | 654 | struct acpi_ec_smbus *smbus = battery->sbs->smbus; |
676 | int result = 0; | 655 | int result = 0; |
677 | 656 | ||
678 | ACPI_FUNCTION_TRACE("acpi_battery_get_alarm"); | ||
679 | |||
680 | result = acpi_sbs_smbus_read_word(smbus, ACPI_SB_SMBUS_ADDR, 0x01, | 657 | result = acpi_sbs_smbus_read_word(smbus, ACPI_SB_SMBUS_ADDR, 0x01, |
681 | &battery->alarm.remaining_capacity, | 658 | &battery->alarm.remaining_capacity, |
682 | &acpi_battery_smbus_err_handler); | 659 | &acpi_battery_smbus_err_handler); |
@@ -690,7 +667,7 @@ static int acpi_battery_get_alarm(struct acpi_battery *battery) | |||
690 | 667 | ||
691 | end: | 668 | end: |
692 | 669 | ||
693 | return_VALUE(result); | 670 | return result; |
694 | } | 671 | } |
695 | 672 | ||
696 | static int acpi_battery_set_alarm(struct acpi_battery *battery, | 673 | static int acpi_battery_set_alarm(struct acpi_battery *battery, |
@@ -701,8 +678,6 @@ static int acpi_battery_set_alarm(struct acpi_battery *battery, | |||
701 | s16 battery_mode; | 678 | s16 battery_mode; |
702 | int foo; | 679 | int foo; |
703 | 680 | ||
704 | ACPI_FUNCTION_TRACE("acpi_battery_set_alarm"); | ||
705 | |||
706 | result = acpi_battery_select(battery); | 681 | result = acpi_battery_select(battery); |
707 | if (result) { | 682 | if (result) { |
708 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 683 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, |
@@ -746,7 +721,7 @@ static int acpi_battery_set_alarm(struct acpi_battery *battery, | |||
746 | 721 | ||
747 | end: | 722 | end: |
748 | 723 | ||
749 | return_VALUE(result); | 724 | return result; |
750 | } | 725 | } |
751 | 726 | ||
752 | static int acpi_battery_set_mode(struct acpi_battery *battery) | 727 | static int acpi_battery_set_mode(struct acpi_battery *battery) |
@@ -754,8 +729,6 @@ static int acpi_battery_set_mode(struct acpi_battery *battery) | |||
754 | int result = 0; | 729 | int result = 0; |
755 | s16 battery_mode; | 730 | s16 battery_mode; |
756 | 731 | ||
757 | ACPI_FUNCTION_TRACE("acpi_battery_set_mode"); | ||
758 | |||
759 | if (capacity_mode == DEF_CAPACITY_UNIT) { | 732 | if (capacity_mode == DEF_CAPACITY_UNIT) { |
760 | goto end; | 733 | goto end; |
761 | } | 734 | } |
@@ -793,15 +766,13 @@ static int acpi_battery_set_mode(struct acpi_battery *battery) | |||
793 | } | 766 | } |
794 | 767 | ||
795 | end: | 768 | end: |
796 | return_VALUE(result); | 769 | return result; |
797 | } | 770 | } |
798 | 771 | ||
799 | static int acpi_battery_init(struct acpi_battery *battery) | 772 | static int acpi_battery_init(struct acpi_battery *battery) |
800 | { | 773 | { |
801 | int result = 0; | 774 | int result = 0; |
802 | 775 | ||
803 | ACPI_FUNCTION_TRACE("acpi_battery_init"); | ||
804 | |||
805 | result = acpi_battery_select(battery); | 776 | result = acpi_battery_select(battery); |
806 | if (result) { | 777 | if (result) { |
807 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 778 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, |
@@ -838,7 +809,7 @@ static int acpi_battery_init(struct acpi_battery *battery) | |||
838 | } | 809 | } |
839 | 810 | ||
840 | end: | 811 | end: |
841 | return_VALUE(result); | 812 | return result; |
842 | } | 813 | } |
843 | 814 | ||
844 | static int acpi_ac_get_present(struct acpi_sbs *sbs) | 815 | static int acpi_ac_get_present(struct acpi_sbs *sbs) |
@@ -847,8 +818,6 @@ static int acpi_ac_get_present(struct acpi_sbs *sbs) | |||
847 | int result = 0; | 818 | int result = 0; |
848 | s16 charger_status; | 819 | s16 charger_status; |
849 | 820 | ||
850 | ACPI_FUNCTION_TRACE("acpi_ac_get_present"); | ||
851 | |||
852 | result = acpi_sbs_smbus_read_word(smbus, ACPI_SBC_SMBUS_ADDR, 0x13, | 821 | result = acpi_sbs_smbus_read_word(smbus, ACPI_SBC_SMBUS_ADDR, 0x13, |
853 | &charger_status, NULL); | 822 | &charger_status, NULL); |
854 | 823 | ||
@@ -862,7 +831,7 @@ static int acpi_ac_get_present(struct acpi_sbs *sbs) | |||
862 | 831 | ||
863 | end: | 832 | end: |
864 | 833 | ||
865 | return_VALUE(result); | 834 | return result; |
866 | } | 835 | } |
867 | 836 | ||
868 | /* -------------------------------------------------------------------------- | 837 | /* -------------------------------------------------------------------------- |
@@ -881,14 +850,12 @@ acpi_sbs_generic_add_fs(struct proc_dir_entry **dir, | |||
881 | { | 850 | { |
882 | struct proc_dir_entry *entry = NULL; | 851 | struct proc_dir_entry *entry = NULL; |
883 | 852 | ||
884 | ACPI_FUNCTION_TRACE("acpi_sbs_generic_add_fs"); | ||
885 | |||
886 | if (!*dir) { | 853 | if (!*dir) { |
887 | *dir = proc_mkdir(dir_name, parent_dir); | 854 | *dir = proc_mkdir(dir_name, parent_dir); |
888 | if (!*dir) { | 855 | if (!*dir) { |
889 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 856 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, |
890 | "proc_mkdir() failed\n")); | 857 | "proc_mkdir() failed\n")); |
891 | return_VALUE(-ENODEV); | 858 | return -ENODEV; |
892 | } | 859 | } |
893 | (*dir)->owner = THIS_MODULE; | 860 | (*dir)->owner = THIS_MODULE; |
894 | } | 861 | } |
@@ -932,14 +899,13 @@ acpi_sbs_generic_add_fs(struct proc_dir_entry **dir, | |||
932 | } | 899 | } |
933 | } | 900 | } |
934 | 901 | ||
935 | return_VALUE(0); | 902 | return 0; |
936 | } | 903 | } |
937 | 904 | ||
938 | static void | 905 | static void |
939 | acpi_sbs_generic_remove_fs(struct proc_dir_entry **dir, | 906 | acpi_sbs_generic_remove_fs(struct proc_dir_entry **dir, |
940 | struct proc_dir_entry *parent_dir) | 907 | struct proc_dir_entry *parent_dir) |
941 | { | 908 | { |
942 | ACPI_FUNCTION_TRACE("acpi_sbs_generic_remove_fs"); | ||
943 | 909 | ||
944 | if (*dir) { | 910 | if (*dir) { |
945 | remove_proc_entry(ACPI_SBS_FILE_INFO, *dir); | 911 | remove_proc_entry(ACPI_SBS_FILE_INFO, *dir); |
@@ -961,10 +927,8 @@ static int acpi_battery_read_info(struct seq_file *seq, void *offset) | |||
961 | int cscale; | 927 | int cscale; |
962 | int result = 0; | 928 | int result = 0; |
963 | 929 | ||
964 | ACPI_FUNCTION_TRACE("acpi_battery_read_info"); | ||
965 | |||
966 | if (battery->sbs->zombie) { | 930 | if (battery->sbs->zombie) { |
967 | return_VALUE(-ENODEV); | 931 | return -ENODEV; |
968 | } | 932 | } |
969 | 933 | ||
970 | down(&sbs_sem); | 934 | down(&sbs_sem); |
@@ -1023,7 +987,7 @@ static int acpi_battery_read_info(struct seq_file *seq, void *offset) | |||
1023 | 987 | ||
1024 | up(&sbs_sem); | 988 | up(&sbs_sem); |
1025 | 989 | ||
1026 | return_VALUE(result); | 990 | return result; |
1027 | } | 991 | } |
1028 | 992 | ||
1029 | static int acpi_battery_info_open_fs(struct inode *inode, struct file *file) | 993 | static int acpi_battery_info_open_fs(struct inode *inode, struct file *file) |
@@ -1038,10 +1002,8 @@ static int acpi_battery_read_state(struct seq_file *seq, void *offset) | |||
1038 | int cscale; | 1002 | int cscale; |
1039 | int foo; | 1003 | int foo; |
1040 | 1004 | ||
1041 | ACPI_FUNCTION_TRACE("acpi_battery_read_state"); | ||
1042 | |||
1043 | if (battery->sbs->zombie) { | 1005 | if (battery->sbs->zombie) { |
1044 | return_VALUE(-ENODEV); | 1006 | return -ENODEV; |
1045 | } | 1007 | } |
1046 | 1008 | ||
1047 | down(&sbs_sem); | 1009 | down(&sbs_sem); |
@@ -1104,7 +1066,7 @@ static int acpi_battery_read_state(struct seq_file *seq, void *offset) | |||
1104 | 1066 | ||
1105 | up(&sbs_sem); | 1067 | up(&sbs_sem); |
1106 | 1068 | ||
1107 | return_VALUE(result); | 1069 | return result; |
1108 | } | 1070 | } |
1109 | 1071 | ||
1110 | static int acpi_battery_state_open_fs(struct inode *inode, struct file *file) | 1072 | static int acpi_battery_state_open_fs(struct inode *inode, struct file *file) |
@@ -1118,10 +1080,8 @@ static int acpi_battery_read_alarm(struct seq_file *seq, void *offset) | |||
1118 | int result = 0; | 1080 | int result = 0; |
1119 | int cscale; | 1081 | int cscale; |
1120 | 1082 | ||
1121 | ACPI_FUNCTION_TRACE("acpi_battery_read_alarm"); | ||
1122 | |||
1123 | if (battery->sbs->zombie) { | 1083 | if (battery->sbs->zombie) { |
1124 | return_VALUE(-ENODEV); | 1084 | return -ENODEV; |
1125 | } | 1085 | } |
1126 | 1086 | ||
1127 | down(&sbs_sem); | 1087 | down(&sbs_sem); |
@@ -1158,7 +1118,7 @@ static int acpi_battery_read_alarm(struct seq_file *seq, void *offset) | |||
1158 | 1118 | ||
1159 | up(&sbs_sem); | 1119 | up(&sbs_sem); |
1160 | 1120 | ||
1161 | return_VALUE(result); | 1121 | return result; |
1162 | } | 1122 | } |
1163 | 1123 | ||
1164 | static ssize_t | 1124 | static ssize_t |
@@ -1170,10 +1130,8 @@ acpi_battery_write_alarm(struct file *file, const char __user * buffer, | |||
1170 | char alarm_string[12] = { '\0' }; | 1130 | char alarm_string[12] = { '\0' }; |
1171 | int result, old_alarm, new_alarm; | 1131 | int result, old_alarm, new_alarm; |
1172 | 1132 | ||
1173 | ACPI_FUNCTION_TRACE("acpi_battery_write_alarm"); | ||
1174 | |||
1175 | if (battery->sbs->zombie) { | 1133 | if (battery->sbs->zombie) { |
1176 | return_VALUE(-ENODEV); | 1134 | return -ENODEV; |
1177 | } | 1135 | } |
1178 | 1136 | ||
1179 | down(&sbs_sem); | 1137 | down(&sbs_sem); |
@@ -1217,9 +1175,9 @@ acpi_battery_write_alarm(struct file *file, const char __user * buffer, | |||
1217 | up(&sbs_sem); | 1175 | up(&sbs_sem); |
1218 | 1176 | ||
1219 | if (result) { | 1177 | if (result) { |
1220 | return_VALUE(result); | 1178 | return result; |
1221 | } else { | 1179 | } else { |
1222 | return_VALUE(count); | 1180 | return count; |
1223 | } | 1181 | } |
1224 | } | 1182 | } |
1225 | 1183 | ||
@@ -1262,10 +1220,8 @@ static int acpi_ac_read_state(struct seq_file *seq, void *offset) | |||
1262 | struct acpi_sbs *sbs = (struct acpi_sbs *)seq->private; | 1220 | struct acpi_sbs *sbs = (struct acpi_sbs *)seq->private; |
1263 | int result; | 1221 | int result; |
1264 | 1222 | ||
1265 | ACPI_FUNCTION_TRACE("acpi_ac_read_state"); | ||
1266 | |||
1267 | if (sbs->zombie) { | 1223 | if (sbs->zombie) { |
1268 | return_VALUE(-ENODEV); | 1224 | return -ENODEV; |
1269 | } | 1225 | } |
1270 | 1226 | ||
1271 | down(&sbs_sem); | 1227 | down(&sbs_sem); |
@@ -1283,7 +1239,7 @@ static int acpi_ac_read_state(struct seq_file *seq, void *offset) | |||
1283 | 1239 | ||
1284 | up(&sbs_sem); | 1240 | up(&sbs_sem); |
1285 | 1241 | ||
1286 | return_VALUE(0); | 1242 | return 0; |
1287 | } | 1243 | } |
1288 | 1244 | ||
1289 | static int acpi_ac_state_open_fs(struct inode *inode, struct file *file) | 1245 | static int acpi_ac_state_open_fs(struct inode *inode, struct file *file) |
@@ -1312,8 +1268,6 @@ static int acpi_battery_add(struct acpi_sbs *sbs, int id) | |||
1312 | char dir_name[32]; | 1268 | char dir_name[32]; |
1313 | struct acpi_battery *battery; | 1269 | struct acpi_battery *battery; |
1314 | 1270 | ||
1315 | ACPI_FUNCTION_TRACE("acpi_battery_add"); | ||
1316 | |||
1317 | battery = &sbs->battery[id]; | 1271 | battery = &sbs->battery[id]; |
1318 | 1272 | ||
1319 | battery->alive = 0; | 1273 | battery->alive = 0; |
@@ -1364,12 +1318,11 @@ static int acpi_battery_add(struct acpi_sbs *sbs, int id) | |||
1364 | battery->alive = 1; | 1318 | battery->alive = 1; |
1365 | 1319 | ||
1366 | end: | 1320 | end: |
1367 | return_VALUE(result); | 1321 | return result; |
1368 | } | 1322 | } |
1369 | 1323 | ||
1370 | static void acpi_battery_remove(struct acpi_sbs *sbs, int id) | 1324 | static void acpi_battery_remove(struct acpi_sbs *sbs, int id) |
1371 | { | 1325 | { |
1372 | ACPI_FUNCTION_TRACE("acpi_battery_remove"); | ||
1373 | 1326 | ||
1374 | if (sbs->battery[id].battery_entry) { | 1327 | if (sbs->battery[id].battery_entry) { |
1375 | acpi_sbs_generic_remove_fs(&(sbs->battery[id].battery_entry), | 1328 | acpi_sbs_generic_remove_fs(&(sbs->battery[id].battery_entry), |
@@ -1381,8 +1334,6 @@ static int acpi_ac_add(struct acpi_sbs *sbs) | |||
1381 | { | 1334 | { |
1382 | int result; | 1335 | int result; |
1383 | 1336 | ||
1384 | ACPI_FUNCTION_TRACE("acpi_ac_add"); | ||
1385 | |||
1386 | result = acpi_ac_get_present(sbs); | 1337 | result = acpi_ac_get_present(sbs); |
1387 | if (result) { | 1338 | if (result) { |
1388 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 1339 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, |
@@ -1402,12 +1353,11 @@ static int acpi_ac_add(struct acpi_sbs *sbs) | |||
1402 | 1353 | ||
1403 | end: | 1354 | end: |
1404 | 1355 | ||
1405 | return_VALUE(result); | 1356 | return result; |
1406 | } | 1357 | } |
1407 | 1358 | ||
1408 | static void acpi_ac_remove(struct acpi_sbs *sbs) | 1359 | static void acpi_ac_remove(struct acpi_sbs *sbs) |
1409 | { | 1360 | { |
1410 | ACPI_FUNCTION_TRACE("acpi_ac_remove"); | ||
1411 | 1361 | ||
1412 | if (sbs->ac_entry) { | 1362 | if (sbs->ac_entry) { |
1413 | acpi_sbs_generic_remove_fs(&sbs->ac_entry, acpi_ac_dir); | 1363 | acpi_sbs_generic_remove_fs(&sbs->ac_entry, acpi_ac_dir); |
@@ -1416,7 +1366,6 @@ static void acpi_ac_remove(struct acpi_sbs *sbs) | |||
1416 | 1366 | ||
1417 | static void acpi_sbs_update_queue_run(unsigned long data) | 1367 | static void acpi_sbs_update_queue_run(unsigned long data) |
1418 | { | 1368 | { |
1419 | ACPI_FUNCTION_TRACE("acpi_sbs_update_queue_run"); | ||
1420 | acpi_os_execute(OSL_GPE_HANDLER, acpi_sbs_update_queue, (void *)data); | 1369 | acpi_os_execute(OSL_GPE_HANDLER, acpi_sbs_update_queue, (void *)data); |
1421 | } | 1370 | } |
1422 | 1371 | ||
@@ -1433,8 +1382,6 @@ static int acpi_sbs_update_run(struct acpi_sbs *sbs, int data_type) | |||
1433 | int do_battery_init, do_ac_init; | 1382 | int do_battery_init, do_ac_init; |
1434 | s16 old_remaining_capacity; | 1383 | s16 old_remaining_capacity; |
1435 | 1384 | ||
1436 | ACPI_FUNCTION_TRACE("acpi_sbs_update_run"); | ||
1437 | |||
1438 | if (sbs->zombie) { | 1385 | if (sbs->zombie) { |
1439 | goto end; | 1386 | goto end; |
1440 | } | 1387 | } |
@@ -1584,7 +1531,7 @@ static int acpi_sbs_update_run(struct acpi_sbs *sbs, int data_type) | |||
1584 | } | 1531 | } |
1585 | 1532 | ||
1586 | end: | 1533 | end: |
1587 | return_VALUE(result); | 1534 | return result; |
1588 | } | 1535 | } |
1589 | 1536 | ||
1590 | static void acpi_sbs_update_queue(void *data) | 1537 | static void acpi_sbs_update_queue(void *data) |
@@ -1593,8 +1540,6 @@ static void acpi_sbs_update_queue(void *data) | |||
1593 | unsigned long delay = -1; | 1540 | unsigned long delay = -1; |
1594 | int result; | 1541 | int result; |
1595 | 1542 | ||
1596 | ACPI_FUNCTION_TRACE("acpi_sbs_update_queue"); | ||
1597 | |||
1598 | if (sbs->zombie) { | 1543 | if (sbs->zombie) { |
1599 | goto end; | 1544 | goto end; |
1600 | } | 1545 | } |
@@ -1631,12 +1576,10 @@ static int acpi_sbs_add(struct acpi_device *device) | |||
1631 | int id, cnt; | 1576 | int id, cnt; |
1632 | acpi_status status = AE_OK; | 1577 | acpi_status status = AE_OK; |
1633 | 1578 | ||
1634 | ACPI_FUNCTION_TRACE("acpi_sbs_add"); | ||
1635 | |||
1636 | sbs = kmalloc(sizeof(struct acpi_sbs), GFP_KERNEL); | 1579 | sbs = kmalloc(sizeof(struct acpi_sbs), GFP_KERNEL); |
1637 | if (!sbs) { | 1580 | if (!sbs) { |
1638 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "kmalloc() failed\n")); | 1581 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "kmalloc() failed\n")); |
1639 | return_VALUE(-ENOMEM); | 1582 | return -ENOMEM; |
1640 | } | 1583 | } |
1641 | memset(sbs, 0, sizeof(struct acpi_sbs)); | 1584 | memset(sbs, 0, sizeof(struct acpi_sbs)); |
1642 | 1585 | ||
@@ -1737,7 +1680,7 @@ static int acpi_sbs_add(struct acpi_device *device) | |||
1737 | } | 1680 | } |
1738 | } | 1681 | } |
1739 | 1682 | ||
1740 | return_VALUE(result); | 1683 | return result; |
1741 | } | 1684 | } |
1742 | 1685 | ||
1743 | int acpi_sbs_remove(struct acpi_device *device, int type) | 1686 | int acpi_sbs_remove(struct acpi_device *device, int type) |
@@ -1745,10 +1688,8 @@ int acpi_sbs_remove(struct acpi_device *device, int type) | |||
1745 | struct acpi_sbs *sbs = (struct acpi_sbs *)acpi_driver_data(device); | 1688 | struct acpi_sbs *sbs = (struct acpi_sbs *)acpi_driver_data(device); |
1746 | int id; | 1689 | int id; |
1747 | 1690 | ||
1748 | ACPI_FUNCTION_TRACE("acpi_sbs_remove"); | ||
1749 | |||
1750 | if (!device || !sbs) { | 1691 | if (!device || !sbs) { |
1751 | return_VALUE(-EINVAL); | 1692 | return -EINVAL; |
1752 | } | 1693 | } |
1753 | 1694 | ||
1754 | sbs->zombie = 1; | 1695 | sbs->zombie = 1; |
@@ -1766,15 +1707,13 @@ int acpi_sbs_remove(struct acpi_device *device, int type) | |||
1766 | 1707 | ||
1767 | kfree(sbs); | 1708 | kfree(sbs); |
1768 | 1709 | ||
1769 | return_VALUE(0); | 1710 | return 0; |
1770 | } | 1711 | } |
1771 | 1712 | ||
1772 | static int __init acpi_sbs_init(void) | 1713 | static int __init acpi_sbs_init(void) |
1773 | { | 1714 | { |
1774 | int result = 0; | 1715 | int result = 0; |
1775 | 1716 | ||
1776 | ACPI_FUNCTION_TRACE("acpi_sbs_init"); | ||
1777 | |||
1778 | init_MUTEX(&sbs_sem); | 1717 | init_MUTEX(&sbs_sem); |
1779 | 1718 | ||
1780 | if (capacity_mode != DEF_CAPACITY_UNIT | 1719 | if (capacity_mode != DEF_CAPACITY_UNIT |
@@ -1783,36 +1722,35 @@ static int __init acpi_sbs_init(void) | |||
1783 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "acpi_sbs_init: " | 1722 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "acpi_sbs_init: " |
1784 | "invalid capacity_mode = %d\n", | 1723 | "invalid capacity_mode = %d\n", |
1785 | capacity_mode)); | 1724 | capacity_mode)); |
1786 | return_VALUE(-EINVAL); | 1725 | return -EINVAL; |
1787 | } | 1726 | } |
1788 | 1727 | ||
1789 | acpi_ac_dir = acpi_lock_ac_dir(); | 1728 | acpi_ac_dir = acpi_lock_ac_dir(); |
1790 | if (!acpi_ac_dir) { | 1729 | if (!acpi_ac_dir) { |
1791 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 1730 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, |
1792 | "acpi_lock_ac_dir() failed\n")); | 1731 | "acpi_lock_ac_dir() failed\n")); |
1793 | return_VALUE(-ENODEV); | 1732 | return -ENODEV; |
1794 | } | 1733 | } |
1795 | 1734 | ||
1796 | acpi_battery_dir = acpi_lock_battery_dir(); | 1735 | acpi_battery_dir = acpi_lock_battery_dir(); |
1797 | if (!acpi_battery_dir) { | 1736 | if (!acpi_battery_dir) { |
1798 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 1737 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, |
1799 | "acpi_lock_battery_dir() failed\n")); | 1738 | "acpi_lock_battery_dir() failed\n")); |
1800 | return_VALUE(-ENODEV); | 1739 | return -ENODEV; |
1801 | } | 1740 | } |
1802 | 1741 | ||
1803 | result = acpi_bus_register_driver(&acpi_sbs_driver); | 1742 | result = acpi_bus_register_driver(&acpi_sbs_driver); |
1804 | if (result < 0) { | 1743 | if (result < 0) { |
1805 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 1744 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, |
1806 | "acpi_bus_register_driver() failed\n")); | 1745 | "acpi_bus_register_driver() failed\n")); |
1807 | return_VALUE(-ENODEV); | 1746 | return -ENODEV; |
1808 | } | 1747 | } |
1809 | 1748 | ||
1810 | return_VALUE(0); | 1749 | return 0; |
1811 | } | 1750 | } |
1812 | 1751 | ||
1813 | static void __exit acpi_sbs_exit(void) | 1752 | static void __exit acpi_sbs_exit(void) |
1814 | { | 1753 | { |
1815 | ACPI_FUNCTION_TRACE("acpi_sbs_exit"); | ||
1816 | 1754 | ||
1817 | acpi_bus_unregister_driver(&acpi_sbs_driver); | 1755 | acpi_bus_unregister_driver(&acpi_sbs_driver); |
1818 | 1756 | ||
@@ -1821,7 +1759,7 @@ static void __exit acpi_sbs_exit(void) | |||
1821 | acpi_unlock_battery_dir(acpi_battery_dir); | 1759 | acpi_unlock_battery_dir(acpi_battery_dir); |
1822 | acpi_battery_dir = NULL; | 1760 | acpi_battery_dir = NULL; |
1823 | 1761 | ||
1824 | return_VOID; | 1762 | return; |
1825 | } | 1763 | } |
1826 | 1764 | ||
1827 | module_init(acpi_sbs_init); | 1765 | module_init(acpi_sbs_init); |