diff options
author | Christian Gromm <christian.gromm@microchip.com> | 2020-05-15 11:21:04 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-05-15 15:35:13 +0200 |
commit | dfeb9380eba403ed0fb296bf077a9f30e4dc55d6 (patch) | |
tree | c29bd93169ce3b219d5d75c7c25a86558155b33f /drivers/staging/most/usb | |
parent | 629e123df34a9c8aadf683c43928739e32f7a1d8 (diff) |
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: Christian Gromm <christian.gromm@microchip.com>
Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/r/1589534465-7423-7-git-send-email-christian.gromm@microchip.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/most/usb')
-rw-r--r-- | drivers/staging/most/usb/usb.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/drivers/staging/most/usb/usb.c b/drivers/staging/most/usb/usb.c index 8995ed072009..56b75e42aafe 100644 --- a/drivers/staging/most/usb/usb.c +++ b/drivers/staging/most/usb/usb.c @@ -905,14 +905,7 @@ static struct attribute *dci_attrs[] = { NULL, }; -static struct attribute_group dci_attr_group = { - .attrs = dci_attrs, -}; - -static const struct attribute_group *dci_attr_groups[] = { - &dci_attr_group, - NULL, -}; +ATTRIBUTE_GROUPS(dci); static void release_dci(struct device *dev) { @@ -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.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; if (device_register(&mdev->dci->dev)) { mutex_unlock(&mdev->io_mutex); |