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-driver.c | |
parent | 52182c758f7c9bc34dbee0dfdce13d356de50f03 (diff) | |
download | linux-83b7bce3d390f15047e05a186bb4051536ee9dbc.tar.gz linux-83b7bce3d390f15047e05a186bb4051536ee9dbc.tar.bz2 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-driver.c')
-rw-r--r-- | drivers/zorro/zorro-driver.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/zorro/zorro-driver.c b/drivers/zorro/zorro-driver.c index ac1db7f1bcab..eacae1434b73 100644 --- a/drivers/zorro/zorro-driver.c +++ b/drivers/zorro/zorro-driver.c @@ -161,11 +161,12 @@ static int zorro_uevent(struct device *dev, struct kobj_uevent_env *env) } struct bus_type zorro_bus_type = { - .name = "zorro", - .match = zorro_bus_match, - .uevent = zorro_uevent, - .probe = zorro_device_probe, - .remove = zorro_device_remove, + .name = "zorro", + .dev_name = "zorro", + .match = zorro_bus_match, + .uevent = zorro_uevent, + .probe = zorro_device_probe, + .remove = zorro_device_remove, }; EXPORT_SYMBOL(zorro_bus_type); |