Skip to content

Commit 6cd132b

Browse files
author
Jiri Kosina
committed
Merge branch 'for-6.2/sensor' into for-linus
- support for more than one hinge sensor in hid-sensor-custom (Yauhen Kharuzhy)
2 parents 54dcc80 + 9d01391 commit 6cd132b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/hid/hid-sensor-custom.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ struct hid_sensor_sample {
6262
u32 raw_len;
6363
} __packed;
6464

65-
static struct attribute hid_custom_attrs[] = {
65+
static struct attribute hid_custom_attrs[HID_CUSTOM_TOTAL_ATTRS] = {
6666
{.name = "name", .mode = S_IRUGO},
6767
{.name = "units", .mode = S_IRUGO},
6868
{.name = "unit-expo", .mode = S_IRUGO},
@@ -862,7 +862,7 @@ hid_sensor_register_platform_device(struct platform_device *pdev,
862862
return ERR_PTR(-ENOMEM);
863863

864864
custom_pdev = platform_device_register_data(pdev->dev.parent, dev_name,
865-
PLATFORM_DEVID_NONE, hsdev,
865+
PLATFORM_DEVID_AUTO, hsdev,
866866
sizeof(*hsdev));
867867
kfree(dev_name);
868868
return custom_pdev;

0 commit comments

Comments
 (0)