Re: [PATCH 10/19] platform/x86: lenovo-yogabook: Split probe() into generic and WMI specific parts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Apr 29, 2023 at 9:16 PM Hans de Goede <hdegoede@xxxxxxxxxx> wrote:
>
> Split probe() and remove() into generic and WMI specific parts.
>
> 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.





>         if (IS_ERR(data->pen_led)) {
>                 r = PTR_ERR(data->pen_led);
>                 dev_err_probe(dev, r, "Getting pen icon LED\n");
> -               goto error_put_devs;
> +               return r;
>         }

At the same time you may

return dev_err_probe(PTR_ERR());

Same to the rest of the modified places like this.

...

> +       data->kbd_adev = acpi_dev_get_first_match_dev("GDIX1001", NULL, -1);
> +       if (!data->kbd_adev) {
> +               dev_err(dev, "Cannot find the touchpad device in ACPI tables\n");
> +               return -ENODEV;

return dev_err_probe();

> +       }
> +
> +       data->dig_adev = acpi_dev_get_first_match_dev("WCOM0019", NULL, -1);
> +       if (!data->dig_adev) {
> +               dev_err(dev, "Cannot find the digitizer device in ACPI tables\n");
> +               r = -ENODEV;

r = dev_err_probe(); ?

> +               goto error_put_devs;
> +       }

-- 
With Best Regards,
Andy Shevchenko




[Index of Archives]     [Linux Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux