Re: [PATCH 17/19] platform/x86: lenovo-yogabook: Add platform driver support

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

 



Hi Andy,

Thank you for all the reviews.

I agree with all your comments and I will fix them
all for version 2 of this series.


On 4/30/23 12:49, Andy Shevchenko wrote:

<snip>

>> +       r = gpiod_to_irq(data->pen_touch_event);
>> +       if (r < 0) {
>> +               dev_err_probe(dev, r, "Getting pen_touch_event IRQ\n");
>> +               return r;
> 
> return dev_err_probe();
> 
>> +       }
>> +       data->pen_touch_irq = r;
>> +
>> +       r = request_irq(data->pen_touch_irq, yogabook_pen_touch_irq, IRQF_TRIGGER_FALLING,
>> +                       "pen_touch_event", data);
>> +       if (r) {
>> +               dev_err_probe(dev, r, "Requesting backside_hall_sw IRQ\n");
>> +               return r;
> 
> Ditto.

Actually this block has 2 copy and paste errors:

1. The second error message
2. Both "return r;" statements need to be replaced with goto error_put_devs.

I'll fix this both for version 2.

> 
>> +       }
> 
> ...
> 
>> +MODULE_ALIAS("platform:" YB_PDEV_NAME);
> 
> Hmm... Do we need this?

Yes simple platform_drivers like this one typically don't have
a device-id table (they simply match by name) and thus they also
don't have a MODULE_DEVICE_TABLE(platform, ...); statement so
they need an explicit MODULE_ALIAS to correctly auto-load.

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