summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Dooks <ben-linux@org.rmk.(none)>2004-11-29 15:17:44 +0000
committerRussell King <rmk@flint.arm.linux.org.uk>2004-11-29 15:17:44 +0000
commit2493b8aed2f58645eff1feb14cf99e5c2ff223d4 (patch)
tree8ddb42bea47b71aead87b2e75df6480d4c864cb7
parent0a4450c5c6c3234a86c42051f73adc1290efb6b8 (diff)
[ARM PATCH] 2284/1: S3C2410 - core device registration update
Patch from Ben Dooks If one of the devices fails to register, do not remove any registered devices and continue registering in case any more devices register. Signed-off-by: Ben Dooks Signed-off-by: Russell King
-rw-r--r--arch/arm/mach-s3c2410/cpu.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/arch/arm/mach-s3c2410/cpu.c b/arch/arm/mach-s3c2410/cpu.c
index 772f0309ee91..f55701776dbe 100644
--- a/arch/arm/mach-s3c2410/cpu.c
+++ b/arch/arm/mach-s3c2410/cpu.c
@@ -174,9 +174,15 @@ static int __init s3c_arch_init(void)
return ret;
if (board != NULL) {
- ret = platform_add_devices(board->devices, board->devices_count);
- if (ret) {
- printk(KERN_ERR "s3c24xx: failed to add board devices (%d)\n", ret);
+ struct platform_device **ptr = board->devices;
+ int i;
+
+ for (i = 0; i < board->devices_count; i++, ptr++) {
+ ret = platform_device_register(*ptr);
+
+ if (ret) {
+ printk(KERN_ERR "s3c24xx: failed to add board device %s (%d) @%p\n", (*ptr)->name, ret, *ptr);
+ }
}
/* mask any error, we may not need all these board