mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -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
|
|
@ -273,7 +273,7 @@ static int __devinit bw2_do_default_mode(struct bw2_par *par,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int __devinit bw2_probe(struct of_device *op, const struct of_device_id *match)
|
||||
static int __devinit bw2_probe(struct platform_device *op, const struct of_device_id *match)
|
||||
{
|
||||
struct device_node *dp = op->dev.of_node;
|
||||
struct fb_info *info;
|
||||
|
|
@ -350,7 +350,7 @@ out_err:
|
|||
return err;
|
||||
}
|
||||
|
||||
static int __devexit bw2_remove(struct of_device *op)
|
||||
static int __devexit bw2_remove(struct platform_device *op)
|
||||
{
|
||||
struct fb_info *info = dev_get_drvdata(&op->dev);
|
||||
struct bw2_par *par = info->par;
|
||||
|
|
|
|||
|
|
@ -446,7 +446,7 @@ static struct sbus_mmap_map __cg14_mmap_map[CG14_MMAP_ENTRIES] __devinitdata = {
|
|||
{ .size = 0 }
|
||||
};
|
||||
|
||||
static void cg14_unmap_regs(struct of_device *op, struct fb_info *info,
|
||||
static void cg14_unmap_regs(struct platform_device *op, struct fb_info *info,
|
||||
struct cg14_par *par)
|
||||
{
|
||||
if (par->regs)
|
||||
|
|
@ -463,7 +463,7 @@ static void cg14_unmap_regs(struct of_device *op, struct fb_info *info,
|
|||
info->screen_base, info->fix.smem_len);
|
||||
}
|
||||
|
||||
static int __devinit cg14_probe(struct of_device *op, const struct of_device_id *match)
|
||||
static int __devinit cg14_probe(struct platform_device *op, const struct of_device_id *match)
|
||||
{
|
||||
struct device_node *dp = op->dev.of_node;
|
||||
struct fb_info *info;
|
||||
|
|
@ -570,7 +570,7 @@ out_err:
|
|||
return err;
|
||||
}
|
||||
|
||||
static int __devexit cg14_remove(struct of_device *op)
|
||||
static int __devexit cg14_remove(struct platform_device *op)
|
||||
{
|
||||
struct fb_info *info = dev_get_drvdata(&op->dev);
|
||||
struct cg14_par *par = info->par;
|
||||
|
|
|
|||
|
|
@ -346,7 +346,7 @@ static int __devinit cg3_do_default_mode(struct cg3_par *par)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int __devinit cg3_probe(struct of_device *op,
|
||||
static int __devinit cg3_probe(struct platform_device *op,
|
||||
const struct of_device_id *match)
|
||||
{
|
||||
struct device_node *dp = op->dev.of_node;
|
||||
|
|
@ -433,7 +433,7 @@ out_err:
|
|||
return err;
|
||||
}
|
||||
|
||||
static int __devexit cg3_remove(struct of_device *op)
|
||||
static int __devexit cg3_remove(struct platform_device *op)
|
||||
{
|
||||
struct fb_info *info = dev_get_drvdata(&op->dev);
|
||||
struct cg3_par *par = info->par;
|
||||
|
|
|
|||
|
|
@ -718,7 +718,7 @@ static void __devinit cg6_chip_init(struct fb_info *info)
|
|||
sbus_writel(info->var.yres - 1, &fbc->clipmaxy);
|
||||
}
|
||||
|
||||
static void cg6_unmap_regs(struct of_device *op, struct fb_info *info,
|
||||
static void cg6_unmap_regs(struct platform_device *op, struct fb_info *info,
|
||||
struct cg6_par *par)
|
||||
{
|
||||
if (par->fbc)
|
||||
|
|
@ -737,7 +737,7 @@ static void cg6_unmap_regs(struct of_device *op, struct fb_info *info,
|
|||
info->fix.smem_len);
|
||||
}
|
||||
|
||||
static int __devinit cg6_probe(struct of_device *op,
|
||||
static int __devinit cg6_probe(struct platform_device *op,
|
||||
const struct of_device_id *match)
|
||||
{
|
||||
struct device_node *dp = op->dev.of_node;
|
||||
|
|
@ -827,7 +827,7 @@ out_err:
|
|||
return err;
|
||||
}
|
||||
|
||||
static int __devexit cg6_remove(struct of_device *op)
|
||||
static int __devexit cg6_remove(struct platform_device *op)
|
||||
{
|
||||
struct fb_info *info = dev_get_drvdata(&op->dev);
|
||||
struct cg6_par *par = info->par;
|
||||
|
|
|
|||
|
|
@ -893,7 +893,7 @@ static void ffb_init_fix(struct fb_info *info)
|
|||
info->fix.accel = FB_ACCEL_SUN_CREATOR;
|
||||
}
|
||||
|
||||
static int __devinit ffb_probe(struct of_device *op,
|
||||
static int __devinit ffb_probe(struct platform_device *op,
|
||||
const struct of_device_id *match)
|
||||
{
|
||||
struct device_node *dp = op->dev.of_node;
|
||||
|
|
@ -1023,7 +1023,7 @@ out_err:
|
|||
return err;
|
||||
}
|
||||
|
||||
static int __devexit ffb_remove(struct of_device *op)
|
||||
static int __devexit ffb_remove(struct platform_device *op)
|
||||
{
|
||||
struct fb_info *info = dev_get_drvdata(&op->dev);
|
||||
struct ffb_par *par = info->par;
|
||||
|
|
|
|||
|
|
@ -1393,7 +1393,7 @@ static void free_irq_local(int irq)
|
|||
* Power management hooks. Note that we won't be called from IRQ context,
|
||||
* unlike the blank functions above, so we may sleep.
|
||||
*/
|
||||
static int fsl_diu_suspend(struct of_device *ofdev, pm_message_t state)
|
||||
static int fsl_diu_suspend(struct platform_device *ofdev, pm_message_t state)
|
||||
{
|
||||
struct fsl_diu_data *machine_data;
|
||||
|
||||
|
|
@ -1403,7 +1403,7 @@ static int fsl_diu_suspend(struct of_device *ofdev, pm_message_t state)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int fsl_diu_resume(struct of_device *ofdev)
|
||||
static int fsl_diu_resume(struct platform_device *ofdev)
|
||||
{
|
||||
struct fsl_diu_data *machine_data;
|
||||
|
||||
|
|
@ -1487,7 +1487,7 @@ static ssize_t show_monitor(struct device *device,
|
|||
return diu_ops.show_monitor_port(machine_data->monitor_port, buf);
|
||||
}
|
||||
|
||||
static int __devinit fsl_diu_probe(struct of_device *ofdev,
|
||||
static int __devinit fsl_diu_probe(struct platform_device *ofdev,
|
||||
const struct of_device_id *match)
|
||||
{
|
||||
struct device_node *np = ofdev->dev.of_node;
|
||||
|
|
@ -1667,7 +1667,7 @@ error2:
|
|||
}
|
||||
|
||||
|
||||
static int fsl_diu_remove(struct of_device *ofdev)
|
||||
static int fsl_diu_remove(struct platform_device *ofdev)
|
||||
{
|
||||
struct fsl_diu_data *machine_data;
|
||||
int i;
|
||||
|
|
|
|||
|
|
@ -529,7 +529,7 @@ static void leo_fixup_var_rgb(struct fb_var_screeninfo *var)
|
|||
var->transp.length = 0;
|
||||
}
|
||||
|
||||
static void leo_unmap_regs(struct of_device *op, struct fb_info *info,
|
||||
static void leo_unmap_regs(struct platform_device *op, struct fb_info *info,
|
||||
struct leo_par *par)
|
||||
{
|
||||
if (par->lc_ss0_usr)
|
||||
|
|
@ -547,7 +547,7 @@ static void leo_unmap_regs(struct of_device *op, struct fb_info *info,
|
|||
of_iounmap(&op->resource[0], info->screen_base, 0x800000);
|
||||
}
|
||||
|
||||
static int __devinit leo_probe(struct of_device *op,
|
||||
static int __devinit leo_probe(struct platform_device *op,
|
||||
const struct of_device_id *match)
|
||||
{
|
||||
struct device_node *dp = op->dev.of_node;
|
||||
|
|
@ -637,7 +637,7 @@ out_err:
|
|||
return err;
|
||||
}
|
||||
|
||||
static int __devexit leo_remove(struct of_device *op)
|
||||
static int __devexit leo_remove(struct platform_device *op)
|
||||
{
|
||||
struct fb_info *info = dev_get_drvdata(&op->dev);
|
||||
struct leo_par *par = info->par;
|
||||
|
|
|
|||
|
|
@ -550,7 +550,7 @@ static int mb862xx_gdc_init(struct mb862xxfb_par *par)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int __devinit of_platform_mb862xx_probe(struct of_device *ofdev,
|
||||
static int __devinit of_platform_mb862xx_probe(struct platform_device *ofdev,
|
||||
const struct of_device_id *id)
|
||||
{
|
||||
struct device_node *np = ofdev->dev.of_node;
|
||||
|
|
@ -669,7 +669,7 @@ fbrel:
|
|||
return ret;
|
||||
}
|
||||
|
||||
static int __devexit of_platform_mb862xx_remove(struct of_device *ofdev)
|
||||
static int __devexit of_platform_mb862xx_remove(struct platform_device *ofdev)
|
||||
{
|
||||
struct fb_info *fbi = dev_get_drvdata(&ofdev->dev);
|
||||
struct mb862xxfb_par *par = fbi->par;
|
||||
|
|
|
|||
|
|
@ -249,7 +249,7 @@ static void p9100_init_fix(struct fb_info *info, int linebytes, struct device_no
|
|||
info->fix.accel = FB_ACCEL_SUN_CGTHREE;
|
||||
}
|
||||
|
||||
static int __devinit p9100_probe(struct of_device *op, const struct of_device_id *match)
|
||||
static int __devinit p9100_probe(struct platform_device *op, const struct of_device_id *match)
|
||||
{
|
||||
struct device_node *dp = op->dev.of_node;
|
||||
struct fb_info *info;
|
||||
|
|
@ -326,7 +326,7 @@ out_err:
|
|||
return err;
|
||||
}
|
||||
|
||||
static int __devexit p9100_remove(struct of_device *op)
|
||||
static int __devexit p9100_remove(struct platform_device *op)
|
||||
{
|
||||
struct fb_info *info = dev_get_drvdata(&op->dev);
|
||||
struct p9100_par *par = info->par;
|
||||
|
|
|
|||
|
|
@ -533,7 +533,7 @@ static int __init platinumfb_setup(char *options)
|
|||
#define invalidate_cache(addr)
|
||||
#endif
|
||||
|
||||
static int __devinit platinumfb_probe(struct of_device* odev,
|
||||
static int __devinit platinumfb_probe(struct platform_device* odev,
|
||||
const struct of_device_id *match)
|
||||
{
|
||||
struct device_node *dp = odev->dev.of_node;
|
||||
|
|
@ -646,7 +646,7 @@ static int __devinit platinumfb_probe(struct of_device* odev,
|
|||
return rc;
|
||||
}
|
||||
|
||||
static int __devexit platinumfb_remove(struct of_device* odev)
|
||||
static int __devexit platinumfb_remove(struct platform_device* odev)
|
||||
{
|
||||
struct fb_info *info = dev_get_drvdata(&odev->dev);
|
||||
struct fb_info_platinum *pinfo = info->par;
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ static int __devinit gfb_set_fbinfo(struct gfb_info *gp)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int __devinit gfb_probe(struct of_device *op,
|
||||
static int __devinit gfb_probe(struct platform_device *op,
|
||||
const struct of_device_id *match)
|
||||
{
|
||||
struct device_node *dp = op->dev.of_node;
|
||||
|
|
@ -172,7 +172,7 @@ err_out:
|
|||
return err;
|
||||
}
|
||||
|
||||
static int __devexit gfb_remove(struct of_device *op)
|
||||
static int __devexit gfb_remove(struct platform_device *op)
|
||||
{
|
||||
struct fb_info *info = dev_get_drvdata(&op->dev);
|
||||
struct gfb_info *gp = info->par;
|
||||
|
|
|
|||
|
|
@ -342,7 +342,7 @@ tcx_init_fix(struct fb_info *info, int linebytes)
|
|||
info->fix.accel = FB_ACCEL_SUN_TCX;
|
||||
}
|
||||
|
||||
static void tcx_unmap_regs(struct of_device *op, struct fb_info *info,
|
||||
static void tcx_unmap_regs(struct platform_device *op, struct fb_info *info,
|
||||
struct tcx_par *par)
|
||||
{
|
||||
if (par->tec)
|
||||
|
|
@ -362,7 +362,7 @@ static void tcx_unmap_regs(struct of_device *op, struct fb_info *info,
|
|||
info->screen_base, info->fix.smem_len);
|
||||
}
|
||||
|
||||
static int __devinit tcx_probe(struct of_device *op,
|
||||
static int __devinit tcx_probe(struct platform_device *op,
|
||||
const struct of_device_id *match)
|
||||
{
|
||||
struct device_node *dp = op->dev.of_node;
|
||||
|
|
@ -486,7 +486,7 @@ out_err:
|
|||
return err;
|
||||
}
|
||||
|
||||
static int __devexit tcx_remove(struct of_device *op)
|
||||
static int __devexit tcx_remove(struct platform_device *op)
|
||||
{
|
||||
struct fb_info *info = dev_get_drvdata(&op->dev);
|
||||
struct tcx_par *par = info->par;
|
||||
|
|
|
|||
|
|
@ -397,7 +397,7 @@ static int xilinxfb_release(struct device *dev)
|
|||
*/
|
||||
|
||||
static int __devinit
|
||||
xilinxfb_of_probe(struct of_device *op, const struct of_device_id *match)
|
||||
xilinxfb_of_probe(struct platform_device *op, const struct of_device_id *match)
|
||||
{
|
||||
const u32 *prop;
|
||||
u32 *p;
|
||||
|
|
@ -477,7 +477,7 @@ xilinxfb_of_probe(struct of_device *op, const struct of_device_id *match)
|
|||
return -ENODEV;
|
||||
}
|
||||
|
||||
static int __devexit xilinxfb_of_remove(struct of_device *op)
|
||||
static int __devexit xilinxfb_of_remove(struct platform_device *op)
|
||||
{
|
||||
return xilinxfb_release(&op->dev);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue