aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRussell King <rmk+lkml@arm.linux.org.uk>2006-05-06 03:15:26 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2006-06-21 15:40:48 -0400
commite391553222211e07dfbe2f01c413b4e6d0ae32aa (patch)
tree4240a4023c5434de449a9f73e07a9d1ff0d68c84
parent670dd90d81f60ef429cbba54ad235e9207f4d444 (diff)
[PATCH] Driver Core: Fix platform_device_add to use device_add
platform_device_add() should be using device_add() rather than device_register() - any platform device passed to platform_device_add() should have already been initialised, either by platform_device_alloc() or platform_device_register(). Signed-off-by: Russell King <rmk@arm.linux.org.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--drivers/base/platform.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/base/platform.c b/drivers/base/platform.c
index f8071976fe07..2b8755db76c6 100644
--- a/drivers/base/platform.c
+++ b/drivers/base/platform.c
@@ -275,7 +275,7 @@ int platform_device_add(struct platform_device *pdev)
275 pr_debug("Registering platform device '%s'. Parent at %s\n", 275 pr_debug("Registering platform device '%s'. Parent at %s\n",
276 pdev->dev.bus_id, pdev->dev.parent->bus_id); 276 pdev->dev.bus_id, pdev->dev.parent->bus_id);
277 277
278 ret = device_register(&pdev->dev); 278 ret = device_add(&pdev->dev);
279 if (ret == 0) 279 if (ret == 0)
280 return ret; 280 return ret;
281 281