summaryrefslogtreecommitdiff
path: root/drivers/hid
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2021-04-04 09:52:52 +0200
committerJiri Kosina <jkosina@suse.cz>2021-04-07 12:46:33 +0200
commitba3f92938f2c01623546d4570ecc19a8b7786fa7 (patch)
tree5aa63a5e1858b9faec6cf7010e4239fb8c113539 /drivers/hid
parent2601371e1082ca30577556d381afacc11a11157b (diff)
HID: elan: Remove elan_mute_led_get_brigtness()
The led_classdev already contains a cached value of the last set brightness, the brightness_get callback is only meant for LED drivers which can read back the actual / current brightness from the hardware. Since elan_mute_led_get_brigtness() just returns the last set value it does not add any functionality, so we can just remove it. Reviewed-by: Marek BehĂșn <kabel@kernel.org> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid')
-rw-r--r--drivers/hid/hid-elan.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/drivers/hid/hid-elan.c b/drivers/hid/hid-elan.c
index 5173f50d474d..021049805bb7 100644
--- a/drivers/hid/hid-elan.c
+++ b/drivers/hid/hid-elan.c
@@ -410,15 +410,6 @@ static int elan_start_multitouch(struct hid_device *hdev)
return 0;
}
-static enum led_brightness elan_mute_led_get_brigtness(struct led_classdev *led_cdev)
-{
- struct device *dev = led_cdev->dev->parent;
- struct hid_device *hdev = to_hid_device(dev);
- struct elan_drvdata *drvdata = hid_get_drvdata(hdev);
-
- return drvdata->mute_led_state;
-}
-
static int elan_mute_led_set_brigtness(struct led_classdev *led_cdev,
enum led_brightness value)
{
@@ -461,7 +452,6 @@ static int elan_init_mute_led(struct hid_device *hdev)
mute_led->name = "elan:red:mute";
mute_led->default_trigger = "audio-mute";
- mute_led->brightness_get = elan_mute_led_get_brigtness;
mute_led->brightness_set_blocking = elan_mute_led_set_brigtness;
mute_led->max_brightness = LED_ON;
mute_led->flags = LED_HW_PLUGGABLE;