diff options
author | yu kuai <yukuai3@huawei.com> | 2019-09-29 09:42:49 -0400 |
---|---|---|
committer | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2019-10-10 07:13:54 -0400 |
commit | 18380f52dbac230032a16545e67a6d90b548cf18 (patch) | |
tree | 186b13d3a8719927b62608500e3ac5b752803853 | |
parent | da0c9ea146cbe92b832f1b0f694840ea8eb33cce (diff) |
platform/x86: classmate-laptop: remove unused variable
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/platform/x86/classmate-laptop.c: In function cmpc_accel_remove_v4:
drivers/platform/x86/classmate-laptop.c:424:21: warning: variable accel
set but not used [-Wunused-but-set-variable]
drivers/platform/x86/classmate-laptop.c: In function cmpc_accel_remove:
drivers/platform/x86/classmate-laptop.c:660:21: warning: variable accel
set but not used [-Wunused-but-set-variable]
In function cmpc_accel_remove_v4 and cmpc_accel_remove, variable accel is
set but not used, so it can be removed. In that case, variable inputdev is
set but not used and can be removed.
Fixes: 7125587df4e8 ("classmate-laptop: Add support for Classmate V4 accelerometer.")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: yu kuai <yukuai3@huawei.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
-rw-r--r-- | drivers/platform/x86/classmate-laptop.c | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/drivers/platform/x86/classmate-laptop.c b/drivers/platform/x86/classmate-laptop.c index 86cc2cc68fb5..af063f690846 100644 --- a/drivers/platform/x86/classmate-laptop.c +++ b/drivers/platform/x86/classmate-laptop.c | |||
@@ -420,12 +420,6 @@ failed_sensitivity: | |||
420 | 420 | ||
421 | static int cmpc_accel_remove_v4(struct acpi_device *acpi) | 421 | static int cmpc_accel_remove_v4(struct acpi_device *acpi) |
422 | { | 422 | { |
423 | struct input_dev *inputdev; | ||
424 | struct cmpc_accel *accel; | ||
425 | |||
426 | inputdev = dev_get_drvdata(&acpi->dev); | ||
427 | accel = dev_get_drvdata(&inputdev->dev); | ||
428 | |||
429 | device_remove_file(&acpi->dev, &cmpc_accel_sensitivity_attr_v4); | 423 | device_remove_file(&acpi->dev, &cmpc_accel_sensitivity_attr_v4); |
430 | device_remove_file(&acpi->dev, &cmpc_accel_g_select_attr_v4); | 424 | device_remove_file(&acpi->dev, &cmpc_accel_g_select_attr_v4); |
431 | return cmpc_remove_acpi_notify_device(acpi); | 425 | return cmpc_remove_acpi_notify_device(acpi); |
@@ -656,12 +650,6 @@ failed_file: | |||
656 | 650 | ||
657 | static int cmpc_accel_remove(struct acpi_device *acpi) | 651 | static int cmpc_accel_remove(struct acpi_device *acpi) |
658 | { | 652 | { |
659 | struct input_dev *inputdev; | ||
660 | struct cmpc_accel *accel; | ||
661 | |||
662 | inputdev = dev_get_drvdata(&acpi->dev); | ||
663 | accel = dev_get_drvdata(&inputdev->dev); | ||
664 | |||
665 | device_remove_file(&acpi->dev, &cmpc_accel_sensitivity_attr); | 653 | device_remove_file(&acpi->dev, &cmpc_accel_sensitivity_attr); |
666 | return cmpc_remove_acpi_notify_device(acpi); | 654 | return cmpc_remove_acpi_notify_device(acpi); |
667 | } | 655 | } |