From: Jiri Slaby Date: Thu, 4 Apr 2013 20:32:12 +0000 (+0200) Subject: HID: hid-lenovo-tpkbd: remove doubled hid_get_drvdata X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3a7f134f3061c242659a92fd8ddcfe53aaeaec22;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git HID: hid-lenovo-tpkbd: remove doubled hid_get_drvdata In pointer_press_speed_show, we do data_pointer = hid_get_drvdata(hdev); twice in a row. Remove one of those. Signed-off-by: Jiri Slaby Signed-off-by: Jiri Kosina --- diff --git a/drivers/hid/hid-lenovo-tpkbd.c b/drivers/hid/hid-lenovo-tpkbd.c index 956c3b135f64..c842ece2be37 100644 --- a/drivers/hid/hid-lenovo-tpkbd.c +++ b/drivers/hid/hid-lenovo-tpkbd.c @@ -228,8 +228,6 @@ static ssize_t pointer_press_speed_show(struct device *dev, struct hid_device *hdev = container_of(dev, struct hid_device, dev); struct tpkbd_data_pointer *data_pointer = hid_get_drvdata(hdev); - data_pointer = hid_get_drvdata(hdev); - return snprintf(buf, PAGE_SIZE, "%u\n", data_pointer->press_speed); }