Re: [PATCH 05/18] HID: introduce hid_get_feature

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

 



On Tue, Dec 21, 2021 at 07:17:30PM +0000, Angela Czubak wrote:
> Move mt_get_feature from hid-multitouch to hid-core as it is a generic
> function that can be used by other drivers as well.
> 
> Signed-off-by: Angela Czubak <acz@xxxxxxxxxxxx>
> ---
>  drivers/hid/hid-core.c       | 39 ++++++++++++++++++++++++++++++++++++
>  drivers/hid/hid-multitouch.c | 38 +++--------------------------------
>  include/linux/hid.h          |  1 +
>  3 files changed, 43 insertions(+), 35 deletions(-)
> 
> diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
> index dbed2524fd47..c11cb7324157 100644
> --- a/drivers/hid/hid-core.c
> +++ b/drivers/hid/hid-core.c
> @@ -1796,6 +1796,45 @@ int hid_report_raw_event(struct hid_device *hid, int type, u8 *data, u32 size,
>  }
>  EXPORT_SYMBOL_GPL(hid_report_raw_event);
>  
> +/**
> + * hid_get_feature - retrieve feature report from device
> + *
> + * @hdev: hid device
> + * @report: hid report to retrieve
> + */
> +void hid_get_feature(struct hid_device *hdev, struct hid_report *report)

If this is a generic API I believe it should return success/error code
so that users can decide what to do.

Thanks.

-- 
Dmitry



[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux