From a6fc67202e0224e6c9d1d285cc0b444bce887ed5 Mon Sep 17 00:00:00 2001 From: Thomas Renninger Date: Mon, 26 Jun 2006 23:58:43 -0400 Subject: ACPI: Enable ACPI error messages w/o CONFIG_ACPI_DEBUG Signed-off-by: Thomas Renninger Signed-off-by: Len Brown --- drivers/acpi/button.c | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) (limited to 'drivers/acpi/button.c') 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) entry = create_proc_entry(ACPI_BUTTON_FILE_INFO, S_IRUGO, acpi_device_dir(device)); if (!entry) - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, - "Unable to create '%s' fs entry\n", - ACPI_BUTTON_FILE_INFO)); + return_VALUE(-ENODEV); else { entry->proc_fops = &acpi_button_info_fops; entry->data = acpi_driver_data(device); @@ -221,9 +219,7 @@ static int acpi_button_add_fs(struct acpi_device *device) entry = create_proc_entry(ACPI_BUTTON_FILE_STATE, S_IRUGO, acpi_device_dir(device)); if (!entry) - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, - "Unable to create '%s' fs entry\n", - ACPI_BUTTON_FILE_INFO)); + return -ENODEV; else { entry->proc_fops = &acpi_button_state_fops; entry->data = acpi_driver_data(device); @@ -349,8 +345,8 @@ static int acpi_button_add(struct acpi_device *device) sprintf(acpi_device_class(device), "%s/%s", ACPI_BUTTON_CLASS, ACPI_BUTTON_SUBCLASS_LID); } else { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Unsupported hid [%s]\n", - acpi_device_hid(device))); + ACPI_ERROR((AE_INFO, "Unsupported hid [%s]", + acpi_device_hid(device))); result = -ENODEV; goto end; } @@ -381,8 +377,6 @@ static int acpi_button_add(struct acpi_device *device) } if (ACPI_FAILURE(status)) { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, - "Error installing notify handler\n")); result = -ENODEV; goto end; } @@ -440,10 +434,6 @@ static int acpi_button_remove(struct acpi_device *device, int type) break; } - if (ACPI_FAILURE(status)) - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, - "Error removing notify handler\n")); - acpi_button_remove_fs(device); kfree(button); -- cgit v1.2.2