summaryrefslogtreecommitdiffstats
path: root/drivers/platform/x86/fujitsu-laptop.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/platform/x86/fujitsu-laptop.c')
-rw-r--r--drivers/platform/x86/fujitsu-laptop.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/drivers/platform/x86/fujitsu-laptop.c b/drivers/platform/x86/fujitsu-laptop.c
index e325aeb37d2e..f44cd2620ff9 100644
--- a/drivers/platform/x86/fujitsu-laptop.c
+++ b/drivers/platform/x86/fujitsu-laptop.c
@@ -182,7 +182,7 @@ static enum led_brightness logolamp_get(struct led_classdev *cdev);
static void logolamp_set(struct led_classdev *cdev,
enum led_brightness brightness);
-struct led_classdev logolamp_led = {
+static struct led_classdev logolamp_led = {
.name = "fujitsu::logolamp",
.brightness_get = logolamp_get,
.brightness_set = logolamp_set
@@ -192,7 +192,7 @@ static enum led_brightness kblamps_get(struct led_classdev *cdev);
static void kblamps_set(struct led_classdev *cdev,
enum led_brightness brightness);
-struct led_classdev kblamps_led = {
+static struct led_classdev kblamps_led = {
.name = "fujitsu::kblamps",
.brightness_get = kblamps_get,
.brightness_set = kblamps_set
@@ -603,7 +603,7 @@ static int dmi_check_cb_s6410(const struct dmi_system_id *id)
dmi_check_cb_common(id);
fujitsu->keycode1 = KEY_SCREENLOCK; /* "Lock" */
fujitsu->keycode2 = KEY_HELP; /* "Mobility Center" */
- return 0;
+ return 1;
}
static int dmi_check_cb_s6420(const struct dmi_system_id *id)
@@ -611,7 +611,7 @@ static int dmi_check_cb_s6420(const struct dmi_system_id *id)
dmi_check_cb_common(id);
fujitsu->keycode1 = KEY_SCREENLOCK; /* "Lock" */
fujitsu->keycode2 = KEY_HELP; /* "Mobility Center" */
- return 0;
+ return 1;
}
static int dmi_check_cb_p8010(const struct dmi_system_id *id)
@@ -620,7 +620,7 @@ static int dmi_check_cb_p8010(const struct dmi_system_id *id)
fujitsu->keycode1 = KEY_HELP; /* "Support" */
fujitsu->keycode3 = KEY_SWITCHVIDEOMODE; /* "Presentation" */
fujitsu->keycode4 = KEY_WWW; /* "Internet" */
- return 0;
+ return 1;
}
static struct dmi_system_id fujitsu_dmi_table[] = {
@@ -725,6 +725,7 @@ static int acpi_fujitsu_add(struct acpi_device *device)
err_unregister_input_dev:
input_unregister_device(input);
+ input = NULL;
err_free_input_dev:
input_free_device(input);
err_stop:
@@ -738,8 +739,6 @@ static int acpi_fujitsu_remove(struct acpi_device *device, int type)
input_unregister_device(input);
- input_free_device(input);
-
fujitsu->acpi_handle = NULL;
return 0;
@@ -930,6 +929,7 @@ static int acpi_fujitsu_hotkey_add(struct acpi_device *device)
err_unregister_input_dev:
input_unregister_device(input);
+ input = NULL;
err_free_input_dev:
input_free_device(input);
err_free_fifo:
@@ -953,8 +953,6 @@ static int acpi_fujitsu_hotkey_remove(struct acpi_device *device, int type)
input_unregister_device(input);
- input_free_device(input);
-
kfifo_free(&fujitsu_hotkey->fifo);
fujitsu_hotkey->acpi_handle = NULL;