diff options
author | Geert Uytterhoeven <geert@linux-m68k.org> | 2013-10-16 11:28:54 +0200 |
---|---|---|
committer | Geert Uytterhoeven <geert@linux-m68k.org> | 2013-11-26 11:09:06 +0100 |
commit | 83b7bce3d390f15047e05a186bb4051536ee9dbc (patch) | |
tree | 651419d2486f0add87182dbdf50060a1f497dc59 /drivers/zorro/zorro.c | |
parent | zorro: Refactor conditional handling of Zorro device name database (diff) | |
download | linux-83b7bce3d390f15047e05a186bb4051536ee9dbc.tar.xz linux-83b7bce3d390f15047e05a186bb4051536ee9dbc.zip |
zorro: Let the driver core handle device enumeration
Filling in dev_name of the Zorro bus type and dev.id of each device allows
the driver core to enumerate devices, so we don't have to do that
ourselves.
This changes the names of devices in sysfs from "%02x" to "zorro%u".
Note that filling in dev.id is also needed to support MFD Zorro devices.
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Diffstat (limited to 'drivers/zorro/zorro.c')
-rw-r--r-- | drivers/zorro/zorro.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/zorro/zorro.c b/drivers/zorro/zorro.c index 10c7f77aec08..450abf100f06 100644 --- a/drivers/zorro/zorro.c +++ b/drivers/zorro/zorro.c @@ -142,7 +142,7 @@ static int __init amiga_zorro_probe(struct platform_device *pdev) zorro_autocon = bus->devices; bus->dev.parent = &pdev->dev; - dev_set_name(&bus->dev, "zorro"); + dev_set_name(&bus->dev, zorro_bus_type.name); error = device_register(&bus->dev); if (error) { pr_err("Zorro: Error registering zorro_bus\n"); @@ -180,9 +180,9 @@ static int __init amiga_zorro_probe(struct platform_device *pdev) dev_err(&bus->dev, "Address space collision on device %s %pR\n", z->name, &z->resource); - dev_set_name(&z->dev, "%02x", i); z->dev.parent = &bus->dev; z->dev.bus = &zorro_bus_type; + z->dev.id = i; } /* ... then register them */ |