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@xxxxxxxxxxxxx> Reported-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- v2: drivers/most/most_usb.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/drivers/most/most_usb.c b/drivers/most/most_usb.c index 35620a1..dce64bb 100644 --- a/drivers/most/most_usb.c +++ b/drivers/most/most_usb.c @@ -999,14 +999,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) { @@ -1159,7 +1152,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); -- 2.7.4