aboutsummaryrefslogtreecommitdiff
path: root/drivers/zorro/zorro.c
diff options
context:
space:
mode:
authorArnd Bergmann2011-10-20 15:30:55 +0200
committerArnd Bergmann2011-10-20 15:30:55 +0200
commit29ea35969b92a4be122a58c4aceea8c5e2c388d9 (patch)
tree8285c0e98e7bb03868d390b58180e3cab876a8db /drivers/zorro/zorro.c
parent112d17d6f75b93e1dcaec2e2232a411148b3bf71 (diff)
parentb4cbb8a4e602ea77b0525d06eff89c6a6070dab3 (diff)
Merge branch 'imx/devel' into next/devel
Diffstat (limited to 'drivers/zorro/zorro.c')
-rw-r--r--drivers/zorro/zorro.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/zorro/zorro.c b/drivers/zorro/zorro.c
index e0c2807b0970..181fa8158a8b 100644
--- a/drivers/zorro/zorro.c
+++ b/drivers/zorro/zorro.c
@@ -148,10 +148,10 @@ static int __init amiga_zorro_probe(struct platform_device *pdev)
}
platform_set_drvdata(pdev, bus);
- /* Register all devices */
pr_info("Zorro: Probing AutoConfig expansion devices: %u device%s\n",
zorro_num_autocon, zorro_num_autocon == 1 ? "" : "s");
+ /* First identify all devices ... */
for (i = 0; i < zorro_num_autocon; i++) {
z = &zorro_autocon[i];
z->id = (z->rom.er_Manufacturer<<16) | (z->rom.er_Product<<8);
@@ -172,6 +172,11 @@ static int __init amiga_zorro_probe(struct platform_device *pdev)
dev_set_name(&z->dev, "%02x", i);
z->dev.parent = &bus->dev;
z->dev.bus = &zorro_bus_type;
+ }
+
+ /* ... then register them */
+ for (i = 0; i < zorro_num_autocon; i++) {
+ z = &zorro_autocon[i];
error = device_register(&z->dev);
if (error) {
dev_err(&bus->dev, "Error registering device %s\n",