lkml.org 
[lkml]   [2017]   [Nov]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] platform/x86: Add Acer Wireless Radio Control driver
On Mon, Nov 20, 2017 at 8:31 AM, Chris Chiu <chiu@endlessm.com> wrote:
> On Fri, Nov 17, 2017 at 10:25 PM, Andy Shevchenko
> <andy.shevchenko@gmail.com> wrote:
>> On Thu, Nov 16, 2017 at 3:44 PM, Chris Chiu <chiu@endlessm.com> 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

\
 
 \ /
  Last update: 2017-11-20 13:25    [W:0.072 / U:3.532 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site