mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
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 <[email protected]> Reviewed-by: David S. Miller <[email protected]>
This commit is contained in:
parent
fc1caf6eaf
commit
2dc1158137
158 changed files with 519 additions and 527 deletions
|
|
@ -507,7 +507,7 @@ static int __exit mpc512x_psc_spi_do_remove(struct device *dev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int __init mpc512x_psc_spi_of_probe(struct of_device *op,
|
||||
static int __init mpc512x_psc_spi_of_probe(struct platform_device *op,
|
||||
const struct of_device_id *match)
|
||||
{
|
||||
const u32 *regaddr_p;
|
||||
|
|
@ -539,7 +539,7 @@ static int __init mpc512x_psc_spi_of_probe(struct of_device *op,
|
|||
irq_of_parse_and_map(op->dev.of_node, 0), id);
|
||||
}
|
||||
|
||||
static int __exit mpc512x_psc_spi_of_remove(struct of_device *op)
|
||||
static int __exit mpc512x_psc_spi_of_remove(struct platform_device *op)
|
||||
{
|
||||
return mpc512x_psc_spi_do_remove(&op->dev);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -465,7 +465,7 @@ static int __exit mpc52xx_psc_spi_do_remove(struct device *dev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int __init mpc52xx_psc_spi_of_probe(struct of_device *op,
|
||||
static int __init mpc52xx_psc_spi_of_probe(struct platform_device *op,
|
||||
const struct of_device_id *match)
|
||||
{
|
||||
const u32 *regaddr_p;
|
||||
|
|
@ -495,7 +495,7 @@ static int __init mpc52xx_psc_spi_of_probe(struct of_device *op,
|
|||
irq_of_parse_and_map(op->dev.of_node, 0), id);
|
||||
}
|
||||
|
||||
static int __exit mpc52xx_psc_spi_of_remove(struct of_device *op)
|
||||
static int __exit mpc52xx_psc_spi_of_remove(struct platform_device *op)
|
||||
{
|
||||
return mpc52xx_psc_spi_do_remove(&op->dev);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -390,7 +390,7 @@ static int mpc52xx_spi_transfer(struct spi_device *spi, struct spi_message *m)
|
|||
/*
|
||||
* OF Platform Bus Binding
|
||||
*/
|
||||
static int __devinit mpc52xx_spi_probe(struct of_device *op,
|
||||
static int __devinit mpc52xx_spi_probe(struct platform_device *op,
|
||||
const struct of_device_id *match)
|
||||
{
|
||||
struct spi_master *master;
|
||||
|
|
@ -530,7 +530,7 @@ static int __devinit mpc52xx_spi_probe(struct of_device *op,
|
|||
return rc;
|
||||
}
|
||||
|
||||
static int __devexit mpc52xx_spi_remove(struct of_device *op)
|
||||
static int __devexit mpc52xx_spi_remove(struct platform_device *op)
|
||||
{
|
||||
struct spi_master *master = dev_get_drvdata(&op->dev);
|
||||
struct mpc52xx_spi *ms = spi_master_get_devdata(master);
|
||||
|
|
|
|||
|
|
@ -1236,7 +1236,7 @@ static int of_mpc8xxx_spi_free_chipselects(struct device *dev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int __devinit of_mpc8xxx_spi_probe(struct of_device *ofdev,
|
||||
static int __devinit of_mpc8xxx_spi_probe(struct platform_device *ofdev,
|
||||
const struct of_device_id *ofid)
|
||||
{
|
||||
struct device *dev = &ofdev->dev;
|
||||
|
|
@ -1308,7 +1308,7 @@ err_clk:
|
|||
return ret;
|
||||
}
|
||||
|
||||
static int __devexit of_mpc8xxx_spi_remove(struct of_device *ofdev)
|
||||
static int __devexit of_mpc8xxx_spi_remove(struct platform_device *ofdev)
|
||||
{
|
||||
int ret;
|
||||
|
||||
|
|
|
|||
|
|
@ -388,9 +388,9 @@ static void free_gpios(struct ppc4xx_spi *hw)
|
|||
}
|
||||
|
||||
/*
|
||||
* of_device layer stuff...
|
||||
* platform_device layer stuff...
|
||||
*/
|
||||
static int __init spi_ppc4xx_of_probe(struct of_device *op,
|
||||
static int __init spi_ppc4xx_of_probe(struct platform_device *op,
|
||||
const struct of_device_id *match)
|
||||
{
|
||||
struct ppc4xx_spi *hw;
|
||||
|
|
@ -565,7 +565,7 @@ free_master:
|
|||
return ret;
|
||||
}
|
||||
|
||||
static int __exit spi_ppc4xx_of_remove(struct of_device *op)
|
||||
static int __exit spi_ppc4xx_of_remove(struct platform_device *op)
|
||||
{
|
||||
struct spi_master *master = dev_get_drvdata(&op->dev);
|
||||
struct ppc4xx_spi *hw = spi_master_get_devdata(master);
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@
|
|||
#include "xilinx_spi.h"
|
||||
|
||||
|
||||
static int __devinit xilinx_spi_of_probe(struct of_device *ofdev,
|
||||
static int __devinit xilinx_spi_of_probe(struct platform_device *ofdev,
|
||||
const struct of_device_id *match)
|
||||
{
|
||||
struct spi_master *master;
|
||||
|
|
@ -84,7 +84,7 @@ static int __devinit xilinx_spi_of_probe(struct of_device *ofdev,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int __devexit xilinx_spi_remove(struct of_device *ofdev)
|
||||
static int __devexit xilinx_spi_remove(struct platform_device *ofdev)
|
||||
{
|
||||
xilinx_spi_deinit(dev_get_drvdata(&ofdev->dev));
|
||||
dev_set_drvdata(&ofdev->dev, 0);
|
||||
|
|
@ -93,7 +93,7 @@ static int __devexit xilinx_spi_remove(struct of_device *ofdev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int __exit xilinx_spi_of_remove(struct of_device *op)
|
||||
static int __exit xilinx_spi_of_remove(struct platform_device *op)
|
||||
{
|
||||
return xilinx_spi_remove(op);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue