aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/ac.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/ac.c')
-rw-r--r--drivers/acpi/ac.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/drivers/acpi/ac.c b/drivers/acpi/ac.c
index 7839b831df94..95223d8c5ecc 100644
--- a/drivers/acpi/ac.c
+++ b/drivers/acpi/ac.c
@@ -91,8 +91,7 @@ static int acpi_ac_get_state(struct acpi_ac *ac)
91 91
92 status = acpi_evaluate_integer(ac->handle, "_PSR", NULL, &ac->state); 92 status = acpi_evaluate_integer(ac->handle, "_PSR", NULL, &ac->state);
93 if (ACPI_FAILURE(status)) { 93 if (ACPI_FAILURE(status)) {
94 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 94 ACPI_EXCEPTION((AE_INFO, status, "Error reading AC Adapter state"));
95 "Error reading AC Adapter state\n"));
96 ac->state = ACPI_AC_STATUS_UNKNOWN; 95 ac->state = ACPI_AC_STATUS_UNKNOWN;
97 return_VALUE(-ENODEV); 96 return_VALUE(-ENODEV);
98 } 97 }
@@ -159,9 +158,7 @@ static int acpi_ac_add_fs(struct acpi_device *device)
159 entry = create_proc_entry(ACPI_AC_FILE_STATE, 158 entry = create_proc_entry(ACPI_AC_FILE_STATE,
160 S_IRUGO, acpi_device_dir(device)); 159 S_IRUGO, acpi_device_dir(device));
161 if (!entry) 160 if (!entry)
162 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 161 return_VALUE(-ENODEV);
163 "Unable to create '%s' fs entry\n",
164 ACPI_AC_FILE_STATE));
165 else { 162 else {
166 entry->proc_fops = &acpi_ac_fops; 163 entry->proc_fops = &acpi_ac_fops;
167 entry->data = acpi_driver_data(device); 164 entry->data = acpi_driver_data(device);
@@ -249,8 +246,6 @@ static int acpi_ac_add(struct acpi_device *device)
249 ACPI_DEVICE_NOTIFY, acpi_ac_notify, 246 ACPI_DEVICE_NOTIFY, acpi_ac_notify,
250 ac); 247 ac);
251 if (ACPI_FAILURE(status)) { 248 if (ACPI_FAILURE(status)) {
252 ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
253 "Error installing notify handler\n"));
254 result = -ENODEV; 249 result = -ENODEV;
255 goto end; 250 goto end;
256 } 251 }
@@ -282,9 +277,6 @@ static int acpi_ac_remove(struct acpi_device *device, int type)
282 277
283 status = acpi_remove_notify_handler(ac->handle, 278 status = acpi_remove_notify_handler(ac->handle,
284 ACPI_DEVICE_NOTIFY, acpi_ac_notify); 279 ACPI_DEVICE_NOTIFY, acpi_ac_notify);
285 if (ACPI_FAILURE(status))
286 ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
287 "Error removing notify handler\n"));
288 280
289 acpi_ac_remove_fs(device); 281 acpi_ac_remove_fs(device);
290 282