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>
This commit is contained in:
@@ -38,7 +38,7 @@
|
||||
|
||||
struct mpc5xxx_can_data {
|
||||
unsigned int type;
|
||||
u32 (*get_clock)(struct of_device *ofdev, const char *clock_name,
|
||||
u32 (*get_clock)(struct platform_device *ofdev, const char *clock_name,
|
||||
int *mscan_clksrc);
|
||||
};
|
||||
|
||||
@@ -48,7 +48,7 @@ static struct of_device_id __devinitdata mpc52xx_cdm_ids[] = {
|
||||
{}
|
||||
};
|
||||
|
||||
static u32 __devinit mpc52xx_can_get_clock(struct of_device *ofdev,
|
||||
static u32 __devinit mpc52xx_can_get_clock(struct platform_device *ofdev,
|
||||
const char *clock_name,
|
||||
int *mscan_clksrc)
|
||||
{
|
||||
@@ -101,7 +101,7 @@ static u32 __devinit mpc52xx_can_get_clock(struct of_device *ofdev,
|
||||
return freq;
|
||||
}
|
||||
#else /* !CONFIG_PPC_MPC52xx */
|
||||
static u32 __devinit mpc52xx_can_get_clock(struct of_device *ofdev,
|
||||
static u32 __devinit mpc52xx_can_get_clock(struct platform_device *ofdev,
|
||||
const char *clock_name,
|
||||
int *mscan_clksrc)
|
||||
{
|
||||
@@ -129,7 +129,7 @@ static struct of_device_id __devinitdata mpc512x_clock_ids[] = {
|
||||
{}
|
||||
};
|
||||
|
||||
static u32 __devinit mpc512x_can_get_clock(struct of_device *ofdev,
|
||||
static u32 __devinit mpc512x_can_get_clock(struct platform_device *ofdev,
|
||||
const char *clock_name,
|
||||
int *mscan_clksrc)
|
||||
{
|
||||
@@ -239,7 +239,7 @@ exit_unmap:
|
||||
return freq;
|
||||
}
|
||||
#else /* !CONFIG_PPC_MPC512x */
|
||||
static u32 __devinit mpc512x_can_get_clock(struct of_device *ofdev,
|
||||
static u32 __devinit mpc512x_can_get_clock(struct platform_device *ofdev,
|
||||
const char *clock_name,
|
||||
int *mscan_clksrc)
|
||||
{
|
||||
@@ -247,7 +247,7 @@ static u32 __devinit mpc512x_can_get_clock(struct of_device *ofdev,
|
||||
}
|
||||
#endif /* CONFIG_PPC_MPC512x */
|
||||
|
||||
static int __devinit mpc5xxx_can_probe(struct of_device *ofdev,
|
||||
static int __devinit mpc5xxx_can_probe(struct platform_device *ofdev,
|
||||
const struct of_device_id *id)
|
||||
{
|
||||
struct mpc5xxx_can_data *data = (struct mpc5xxx_can_data *)id->data;
|
||||
@@ -317,7 +317,7 @@ exit_unmap_mem:
|
||||
return err;
|
||||
}
|
||||
|
||||
static int __devexit mpc5xxx_can_remove(struct of_device *ofdev)
|
||||
static int __devexit mpc5xxx_can_remove(struct platform_device *ofdev)
|
||||
{
|
||||
struct net_device *dev = dev_get_drvdata(&ofdev->dev);
|
||||
struct mscan_priv *priv = netdev_priv(dev);
|
||||
@@ -334,7 +334,7 @@ static int __devexit mpc5xxx_can_remove(struct of_device *ofdev)
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
static struct mscan_regs saved_regs;
|
||||
static int mpc5xxx_can_suspend(struct of_device *ofdev, pm_message_t state)
|
||||
static int mpc5xxx_can_suspend(struct platform_device *ofdev, pm_message_t state)
|
||||
{
|
||||
struct net_device *dev = dev_get_drvdata(&ofdev->dev);
|
||||
struct mscan_priv *priv = netdev_priv(dev);
|
||||
@@ -345,7 +345,7 @@ static int mpc5xxx_can_suspend(struct of_device *ofdev, pm_message_t state)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int mpc5xxx_can_resume(struct of_device *ofdev)
|
||||
static int mpc5xxx_can_resume(struct platform_device *ofdev)
|
||||
{
|
||||
struct net_device *dev = dev_get_drvdata(&ofdev->dev);
|
||||
struct mscan_priv *priv = netdev_priv(dev);
|
||||
|
Reference in New Issue
Block a user