Re: [PATCH] platform/x86: Add Acer Wireless Radio Control driver

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

 



On Mon, Nov 20, 2017 at 8:24 PM, Andy Shevchenko
<andy.shevchenko@xxxxxxxxx> wrote:
> On Mon, Nov 20, 2017 at 8:31 AM, Chris Chiu <chiu@xxxxxxxxxxxx> wrote:
>> On Fri, Nov 17, 2017 at 10:25 PM, Andy Shevchenko
>> <andy.shevchenko@xxxxxxxxx> wrote:
>>> On Thu, Nov 16, 2017 at 3:44 PM, Chris Chiu <chiu@xxxxxxxxxxxx> wrote:
>
>>>> +
>>>> +struct acer_wireless_data {
>>>> +       struct input_dev *idev;
>>>
>>>> +       struct acpi_device *adev;
>>>
>>> Do you need this one?
>>> I suppose whenever you need struct device out of it you may find it
>>> via input->parent. Right?
>>>
>>
>> But I think it would make life easier to have the following line in
>> .notify callback
>> struct acer_wireless_data * data = acpi_driver_data(adev);
>>
>> I can get its parent acer_wireless_data and point to input_dev easier.
>
> Yes, though if I'm not mistaken, you may get rid completely of your
> custom container and use struct input_dev for accessing that via
> to_acpi_device(idev->dev.parent).
>
> It would be less code, less data structures, cleaner view.
> Right?
>
>>>> +static int acer_wireless_remove(struct acpi_device *adev)
>>>> +{
>>>> +       return 0;
>>>> +}
>>>> +
>>>
>>> No need UI suppose.
>>>
>>
>> You mean remove this acer_wireless_remove which does nothing? Will do.
>
> Correct.
>
> --
> With Best Regards,
> Andy Shevchenko

I think I get your point. Will soon have a v2 patch later.



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

  Powered by Linux