summaryrefslogtreecommitdiff
path: root/drivers/platform/x86/fujitsu-laptop.c
diff options
context:
space:
mode:
authorMichał Kępień <kernel@kempniu.pl>2017-04-05 09:49:10 +0300
committerDarren Hart (VMware) <dvhart@infradead.org>2017-04-13 20:16:07 +0300
commit5c495d6201fb0efafcf6e26b3c82a7bd01ec1b69 (patch)
tree3bb70bfcaf533ceeb8fe43b375d19a5606527934 /drivers/platform/x86/fujitsu-laptop.c
parent5959ddd02be4e435da866ee065187f5c8bccea28 (diff)
downloadlinux-5c495d6201fb0efafcf6e26b3c82a7bd01ec1b69.tar.xz
platform/x86: fujitsu-laptop: remove redundant fields from struct fujitsu_bl
The dev field of struct fujitsu_bl is assigned in acpi_fujitsu_bl_add(), but never used afterwards. brightness_changed is set in get_lcd_level() and then its value is only printed in a debug message, so it does not influence execution flow. Remove both fields as they are redundant. Update the aforementioned debug message. Adjust whitespace to make checkpatch happy. Signed-off-by: Michał Kępień <kernel@kempniu.pl> Reviewed-by: Jonathan Woithe <jwoithe@just42.net> Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
Diffstat (limited to 'drivers/platform/x86/fujitsu-laptop.c')
-rw-r--r--drivers/platform/x86/fujitsu-laptop.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/drivers/platform/x86/fujitsu-laptop.c b/drivers/platform/x86/fujitsu-laptop.c
index b88172134063..84b561415875 100644
--- a/drivers/platform/x86/fujitsu-laptop.c
+++ b/drivers/platform/x86/fujitsu-laptop.c
@@ -135,13 +135,10 @@
/* Device controlling the backlight and associated keys */
struct fujitsu_bl {
acpi_handle acpi_handle;
- struct acpi_device *dev;
struct input_dev *input;
char phys[32];
struct backlight_device *bl_device;
-
unsigned int max_brightness;
- unsigned int brightness_changed;
unsigned int brightness_level;
};
@@ -394,11 +391,6 @@ static int get_lcd_level(void)
fujitsu_bl->brightness_level = state & 0x0fffffff;
- if (state & 0x80000000)
- fujitsu_bl->brightness_changed = 1;
- else
- fujitsu_bl->brightness_changed = 0;
-
return fujitsu_bl->brightness_level;
}
@@ -577,8 +569,6 @@ static int acpi_fujitsu_bl_add(struct acpi_device *device)
acpi_device_name(device), acpi_device_bid(device),
!device->power.state ? "on" : "off");
- fujitsu_bl->dev = device;
-
if (acpi_has_method(device->handle, METHOD_NAME__INI)) {
vdbg_printk(FUJLAPTOP_DBG_INFO, "Invoking _INI\n");
if (ACPI_FAILURE
@@ -618,9 +608,8 @@ static void acpi_fujitsu_bl_notify(struct acpi_device *device, u32 event)
get_lcd_level();
newb = fujitsu_bl->brightness_level;
- vdbg_printk(FUJLAPTOP_DBG_TRACE,
- "brightness button event [%i -> %i (%i)]\n",
- oldb, newb, fujitsu_bl->brightness_changed);
+ vdbg_printk(FUJLAPTOP_DBG_TRACE, "brightness button event [%i -> %i]\n",
+ oldb, newb);
if (oldb == newb)
return;