dt/powerpc: Eliminate users of of_platform_{,un}register_driver
Get rid of old users of of_platform_driver in arch/powerpc. Most of_platform_driver users can be converted to use the platform_bus directly. Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
This commit is contained in:
@@ -318,14 +318,18 @@ static const struct platform_suspend_ops mpc83xx_suspend_ops = {
|
||||
.end = mpc83xx_suspend_end,
|
||||
};
|
||||
|
||||
static int pmc_probe(struct platform_device *ofdev,
|
||||
const struct of_device_id *match)
|
||||
static int pmc_probe(struct platform_device *ofdev)
|
||||
{
|
||||
struct device_node *np = ofdev->dev.of_node;
|
||||
struct resource res;
|
||||
struct pmc_type *type = match->data;
|
||||
struct pmc_type *type;
|
||||
int ret = 0;
|
||||
|
||||
if (!ofdev->dev.of_match)
|
||||
return -EINVAL;
|
||||
|
||||
type = ofdev->dev.of_match->data;
|
||||
|
||||
if (!of_device_is_available(np))
|
||||
return -ENODEV;
|
||||
|
||||
@@ -422,7 +426,7 @@ static struct of_device_id pmc_match[] = {
|
||||
{}
|
||||
};
|
||||
|
||||
static struct of_platform_driver pmc_driver = {
|
||||
static struct platform_driver pmc_driver = {
|
||||
.driver = {
|
||||
.name = "mpc83xx-pmc",
|
||||
.owner = THIS_MODULE,
|
||||
@@ -434,7 +438,7 @@ static struct of_platform_driver pmc_driver = {
|
||||
|
||||
static int pmc_init(void)
|
||||
{
|
||||
return of_register_platform_driver(&pmc_driver);
|
||||
return platform_driver_register(&pmc_driver);
|
||||
}
|
||||
|
||||
module_init(pmc_init);
|
||||
|
Reference in New Issue
Block a user