Skip to content

Commit 684e00c

Browse files
committed
Merge branch 'for-6.1/sony' into for-linus
- playstation: convert to use dev_groups (Greg Kroah-Hartman)
2 parents edd1533 + 454d243 commit 684e00c

File tree

2 files changed

+6
-12
lines changed

2 files changed

+6
-12
lines changed

drivers/hid/hid-playstation.c

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -692,15 +692,12 @@ static ssize_t hardware_version_show(struct device *dev,
692692

693693
static DEVICE_ATTR_RO(hardware_version);
694694

695-
static struct attribute *ps_device_attributes[] = {
695+
static struct attribute *ps_device_attrs[] = {
696696
&dev_attr_firmware_version.attr,
697697
&dev_attr_hardware_version.attr,
698698
NULL
699699
};
700-
701-
static const struct attribute_group ps_device_attribute_group = {
702-
.attrs = ps_device_attributes,
703-
};
700+
ATTRIBUTE_GROUPS(ps_device);
704701

705702
static int dualsense_get_calibration_data(struct dualsense *ds)
706703
{
@@ -1448,12 +1445,6 @@ static int ps_probe(struct hid_device *hdev, const struct hid_device_id *id)
14481445
}
14491446
}
14501447

1451-
ret = devm_device_add_group(&hdev->dev, &ps_device_attribute_group);
1452-
if (ret) {
1453-
hid_err(hdev, "Failed to register sysfs nodes.\n");
1454-
goto err_close;
1455-
}
1456-
14571448
return ret;
14581449

14591450
err_close:
@@ -1487,6 +1478,9 @@ static struct hid_driver ps_driver = {
14871478
.probe = ps_probe,
14881479
.remove = ps_remove,
14891480
.raw_event = ps_raw_event,
1481+
.driver = {
1482+
.dev_groups = ps_device_groups,
1483+
},
14901484
};
14911485

14921486
static int __init ps_init(void)

drivers/hid/hid-sony.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ static const unsigned int buzz_keymap[] = {
368368
};
369369

370370
/* The Navigation controller is a partial DS3 and uses the same HID report
371-
* and hence the same keymap indices, however not not all axes/buttons
371+
* and hence the same keymap indices, however not all axes/buttons
372372
* are physically present. We use the same axis and button mapping as
373373
* the DS3, which uses the Linux gamepad spec.
374374
*/

0 commit comments

Comments
 (0)