Commit dfeb9380 authored by Christian Gromm's avatar Christian Gromm Committed by Greg Kroah-Hartman

staging: most: usb: use macro ATTRIBUTE_GROUPS

This patch makes use of the macro ATTRIBUTE_GROUPS to create the groups
instead of defining them manually.
Signed-off-by: default avatarChristian Gromm <christian.gromm@microchip.com>
Reported-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/r/1589534465-7423-7-git-send-email-christian.gromm@microchip.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 629e123d
...@@ -905,14 +905,7 @@ static struct attribute *dci_attrs[] = { ...@@ -905,14 +905,7 @@ static struct attribute *dci_attrs[] = {
NULL, NULL,
}; };
static struct attribute_group dci_attr_group = { ATTRIBUTE_GROUPS(dci);
.attrs = dci_attrs,
};
static const struct attribute_group *dci_attr_groups[] = {
&dci_attr_group,
NULL,
};
static void release_dci(struct device *dev) static void release_dci(struct device *dev)
{ {
...@@ -1065,7 +1058,7 @@ hdm_probe(struct usb_interface *interface, const struct usb_device_id *id) ...@@ -1065,7 +1058,7 @@ hdm_probe(struct usb_interface *interface, const struct usb_device_id *id)
mdev->dci->dev.init_name = "dci"; mdev->dci->dev.init_name = "dci";
mdev->dci->dev.parent = get_device(mdev->iface.dev); mdev->dci->dev.parent = get_device(mdev->iface.dev);
mdev->dci->dev.groups = dci_attr_groups; mdev->dci->dev.groups = dci_groups;
mdev->dci->dev.release = release_dci; mdev->dci->dev.release = release_dci;
if (device_register(&mdev->dci->dev)) { if (device_register(&mdev->dci->dev)) {
mutex_unlock(&mdev->io_mutex); mutex_unlock(&mdev->io_mutex);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment