diff options
| author | Grant Likely <grant.likely@secretlab.ca> | 2010-08-06 11:25:50 -0400 |
|---|---|---|
| committer | Grant Likely <grant.likely@secretlab.ca> | 2010-08-06 11:25:50 -0400 |
| commit | 2dc11581376829303b98eadb2de253bee065a56a (patch) | |
| tree | dbce62559c822cd720d1819a50c488bfecdfa945 /drivers/net/can | |
| parent | fc1caf6eafb30ea185720e29f7f5eccca61ecd60 (diff) | |
of/device: Replace struct of_device with struct platform_device
of_device is just an alias for platform_device, so remove it entirely. Also
replace to_of_device() with to_platform_device() and update comment blocks.
This patch was initially generated from the following semantic patch, and then
edited by hand to pick up the bits that coccinelle didn't catch.
@@
@@
-struct of_device
+struct platform_device
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Reviewed-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/can')
| -rw-r--r-- | drivers/net/can/mscan/mpc5xxx_can.c | 18 | ||||
| -rw-r--r-- | drivers/net/can/sja1000/sja1000_of_platform.c | 4 |
2 files changed, 11 insertions, 11 deletions
diff --git a/drivers/net/can/mscan/mpc5xxx_can.c b/drivers/net/can/mscan/mpc5xxx_can.c index af753936e835..b1bdc909090f 100644 --- a/drivers/net/can/mscan/mpc5xxx_can.c +++ b/drivers/net/can/mscan/mpc5xxx_can.c | |||
| @@ -38,7 +38,7 @@ | |||
| 38 | 38 | ||
| 39 | struct mpc5xxx_can_data { | 39 | struct mpc5xxx_can_data { |
| 40 | unsigned int type; | 40 | unsigned int type; |
| 41 | u32 (*get_clock)(struct of_device *ofdev, const char *clock_name, | 41 | u32 (*get_clock)(struct platform_device *ofdev, const char *clock_name, |
| 42 | int *mscan_clksrc); | 42 | int *mscan_clksrc); |
| 43 | }; | 43 | }; |
| 44 | 44 | ||
| @@ -48,7 +48,7 @@ static struct of_device_id __devinitdata mpc52xx_cdm_ids[] = { | |||
| 48 | {} | 48 | {} |
| 49 | }; | 49 | }; |
| 50 | 50 | ||
| 51 | static u32 __devinit mpc52xx_can_get_clock(struct of_device *ofdev, | 51 | static u32 __devinit mpc52xx_can_get_clock(struct platform_device *ofdev, |
| 52 | const char *clock_name, | 52 | const char *clock_name, |
| 53 | int *mscan_clksrc) | 53 | int *mscan_clksrc) |
| 54 | { | 54 | { |
| @@ -101,7 +101,7 @@ static u32 __devinit mpc52xx_can_get_clock(struct of_device *ofdev, | |||
| 101 | return freq; | 101 | return freq; |
| 102 | } | 102 | } |
| 103 | #else /* !CONFIG_PPC_MPC52xx */ | 103 | #else /* !CONFIG_PPC_MPC52xx */ |
| 104 | static u32 __devinit mpc52xx_can_get_clock(struct of_device *ofdev, | 104 | static u32 __devinit mpc52xx_can_get_clock(struct platform_device *ofdev, |
| 105 | const char *clock_name, | 105 | const char *clock_name, |
| 106 | int *mscan_clksrc) | 106 | int *mscan_clksrc) |
| 107 | { | 107 | { |
| @@ -129,7 +129,7 @@ static struct of_device_id __devinitdata mpc512x_clock_ids[] = { | |||
| 129 | {} | 129 | {} |
| 130 | }; | 130 | }; |
| 131 | 131 | ||
| 132 | static u32 __devinit mpc512x_can_get_clock(struct of_device *ofdev, | 132 | static u32 __devinit mpc512x_can_get_clock(struct platform_device *ofdev, |
| 133 | const char *clock_name, | 133 | const char *clock_name, |
| 134 | int *mscan_clksrc) | 134 | int *mscan_clksrc) |
| 135 | { | 135 | { |
| @@ -239,7 +239,7 @@ exit_unmap: | |||
| 239 | return freq; | 239 | return freq; |
| 240 | } | 240 | } |
| 241 | #else /* !CONFIG_PPC_MPC512x */ | 241 | #else /* !CONFIG_PPC_MPC512x */ |
| 242 | static u32 __devinit mpc512x_can_get_clock(struct of_device *ofdev, | 242 | static u32 __devinit mpc512x_can_get_clock(struct platform_device *ofdev, |
| 243 | const char *clock_name, | 243 | const char *clock_name, |
| 244 | int *mscan_clksrc) | 244 | int *mscan_clksrc) |
| 245 | { | 245 | { |
| @@ -247,7 +247,7 @@ static u32 __devinit mpc512x_can_get_clock(struct of_device *ofdev, | |||
| 247 | } | 247 | } |
| 248 | #endif /* CONFIG_PPC_MPC512x */ | 248 | #endif /* CONFIG_PPC_MPC512x */ |
| 249 | 249 | ||
| 250 | static int __devinit mpc5xxx_can_probe(struct of_device *ofdev, | 250 | static int __devinit mpc5xxx_can_probe(struct platform_device *ofdev, |
| 251 | const struct of_device_id *id) | 251 | const struct of_device_id *id) |
| 252 | { | 252 | { |
| 253 | struct mpc5xxx_can_data *data = (struct mpc5xxx_can_data *)id->data; | 253 | struct mpc5xxx_can_data *data = (struct mpc5xxx_can_data *)id->data; |
| @@ -317,7 +317,7 @@ exit_unmap_mem: | |||
| 317 | return err; | 317 | return err; |
| 318 | } | 318 | } |
| 319 | 319 | ||
| 320 | static int __devexit mpc5xxx_can_remove(struct of_device *ofdev) | 320 | static int __devexit mpc5xxx_can_remove(struct platform_device *ofdev) |
| 321 | { | 321 | { |
| 322 | struct net_device *dev = dev_get_drvdata(&ofdev->dev); | 322 | struct net_device *dev = dev_get_drvdata(&ofdev->dev); |
| 323 | struct mscan_priv *priv = netdev_priv(dev); | 323 | struct mscan_priv *priv = netdev_priv(dev); |
| @@ -334,7 +334,7 @@ static int __devexit mpc5xxx_can_remove(struct of_device *ofdev) | |||
| 334 | 334 | ||
| 335 | #ifdef CONFIG_PM | 335 | #ifdef CONFIG_PM |
| 336 | static struct mscan_regs saved_regs; | 336 | static struct mscan_regs saved_regs; |
| 337 | static int mpc5xxx_can_suspend(struct of_device *ofdev, pm_message_t state) | 337 | static int mpc5xxx_can_suspend(struct platform_device *ofdev, pm_message_t state) |
| 338 | { | 338 | { |
| 339 | struct net_device *dev = dev_get_drvdata(&ofdev->dev); | 339 | struct net_device *dev = dev_get_drvdata(&ofdev->dev); |
| 340 | struct mscan_priv *priv = netdev_priv(dev); | 340 | struct mscan_priv *priv = netdev_priv(dev); |
| @@ -345,7 +345,7 @@ static int mpc5xxx_can_suspend(struct of_device *ofdev, pm_message_t state) | |||
| 345 | return 0; | 345 | return 0; |
| 346 | } | 346 | } |
| 347 | 347 | ||
| 348 | static int mpc5xxx_can_resume(struct of_device *ofdev) | 348 | static int mpc5xxx_can_resume(struct platform_device *ofdev) |
| 349 | { | 349 | { |
| 350 | struct net_device *dev = dev_get_drvdata(&ofdev->dev); | 350 | struct net_device *dev = dev_get_drvdata(&ofdev->dev); |
| 351 | struct mscan_priv *priv = netdev_priv(dev); | 351 | struct mscan_priv *priv = netdev_priv(dev); |
diff --git a/drivers/net/can/sja1000/sja1000_of_platform.c b/drivers/net/can/sja1000/sja1000_of_platform.c index ac1a83d7c204..5bfccfdf3bbb 100644 --- a/drivers/net/can/sja1000/sja1000_of_platform.c +++ b/drivers/net/can/sja1000/sja1000_of_platform.c | |||
| @@ -67,7 +67,7 @@ static void sja1000_ofp_write_reg(const struct sja1000_priv *priv, | |||
| 67 | out_8(priv->reg_base + reg, val); | 67 | out_8(priv->reg_base + reg, val); |
| 68 | } | 68 | } |
| 69 | 69 | ||
| 70 | static int __devexit sja1000_ofp_remove(struct of_device *ofdev) | 70 | static int __devexit sja1000_ofp_remove(struct platform_device *ofdev) |
| 71 | { | 71 | { |
| 72 | struct net_device *dev = dev_get_drvdata(&ofdev->dev); | 72 | struct net_device *dev = dev_get_drvdata(&ofdev->dev); |
| 73 | struct sja1000_priv *priv = netdev_priv(dev); | 73 | struct sja1000_priv *priv = netdev_priv(dev); |
| @@ -87,7 +87,7 @@ static int __devexit sja1000_ofp_remove(struct of_device *ofdev) | |||
| 87 | return 0; | 87 | return 0; |
| 88 | } | 88 | } |
| 89 | 89 | ||
| 90 | static int __devinit sja1000_ofp_probe(struct of_device *ofdev, | 90 | static int __devinit sja1000_ofp_probe(struct platform_device *ofdev, |
| 91 | const struct of_device_id *id) | 91 | const struct of_device_id *id) |
| 92 | { | 92 | { |
| 93 | struct device_node *np = ofdev->dev.of_node; | 93 | struct device_node *np = ofdev->dev.of_node; |
