Re: [PATCH V3] LoongArch: Add ACPI-based generic laptop driver

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

 



Hi,

On 9/17/22 17:39, Huacai Chen wrote:
> Hi, Hans,
> 
> On Sat, Sep 17, 2022 at 6:00 PM Hans de Goede <hdegoede@xxxxxxxxxx> wrote:

<snip>

>>> +     /* Prepare input device, but don't register */
>>> +     generic_inputdev->name =
>>> +             "Loongson Generic Laptop/All-in-one Extra Buttons";
>>> +     generic_inputdev->phys = ACPI_LAPTOP_DRVR_NAME "/input0";
>>> +     generic_inputdev->id.bustype = BUS_HOST;
>>> +     generic_inputdev->dev.parent = NULL;
>>> +
>>> +     /* Init subdrivers */
>>> +     for (i = 0; i < ARRAY_SIZE(generic_sub_drivers); i++) {
>>> +             ret = generic_subdriver_init(&generic_sub_drivers[i]);
>>> +             if (ret < 0) {
>>> +                     input_free_device(generic_inputdev);
>>> +                     return ret;
>>> +             }
>>> +     }
>>
>> I see above that you have only 1 subdriver. Do you expect there to be
>> more in the future ?  If not then it would be better to just completely
>> remove the subdriver abstraction and simply do everything directly
>> from the main probe/remove functions (see below).
> At this time we only add the most basic subdriver, and more subdrivers
> will be added, so I want to keep it here.

Ok, that is fine.

Regards,

Hans




[Index of Archives]     [Linux Kernel]     [Kernel Newbies]     [x86 Platform Driver]     [Netdev]     [Linux Wireless]     [Netfilter]     [Bugtraq]     [Linux Filesystems]     [Yosemite Discussion]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux