diff options
author | 2022-12-13 14:40:18 +0100 | |
---|---|---|
committer | 2022-12-13 14:40:18 +0100 | |
commit | 6cd132b4f3d09b320ee81feec4c9758cd7e516ba (patch) | |
tree | 81de9586c26e5fb54899e4fabd246c18578e9b7e | |
parent | Merge branch 'for-6.2/rmi' into for-linus (diff) | |
parent | HID: hid-sensor-custom: set fixed size for custom attributes (diff) | |
download | wireguard-linux-6cd132b4f3d09b320ee81feec4c9758cd7e516ba.tar.xz wireguard-linux-6cd132b4f3d09b320ee81feec4c9758cd7e516ba.zip |
Merge branch 'for-6.2/sensor' into for-linus
- support for more than one hinge sensor in hid-sensor-custom (Yauhen Kharuzhy)
Diffstat (limited to '')
-rw-r--r-- | drivers/hid/hid-sensor-custom.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/hid/hid-sensor-custom.c b/drivers/hid/hid-sensor-custom.c index 32c2306e240d..f444e63e9f36 100644 --- a/drivers/hid/hid-sensor-custom.c +++ b/drivers/hid/hid-sensor-custom.c @@ -62,7 +62,7 @@ struct hid_sensor_sample { u32 raw_len; } __packed; -static struct attribute hid_custom_attrs[] = { +static struct attribute hid_custom_attrs[HID_CUSTOM_TOTAL_ATTRS] = { {.name = "name", .mode = S_IRUGO}, {.name = "units", .mode = S_IRUGO}, {.name = "unit-expo", .mode = S_IRUGO}, @@ -862,7 +862,7 @@ hid_sensor_register_platform_device(struct platform_device *pdev, return ERR_PTR(-ENOMEM); custom_pdev = platform_device_register_data(pdev->dev.parent, dev_name, - PLATFORM_DEVID_NONE, hsdev, + PLATFORM_DEVID_AUTO, hsdev, sizeof(*hsdev)); kfree(dev_name); return custom_pdev; |