diff options
| author | Axel Lin <axel.lin@gmail.com> | 2010-07-13 12:25:12 -0400 |
|---|---|---|
| committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2010-07-13 12:43:19 -0400 |
| commit | 02b5fac1f71c21a84da025973ccb14e4ec6f6d4a (patch) | |
| tree | 0c48c0fccb15adebde7ce7a3ee0ee89bd2ff113f | |
| 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>
| -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 7d5360869047..2391a86aeb0f 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, | |||
| 60 | input_report_key(input_dev, atlas_keymap[code], key_down); | 60 | input_report_key(input_dev, atlas_keymap[code], key_down); |
| 61 | input_sync(input_dev); | 61 | input_sync(input_dev); |
| 62 | 62 | ||
| 63 | status = 0; | 63 | status = AE_OK; |
| 64 | } else { | 64 | } else { |
| 65 | printk(KERN_WARNING "atlas: shrugged on unexpected function" | 65 | printk(KERN_WARNING "atlas: shrugged on unexpected function" |
| 66 | ":function=%x,address=%lx,value=%x\n", | 66 | ":function=%x,address=%lx,value=%x\n", |
| 67 | function, (unsigned long)address, (u32)*value); | 67 | function, (unsigned long)address, (u32)*value); |
| 68 | status = -EINVAL; | 68 | status = AE_BAD_PARAMETER; |
| 69 | } | 69 | } |
| 70 | 70 | ||
| 71 | return status; | 71 | return status; |
| @@ -114,10 +114,10 @@ static int atlas_acpi_button_add(struct acpi_device *device) | |||
| 114 | if (ACPI_FAILURE(status)) { | 114 | if (ACPI_FAILURE(status)) { |
| 115 | printk(KERN_ERR "Atlas: Error installing addr spc handler\n"); | 115 | printk(KERN_ERR "Atlas: Error installing addr spc handler\n"); |
| 116 | input_unregister_device(input_dev); | 116 | input_unregister_device(input_dev); |
| 117 | status = -EINVAL; | 117 | err = -EINVAL; |
| 118 | } | 118 | } |
| 119 | 119 | ||
| 120 | return status; | 120 | return err; |
| 121 | } | 121 | } |
| 122 | 122 | ||
| 123 | static int atlas_acpi_button_remove(struct acpi_device *device, int type) | 123 | 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) | |||
| 126 | 126 | ||
| 127 | status = acpi_remove_address_space_handler(device->handle, | 127 | status = acpi_remove_address_space_handler(device->handle, |
| 128 | 0x81, &acpi_atlas_button_handler); | 128 | 0x81, &acpi_atlas_button_handler); |
| 129 | if (ACPI_FAILURE(status)) { | 129 | if (ACPI_FAILURE(status)) |
| 130 | printk(KERN_ERR "Atlas: Error removing addr spc handler\n"); | 130 | printk(KERN_ERR "Atlas: Error removing addr spc handler\n"); |
| 131 | status = -EINVAL; | ||
| 132 | } | ||
| 133 | 131 | ||
| 134 | input_unregister_device(input_dev); | 132 | input_unregister_device(input_dev); |
| 135 | 133 | ||
| 136 | return status; | 134 | return 0; |
| 137 | } | 135 | } |
| 138 | 136 | ||
| 139 | static const struct acpi_device_id atlas_device_ids[] = { | 137 | static const struct acpi_device_id atlas_device_ids[] = { |
