summaryrefslogtreecommitdiff
path: root/drivers/net/can/mscan
diff options
context:
space:
mode:
authorGrant Likely <grant.likely@secretlab.ca>2011-02-22 21:05:51 -0700
committerGrant Likely <grant.likely@secretlab.ca>2011-02-28 13:22:44 -0700
commit74888760d40b3ac9054f9c5fa07b566c0676ba2d (patch)
treeede65e8b5ad746ce6c04cbe77ceb5bbf6a6dc6fd /drivers/net/can/mscan
parentf07eb223a081b278be02a58394cb5fd66f1a1bbd (diff)
dt/net: Eliminate users of of_platform_{,un}register_driver
Get rid of users of of_platform_driver in drivers/net. The of_platform_{,un}register_driver functions are going away, so the users need to be converted to using the platform_bus_type directly. Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'drivers/net/can/mscan')
-rw-r--r--drivers/net/can/mscan/mpc5xxx_can.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/net/can/mscan/mpc5xxx_can.c b/drivers/net/can/mscan/mpc5xxx_can.c
index 312b9c8f4f3b..c0a1bc5b1435 100644
--- a/drivers/net/can/mscan/mpc5xxx_can.c
+++ b/drivers/net/can/mscan/mpc5xxx_can.c
@@ -247,10 +247,9 @@ static u32 __devinit mpc512x_can_get_clock(struct platform_device *ofdev,
}
#endif /* CONFIG_PPC_MPC512x */
-static int __devinit mpc5xxx_can_probe(struct platform_device *ofdev,
- const struct of_device_id *id)
+static int __devinit mpc5xxx_can_probe(struct platform_device *ofdev)
{
- struct mpc5xxx_can_data *data = (struct mpc5xxx_can_data *)id->data;
+ struct mpc5xxx_can_data *data;
struct device_node *np = ofdev->dev.of_node;
struct net_device *dev;
struct mscan_priv *priv;
@@ -259,6 +258,10 @@ static int __devinit mpc5xxx_can_probe(struct platform_device *ofdev,
int irq, mscan_clksrc = 0;
int err = -ENOMEM;
+ if (!ofdev->dev.of_match)
+ return -EINVAL;
+ data = (struct mpc5xxx_can_data *)of_dev->dev.of_match->data;
+
base = of_iomap(np, 0);
if (!base) {
dev_err(&ofdev->dev, "couldn't ioremap\n");
@@ -391,7 +394,7 @@ static struct of_device_id __devinitdata mpc5xxx_can_table[] = {
{},
};
-static struct of_platform_driver mpc5xxx_can_driver = {
+static struct platform_driver mpc5xxx_can_driver = {
.driver = {
.name = "mpc5xxx_can",
.owner = THIS_MODULE,
@@ -407,13 +410,13 @@ static struct of_platform_driver mpc5xxx_can_driver = {
static int __init mpc5xxx_can_init(void)
{
- return of_register_platform_driver(&mpc5xxx_can_driver);
+ return platform_driver_register(&mpc5xxx_can_driver);
}
module_init(mpc5xxx_can_init);
static void __exit mpc5xxx_can_exit(void)
{
- return of_unregister_platform_driver(&mpc5xxx_can_driver);
+ platform_driver_unregister(&mpc5xxx_can_driver);
};
module_exit(mpc5xxx_can_exit);