Skip to content

Commit

Permalink
[PATCH] Driver Core: Fix platform_device_add to use device_add
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Russell King authored and Greg Kroah-Hartman committed Jun 21, 2006
1 parent 670dd90 commit e391553
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/base/platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ int platform_device_add(struct platform_device *pdev)
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;

Expand Down

0 comments on commit e391553

Please sign in to comment.