mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -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
|
|
@ -1297,7 +1297,7 @@ static void fsl_dma_chan_remove(struct fsldma_chan *chan)
|
|||
kfree(chan);
|
||||
}
|
||||
|
||||
static int __devinit fsldma_of_probe(struct of_device *op,
|
||||
static int __devinit fsldma_of_probe(struct platform_device *op,
|
||||
const struct of_device_id *match)
|
||||
{
|
||||
struct fsldma_device *fdev;
|
||||
|
|
@ -1382,7 +1382,7 @@ out_return:
|
|||
return err;
|
||||
}
|
||||
|
||||
static int fsldma_of_remove(struct of_device *op)
|
||||
static int fsldma_of_remove(struct platform_device *op)
|
||||
{
|
||||
struct fsldma_device *fdev;
|
||||
unsigned int i;
|
||||
|
|
|
|||
|
|
@ -627,7 +627,7 @@ mpc_dma_prep_memcpy(struct dma_chan *chan, dma_addr_t dst, dma_addr_t src,
|
|||
return &mdesc->desc;
|
||||
}
|
||||
|
||||
static int __devinit mpc_dma_probe(struct of_device *op,
|
||||
static int __devinit mpc_dma_probe(struct platform_device *op,
|
||||
const struct of_device_id *match)
|
||||
{
|
||||
struct device_node *dn = op->dev.of_node;
|
||||
|
|
@ -753,7 +753,7 @@ static int __devinit mpc_dma_probe(struct of_device *op,
|
|||
return retval;
|
||||
}
|
||||
|
||||
static int __devexit mpc_dma_remove(struct of_device *op)
|
||||
static int __devexit mpc_dma_remove(struct platform_device *op)
|
||||
{
|
||||
struct device *dev = &op->dev;
|
||||
struct mpc_dma *mdma = dev_get_drvdata(dev);
|
||||
|
|
|
|||
|
|
@ -4257,11 +4257,11 @@ static int ppc440spe_adma_setup_irqs(struct ppc440spe_adma_device *adev,
|
|||
struct ppc440spe_adma_chan *chan,
|
||||
int *initcode)
|
||||
{
|
||||
struct of_device *ofdev;
|
||||
struct platform_device *ofdev;
|
||||
struct device_node *np;
|
||||
int ret;
|
||||
|
||||
ofdev = container_of(adev->dev, struct of_device, dev);
|
||||
ofdev = container_of(adev->dev, struct platform_device, dev);
|
||||
np = ofdev->dev.of_node;
|
||||
if (adev->id != PPC440SPE_XOR_ID) {
|
||||
adev->err_irq = irq_of_parse_and_map(np, 1);
|
||||
|
|
@ -4393,7 +4393,7 @@ static void ppc440spe_adma_release_irqs(struct ppc440spe_adma_device *adev,
|
|||
/**
|
||||
* ppc440spe_adma_probe - probe the asynch device
|
||||
*/
|
||||
static int __devinit ppc440spe_adma_probe(struct of_device *ofdev,
|
||||
static int __devinit ppc440spe_adma_probe(struct platform_device *ofdev,
|
||||
const struct of_device_id *match)
|
||||
{
|
||||
struct device_node *np = ofdev->dev.of_node;
|
||||
|
|
@ -4625,7 +4625,7 @@ out:
|
|||
/**
|
||||
* ppc440spe_adma_remove - remove the asynch device
|
||||
*/
|
||||
static int __devexit ppc440spe_adma_remove(struct of_device *ofdev)
|
||||
static int __devexit ppc440spe_adma_remove(struct platform_device *ofdev)
|
||||
{
|
||||
struct ppc440spe_adma_device *adev = dev_get_drvdata(&ofdev->dev);
|
||||
struct device_node *np = ofdev->dev.of_node;
|
||||
|
|
|
|||
Loading…
Reference in a new issue