Re: [PATCH v4 05/14] platform/x86: dell-wmi-descriptor: split WMI descriptor into it's own driver

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

 



On Thu, Oct 5, 2017 at 1:48 AM, Mario Limonciello
<mario.limonciello@xxxxxxxx> wrote:
> All communication on individual GUIDs should occur in separate drivers.
> Allowing a driver to communicate with the bus to another GUID is just
> a hack that discourages drivers to adopt the bus model.
>
> The information found from the WMI descriptor driver is now exported
> for use by other drivers.

> +       priv = list_first_entry_or_null(&wmi_list,
> +                                       struct descriptor_priv,
> +                                       list);

> +       priv = list_first_entry_or_null(&wmi_list,
> +                                       struct descriptor_priv,
> +                                       list);

static inline ...to_priv(...)
{
 return list_first_entry_...();
}

> +       list_add_tail(&priv->list, &wmi_list);

> +       list_del(&priv->list);

Do these need locking?

> +bool dell_wmi_get_interface_version(u32 *version);
> +bool dell_wmi_get_size(u32 *size);

This might need stubs when module is not selected (when functionality
is optional if it would be the case), otherwise all users should
select it explicitly.

-- 
With Best Regards,
Andy Shevchenko



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

  Powered by Linux