platform/x86: lenovo-yogabook: Add dev local variable to probe()
authorHans de Goede <hdegoede@redhat.com>
Sun, 30 Apr 2023 16:57:56 +0000 (18:57 +0200)
committerHans de Goede <hdegoede@redhat.com>
Tue, 9 May 2023 10:29:50 +0000 (12:29 +0200)
commita6673cfc6b56a2dc41de416f5ea397943297b79a
treebe98689ce62f42c880434a72e6f59aa3e3decb6a
parent55b809df481ad862ec6b2081c658bd8bfdeec157
platform/x86: lenovo-yogabook: Add dev local variable to probe()

Add a "struct device *dev" local variable to probe().

This is a preparation patch for making lenovo-yogabook-wmi also work
on the Android version of the Yoga Book 1 which does not have a WMI
interface to deal with toggling the keyboard half between
touch-keyboard and wacom-digitizer mode.

While at it also move the dev_set_drvdata() call to the end of probe().

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20230430165807.472798-9-hdegoede@redhat.com
drivers/platform/x86/lenovo-yogabook-wmi.c