Revert "HID: core: store the unique system identifier in hid_device"
This reverts commit 2f0ea5e094
which is
commit 1e839143d674603b0bbbc4c513bca35404967dbc upstream.
It breaks the current Android ABI, and if needed, can be brought back in
an abi-safe way in the future.
Bug: 161946584
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Idfcb1fccdf3e86ebd34acc41041fe0893ddb0855
This commit is contained in:
@@ -2445,12 +2445,10 @@ int hid_add_device(struct hid_device *hdev)
|
|||||||
hid_warn(hdev, "bad device descriptor (%d)\n", ret);
|
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
|
/* XXX hack, any other cleaner solution after the driver core
|
||||||
* is converted to allow more than 20 bytes as the device name? */
|
* is converted to allow more than 20 bytes as the device name? */
|
||||||
dev_set_name(&hdev->dev, "%04X:%04X:%04X.%04X", hdev->bus,
|
dev_set_name(&hdev->dev, "%04X:%04X:%04X.%04X", hdev->bus,
|
||||||
hdev->vendor, hdev->product, hdev->id);
|
hdev->vendor, hdev->product, atomic_inc_return(&id));
|
||||||
|
|
||||||
hid_debug_register(hdev, dev_name(&hdev->dev));
|
hid_debug_register(hdev, dev_name(&hdev->dev));
|
||||||
ret = device_add(&hdev->dev);
|
ret = device_add(&hdev->dev);
|
||||||
|
@@ -624,8 +624,6 @@ struct hid_device { /* device report descriptor */
|
|||||||
struct list_head debug_list;
|
struct list_head debug_list;
|
||||||
spinlock_t debug_list_lock;
|
spinlock_t debug_list_lock;
|
||||||
wait_queue_head_t debug_wait;
|
wait_queue_head_t debug_wait;
|
||||||
|
|
||||||
unsigned int id; /* system unique id */
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#define to_hid_device(pdev) \
|
#define to_hid_device(pdev) \
|
||||||
|
Reference in New Issue
Block a user