diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-01-18 14:15:05 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-01-18 14:15:05 -0500 |
commit | 4092762aebfe55c1f8e31440b80a053c2dbe519b (patch) | |
tree | 8fb9fd14131194174c12daf5d8195afd3b62bc3e /drivers/zorro/zorro.c | |
parent | 745b1626dd71ce9661a05ea4db57859ed5c773d2 (diff) | |
parent | 1de9e8e70f5acc441550ca75433563d91b269bbe (diff) |
Merge branch 'tracing/ftrace'; commit 'v2.6.29-rc2' into tracing/core
Diffstat (limited to 'drivers/zorro/zorro.c')
-rw-r--r-- | drivers/zorro/zorro.c | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/drivers/zorro/zorro.c b/drivers/zorro/zorro.c index dff16d9767d8..a1585d6f6486 100644 --- a/drivers/zorro/zorro.c +++ b/drivers/zorro/zorro.c | |||
@@ -130,6 +130,7 @@ static int __init zorro_init(void) | |||
130 | { | 130 | { |
131 | struct zorro_dev *z; | 131 | struct zorro_dev *z; |
132 | unsigned int i; | 132 | unsigned int i; |
133 | int error; | ||
133 | 134 | ||
134 | if (!MACH_IS_AMIGA || !AMIGAHW_PRESENT(ZORRO)) | 135 | if (!MACH_IS_AMIGA || !AMIGAHW_PRESENT(ZORRO)) |
135 | return 0; | 136 | return 0; |
@@ -140,7 +141,11 @@ static int __init zorro_init(void) | |||
140 | /* Initialize the Zorro bus */ | 141 | /* Initialize the Zorro bus */ |
141 | INIT_LIST_HEAD(&zorro_bus.devices); | 142 | INIT_LIST_HEAD(&zorro_bus.devices); |
142 | strcpy(zorro_bus.dev.bus_id, "zorro"); | 143 | strcpy(zorro_bus.dev.bus_id, "zorro"); |
143 | device_register(&zorro_bus.dev); | 144 | error = device_register(&zorro_bus.dev); |
145 | if (error) { | ||
146 | pr_err("Zorro: Error registering zorro_bus\n"); | ||
147 | return error; | ||
148 | } | ||
144 | 149 | ||
145 | /* Request the resources */ | 150 | /* Request the resources */ |
146 | zorro_bus.num_resources = AMIGAHW_PRESENT(ZORRO3) ? 4 : 2; | 151 | zorro_bus.num_resources = AMIGAHW_PRESENT(ZORRO3) ? 4 : 2; |
@@ -160,15 +165,19 @@ static int __init zorro_init(void) | |||
160 | zorro_name_device(z); | 165 | zorro_name_device(z); |
161 | z->resource.name = z->name; | 166 | z->resource.name = z->name; |
162 | if (request_resource(zorro_find_parent_resource(z), &z->resource)) | 167 | if (request_resource(zorro_find_parent_resource(z), &z->resource)) |
163 | printk(KERN_ERR "Zorro: Address space collision on device %s " | 168 | pr_err("Zorro: Address space collision on device %s %pR\n", |
164 | "[%lx:%lx]\n", | 169 | z->name, &z->resource); |
165 | z->name, (unsigned long)zorro_resource_start(z), | ||
166 | (unsigned long)zorro_resource_end(z)); | ||
167 | sprintf(z->dev.bus_id, "%02x", i); | 170 | sprintf(z->dev.bus_id, "%02x", i); |
168 | z->dev.parent = &zorro_bus.dev; | 171 | z->dev.parent = &zorro_bus.dev; |
169 | z->dev.bus = &zorro_bus_type; | 172 | z->dev.bus = &zorro_bus_type; |
170 | device_register(&z->dev); | 173 | error = device_register(&z->dev); |
171 | zorro_create_sysfs_dev_files(z); | 174 | if (error) { |
175 | pr_err("Zorro: Error registering device %s\n", z->name); | ||
176 | continue; | ||
177 | } | ||
178 | error = zorro_create_sysfs_dev_files(z); | ||
179 | if (error) | ||
180 | dev_err(&z->dev, "Error creating sysfs files\n"); | ||
172 | } | 181 | } |
173 | 182 | ||
174 | /* Mark all available Zorro II memory */ | 183 | /* Mark all available Zorro II memory */ |