Re: [PATCH v2 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]

 



Hi,

On 5/1/23 11:53, Andy Shevchenko wrote:
> On Sun, Apr 30, 2023 at 7:58 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.
> 
> ...
> 
>> Changes in v2:
>> - Use "return dev_err_probe(...);" in several places to simplify
>>   error-exits in the new yogabook_probe() function
> 
> I'm not sure you have changed previous patches where it makes sense to
> use dev_err_probe().

Actually the 2 cases you point out below are the 2 last regular dev_err()
calls in the probe() path of the driver.

> Neither it's done (in full) here (in case you
> wanted to split replacement to a separate change). See below.
> 
> ...
> 
>> +       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;
> 
> Here...
> 
>> +       }
>> +
>> +       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;
> 
> ...and here.

Ack I've fixed these both up while merging this series.

Regards,

Hans





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

  Powered by Linux