diff options
Diffstat (limited to 'drivers/acpi/button.c')
-rw-r--r-- | drivers/acpi/button.c | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/drivers/acpi/button.c b/drivers/acpi/button.c index 4b6d9f0096a1..a8717da32a7a 100644 --- a/drivers/acpi/button.c +++ b/drivers/acpi/button.c | |||
@@ -207,9 +207,7 @@ static int acpi_button_add_fs(struct acpi_device *device) | |||
207 | entry = create_proc_entry(ACPI_BUTTON_FILE_INFO, | 207 | entry = create_proc_entry(ACPI_BUTTON_FILE_INFO, |
208 | S_IRUGO, acpi_device_dir(device)); | 208 | S_IRUGO, acpi_device_dir(device)); |
209 | if (!entry) | 209 | if (!entry) |
210 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 210 | return_VALUE(-ENODEV); |
211 | "Unable to create '%s' fs entry\n", | ||
212 | ACPI_BUTTON_FILE_INFO)); | ||
213 | else { | 211 | else { |
214 | entry->proc_fops = &acpi_button_info_fops; | 212 | entry->proc_fops = &acpi_button_info_fops; |
215 | entry->data = acpi_driver_data(device); | 213 | entry->data = acpi_driver_data(device); |
@@ -221,9 +219,7 @@ static int acpi_button_add_fs(struct acpi_device *device) | |||
221 | entry = create_proc_entry(ACPI_BUTTON_FILE_STATE, | 219 | entry = create_proc_entry(ACPI_BUTTON_FILE_STATE, |
222 | S_IRUGO, acpi_device_dir(device)); | 220 | S_IRUGO, acpi_device_dir(device)); |
223 | if (!entry) | 221 | if (!entry) |
224 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 222 | return -ENODEV; |
225 | "Unable to create '%s' fs entry\n", | ||
226 | ACPI_BUTTON_FILE_INFO)); | ||
227 | else { | 223 | else { |
228 | entry->proc_fops = &acpi_button_state_fops; | 224 | entry->proc_fops = &acpi_button_state_fops; |
229 | entry->data = acpi_driver_data(device); | 225 | entry->data = acpi_driver_data(device); |
@@ -349,8 +345,8 @@ static int acpi_button_add(struct acpi_device *device) | |||
349 | sprintf(acpi_device_class(device), "%s/%s", | 345 | sprintf(acpi_device_class(device), "%s/%s", |
350 | ACPI_BUTTON_CLASS, ACPI_BUTTON_SUBCLASS_LID); | 346 | ACPI_BUTTON_CLASS, ACPI_BUTTON_SUBCLASS_LID); |
351 | } else { | 347 | } else { |
352 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Unsupported hid [%s]\n", | 348 | ACPI_ERROR((AE_INFO, "Unsupported hid [%s]", |
353 | acpi_device_hid(device))); | 349 | acpi_device_hid(device))); |
354 | result = -ENODEV; | 350 | result = -ENODEV; |
355 | goto end; | 351 | goto end; |
356 | } | 352 | } |
@@ -381,8 +377,6 @@ static int acpi_button_add(struct acpi_device *device) | |||
381 | } | 377 | } |
382 | 378 | ||
383 | if (ACPI_FAILURE(status)) { | 379 | if (ACPI_FAILURE(status)) { |
384 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | ||
385 | "Error installing notify handler\n")); | ||
386 | result = -ENODEV; | 380 | result = -ENODEV; |
387 | goto end; | 381 | goto end; |
388 | } | 382 | } |
@@ -440,10 +434,6 @@ static int acpi_button_remove(struct acpi_device *device, int type) | |||
440 | break; | 434 | break; |
441 | } | 435 | } |
442 | 436 | ||
443 | if (ACPI_FAILURE(status)) | ||
444 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | ||
445 | "Error removing notify handler\n")); | ||
446 | |||
447 | acpi_button_remove_fs(device); | 437 | acpi_button_remove_fs(device); |
448 | 438 | ||
449 | kfree(button); | 439 | kfree(button); |