]> Git Repo - linux.git/commitdiff
Merge branch 'for-6.1/logitech' into for-linus
authorBenjamin Tissoires <[email protected]>
Wed, 5 Oct 2022 09:21:55 +0000 (10:21 +0100)
committerBenjamin Tissoires <[email protected]>
Wed, 5 Oct 2022 09:21:55 +0000 (10:21 +0100)
- Add hanlding of all Bluetooth HID++ devices and fixes in hid++
  (Bastien Nocera)

1  2 
drivers/hid/hid-core.c

diff --combined drivers/hid/hid-core.c
index aff37d6f587cb99854a0ff874b3dcea4d53ae67b,72f8d8835b34ca6be574f17aec784c2518259d91..9c1d31f63f850860ca9c672fbf43b586c13c566f
@@@ -55,7 -55,7 +55,7 @@@ MODULE_PARM_DESC(ignore_special_drivers
   */
  
  struct hid_report *hid_register_report(struct hid_device *device,
 -                                     unsigned int type, unsigned int id,
 +                                     enum hid_report_type type, unsigned int id,
                                       unsigned int application)
  {
        struct hid_report_enum *report_enum = device->report_enum + type;
@@@ -967,7 -967,7 +967,7 @@@ static const char * const hid_report_na
   * parsing.
   */
  struct hid_report *hid_validate_values(struct hid_device *hid,
 -                                     unsigned int type, unsigned int id,
 +                                     enum hid_report_type type, unsigned int id,
                                       unsigned int field_index,
                                       unsigned int report_counts)
  {
@@@ -1921,7 -1921,7 +1921,7 @@@ static struct hid_report *hid_get_repor
   * DO NOT USE in hid drivers directly, but through hid_hw_request instead.
   */
  int __hid_request(struct hid_device *hid, struct hid_report *report,
 -              int reqtype)
 +              enum hid_class_request reqtype)
  {
        char *buf;
        int ret;
@@@ -1954,8 -1954,8 +1954,8 @@@ out
  }
  EXPORT_SYMBOL_GPL(__hid_request);
  
 -int hid_report_raw_event(struct hid_device *hid, int type, u8 *data, u32 size,
 -              int interrupt)
 +int hid_report_raw_event(struct hid_device *hid, enum hid_report_type type, u8 *data, u32 size,
 +                       int interrupt)
  {
        struct hid_report_enum *report_enum = hid->report_enum + type;
        struct hid_report *report;
@@@ -2019,8 -2019,7 +2019,8 @@@ EXPORT_SYMBOL_GPL(hid_report_raw_event)
   *
   * This is data entry for lower layers.
   */
 -int hid_input_report(struct hid_device *hid, int type, u8 *data, u32 size, int interrupt)
 +int hid_input_report(struct hid_device *hid, enum hid_report_type type, u8 *data, u32 size,
 +                   int interrupt)
  {
        struct hid_report_enum *report_enum;
        struct hid_driver *hdrv;
@@@ -2089,6 -2088,7 +2089,7 @@@ const struct hid_device_id *hid_match_i
  
        return NULL;
  }
+ EXPORT_SYMBOL_GPL(hid_match_id);
  
  static const struct hid_device_id hid_hiddev_list[] = {
        { HID_USB_DEVICE(USB_VENDOR_ID_MGE, USB_DEVICE_ID_MGE_UPS) },
@@@ -2353,7 -2353,7 +2354,7 @@@ EXPORT_SYMBOL_GPL(hid_hw_close)
   * @reqtype: hid request type
   */
  void hid_hw_request(struct hid_device *hdev,
 -                  struct hid_report *report, int reqtype)
 +                  struct hid_report *report, enum hid_class_request reqtype)
  {
        if (hdev->ll_driver->request)
                return hdev->ll_driver->request(hdev, report, reqtype);
@@@ -2378,7 -2378,7 +2379,7 @@@ EXPORT_SYMBOL_GPL(hid_hw_request)
   */
  int hid_hw_raw_request(struct hid_device *hdev,
                       unsigned char reportnum, __u8 *buf,
 -                     size_t len, unsigned char rtype, int reqtype)
 +                     size_t len, enum hid_report_type rtype, enum hid_class_request reqtype)
  {
        if (len < 1 || len > HID_MAX_BUFFER_SIZE || !buf)
                return -EINVAL;
@@@ -2740,12 -2740,10 +2741,12 @@@ int hid_add_device(struct hid_device *h
                        hid_warn(hdev, "bad device descriptor (%d)\n", ret);
        }
  
 +      hdev->id = atomic_inc_return(&id);
 +
        /* XXX hack, any other cleaner solution after the driver core
         * is converted to allow more than 20 bytes as the device name? */
        dev_set_name(&hdev->dev, "%04X:%04X:%04X.%04X", hdev->bus,
 -                   hdev->vendor, hdev->product, atomic_inc_return(&id));
 +                   hdev->vendor, hdev->product, hdev->id);
  
        hid_debug_register(hdev, dev_name(&hdev->dev));
        ret = device_add(&hdev->dev);
This page took 0.073225 seconds and 4 git commands to generate.