From rmk+gregkh=suse.de@arm.linux.org.uk Sat May 6 00:15:45 2006 Date: Sat, 6 May 2006 08:15:26 +0100 From: Russell King To: Andrew Morton , Paolo 'Blaisorblade' Giarrusso , gregkh@suse.de Subject: Driver Core: Fix platform_device_add to use device_add Message-ID: <20060506071526.GC18829@flint.arm.linux.org.uk> Content-Disposition: inline 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 Signed-off-by: Greg Kroah-Hartman --- drivers/base/platform.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- gregkh-2.6.orig/drivers/base/platform.c +++ gregkh-2.6/drivers/base/platform.c @@ -275,7 +275,7 @@ int platform_device_add(struct platform_ pr_debug("Registering platform device '%s'. Parent at %s\n", pdev->dev.bus_id, pdev->dev.parent->bus_id); - ret = device_register(&pdev->dev); + ret = device_add(&pdev->dev); if (ret == 0) return ret;