diff options
author | Axel Lin <axel.lin@gmail.com> | 2010-07-13 09:25:12 -0700 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2010-07-13 09:43:19 -0700 |
commit | 02b5fac1f71c21a84da025973ccb14e4ec6f6d4a (patch) | |
tree | 0c48c0fccb15adebde7ce7a3ee0ee89bd2ff113f /drivers/input | |
parent | 07d19ffce54faa5591954bab3644b6f2ff31640c (diff) |
Input: atlas_btns - fix mixing acpi_status and int for return value
To improve readability, this patch fixes mixing acpi_status
and int for return value.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input')
-rw-r--r-- | drivers/input/misc/atlas_btns.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/input/misc/atlas_btns.c b/drivers/input/misc/atlas_btns.c index 7d536086904..2391a86aeb0 100644 --- a/drivers/input/misc/atlas_btns.c +++ b/drivers/input/misc/atlas_btns.c @@ -60,12 +60,12 @@ static acpi_status acpi_atlas_button_handler(u32 function, input_report_key(input_dev, atlas_keymap[code], key_down); input_sync(input_dev); - status = 0; + status = AE_OK; } else { printk(KERN_WARNING "atlas: shrugged on unexpected function" ":function=%x,address=%lx,value=%x\n", function, (unsigned long)address, (u32)*value); - status = -EINVAL; + status = AE_BAD_PARAMETER; } return status; @@ -114,10 +114,10 @@ static int atlas_acpi_button_add(struct acpi_device *device) if (ACPI_FAILURE(status)) { printk(KERN_ERR "Atlas: Error installing addr spc handler\n"); input_unregister_device(input_dev); - status = -EINVAL; + err = -EINVAL; } - return status; + return err; } static int atlas_acpi_button_remove(struct acpi_device *device, int type) @@ -126,14 +126,12 @@ static int atlas_acpi_button_remove(struct acpi_device *device, int type) status = acpi_remove_address_space_handler(device->handle, 0x81, &acpi_atlas_button_handler); - if (ACPI_FAILURE(status)) { + if (ACPI_FAILURE(status)) printk(KERN_ERR "Atlas: Error removing addr spc handler\n"); - status = -EINVAL; - } input_unregister_device(input_dev); - return status; + return 0; } static const struct acpi_device_id atlas_device_ids[] = { |