提交 e3915532 编写于 作者: R Russell King 提交者: Greg Kroah-Hartman

[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: NRussell King <rmk@arm.linux.org.uk>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 670dd90d
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册