]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
powerpc: ps3: use dev_groups and not dev_attrs for bus_type
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 6 Jun 2017 12:17:17 +0000 (14:17 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 9 Jun 2017 09:00:46 +0000 (11:00 +0200)
The dev_attrs field has long been "depreciated" and is finally being
removed, so move the driver to use the "correct" dev_groups field
instead for struct bus_type.

Seems-ok: Geoff Levand <geoff@infradead.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: <linuxppc-dev@lists.ozlabs.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/powerpc/platforms/ps3/system-bus.c

index 2d2e5f80a3d3fd3854c1774e89113bef4c7fcb6d..5cc35d6b94b6c8627527d2232ebf879f73b8e0d6 100644 (file)
@@ -471,11 +471,13 @@ static ssize_t modalias_show(struct device *_dev, struct device_attribute *a,
 
        return (len >= PAGE_SIZE) ? (PAGE_SIZE - 1) : len;
 }
+static DEVICE_ATTR_RO(modalias);
 
-static struct device_attribute ps3_system_bus_dev_attrs[] = {
-       __ATTR_RO(modalias),
-       __ATTR_NULL,
+static struct attribute *ps3_system_bus_dev_attrs[] = {
+       &dev_attr_modalias.attr,
+       NULL,
 };
+ATTRIBUTE_GROUPS(ps3_system_bus_dev);
 
 struct bus_type ps3_system_bus_type = {
        .name = "ps3_system_bus",
@@ -484,7 +486,7 @@ struct bus_type ps3_system_bus_type = {
        .probe = ps3_system_bus_probe,
        .remove = ps3_system_bus_remove,
        .shutdown = ps3_system_bus_shutdown,
-       .dev_attrs = ps3_system_bus_dev_attrs,
+       .dev_groups = ps3_system_bus_dev_groups,
 };
 
 static int __init ps3_system_bus_init(void)