[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75Vd9u3VqHh77BcW35rmSDCB-zuiNoV_6ZtWVYss-QtCjZw@mail.gmail.com>
Date: Mon, 20 Nov 2017 14:24:28 +0200
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Chris Chiu <chiu@...lessm.com>
Cc: "dvhart@...radead.org" <dvhart@...radead.org>,
Andy Shevchenko <andy@...radead.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Platform Driver <platform-driver-x86@...r.kernel.org>,
Linux Upstreaming Team <linux@...lessm.com>
Subject: Re: [PATCH] platform/x86: Add Acer Wireless Radio Control driver
On Mon, Nov 20, 2017 at 8:31 AM, Chris Chiu <chiu@...lessm.com> wrote:
> On Fri, Nov 17, 2017 at 10:25 PM, Andy Shevchenko
> <andy.shevchenko@...il.com> wrote:
>> On Thu, Nov 16, 2017 at 3:44 PM, Chris Chiu <chiu@...lessm.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
Powered by blists - more mailing lists