Skip to content

Commit

Permalink
dt/video: Eliminate users of of_platform_{,un}register_driver
Browse files Browse the repository at this point in the history
Get rid of users of of_platform_driver in drivers/video.  The
of_platform_{,un}register_driver functions are going away, so the
users need to be converted to using the platform_bus_type directly.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
  • Loading branch information
Grant Likely committed Feb 28, 2011
1 parent 7488876 commit 28541d0
Show file tree
Hide file tree
Showing 13 changed files with 52 additions and 64 deletions.
8 changes: 4 additions & 4 deletions drivers/video/bw2.c
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ static int __devinit bw2_do_default_mode(struct bw2_par *par,
return 0;
}

static int __devinit bw2_probe(struct platform_device *op, const struct of_device_id *match)
static int __devinit bw2_probe(struct platform_device *op)
{
struct device_node *dp = op->dev.of_node;
struct fb_info *info;
Expand Down Expand Up @@ -375,7 +375,7 @@ static const struct of_device_id bw2_match[] = {
};
MODULE_DEVICE_TABLE(of, bw2_match);

static struct of_platform_driver bw2_driver = {
static struct platform_driver bw2_driver = {
.driver = {
.name = "bw2",
.owner = THIS_MODULE,
Expand All @@ -390,12 +390,12 @@ static int __init bw2_init(void)
if (fb_get_options("bw2fb", NULL))
return -ENODEV;

return of_register_platform_driver(&bw2_driver);
return platform_driver_register(&bw2_driver);
}

static void __exit bw2_exit(void)
{
of_unregister_platform_driver(&bw2_driver);
platform_driver_unregister(&bw2_driver);
}

module_init(bw2_init);
Expand Down
8 changes: 4 additions & 4 deletions drivers/video/cg14.c
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ static void cg14_unmap_regs(struct platform_device *op, struct fb_info *info,
info->screen_base, info->fix.smem_len);
}

static int __devinit cg14_probe(struct platform_device *op, const struct of_device_id *match)
static int __devinit cg14_probe(struct platform_device *op)
{
struct device_node *dp = op->dev.of_node;
struct fb_info *info;
Expand Down Expand Up @@ -595,7 +595,7 @@ static const struct of_device_id cg14_match[] = {
};
MODULE_DEVICE_TABLE(of, cg14_match);

static struct of_platform_driver cg14_driver = {
static struct platform_driver cg14_driver = {
.driver = {
.name = "cg14",
.owner = THIS_MODULE,
Expand All @@ -610,12 +610,12 @@ static int __init cg14_init(void)
if (fb_get_options("cg14fb", NULL))
return -ENODEV;

return of_register_platform_driver(&cg14_driver);
return platform_driver_register(&cg14_driver);
}

static void __exit cg14_exit(void)
{
of_unregister_platform_driver(&cg14_driver);
platform_driver_unregister(&cg14_driver);
}

module_init(cg14_init);
Expand Down
9 changes: 4 additions & 5 deletions drivers/video/cg3.c
Original file line number Diff line number Diff line change
Expand Up @@ -346,8 +346,7 @@ static int __devinit cg3_do_default_mode(struct cg3_par *par)
return 0;
}

static int __devinit cg3_probe(struct platform_device *op,
const struct of_device_id *match)
static int __devinit cg3_probe(struct platform_device *op)
{
struct device_node *dp = op->dev.of_node;
struct fb_info *info;
Expand Down Expand Up @@ -462,7 +461,7 @@ static const struct of_device_id cg3_match[] = {
};
MODULE_DEVICE_TABLE(of, cg3_match);

static struct of_platform_driver cg3_driver = {
static struct platform_driver cg3_driver = {
.driver = {
.name = "cg3",
.owner = THIS_MODULE,
Expand All @@ -477,12 +476,12 @@ static int __init cg3_init(void)
if (fb_get_options("cg3fb", NULL))
return -ENODEV;

return of_register_platform_driver(&cg3_driver);
return platform_driver_register(&cg3_driver);
}

static void __exit cg3_exit(void)
{
of_unregister_platform_driver(&cg3_driver);
platform_driver_unregister(&cg3_driver);
}

module_init(cg3_init);
Expand Down
9 changes: 4 additions & 5 deletions drivers/video/cg6.c
Original file line number Diff line number Diff line change
Expand Up @@ -737,8 +737,7 @@ static void cg6_unmap_regs(struct platform_device *op, struct fb_info *info,
info->fix.smem_len);
}

static int __devinit cg6_probe(struct platform_device *op,
const struct of_device_id *match)
static int __devinit cg6_probe(struct platform_device *op)
{
struct device_node *dp = op->dev.of_node;
struct fb_info *info;
Expand Down Expand Up @@ -855,7 +854,7 @@ static const struct of_device_id cg6_match[] = {
};
MODULE_DEVICE_TABLE(of, cg6_match);

static struct of_platform_driver cg6_driver = {
static struct platform_driver cg6_driver = {
.driver = {
.name = "cg6",
.owner = THIS_MODULE,
Expand All @@ -870,12 +869,12 @@ static int __init cg6_init(void)
if (fb_get_options("cg6fb", NULL))
return -ENODEV;

return of_register_platform_driver(&cg6_driver);
return platform_driver_register(&cg6_driver);
}

static void __exit cg6_exit(void)
{
of_unregister_platform_driver(&cg6_driver);
platform_driver_unregister(&cg6_driver);
}

module_init(cg6_init);
Expand Down
9 changes: 4 additions & 5 deletions drivers/video/ffb.c
Original file line number Diff line number Diff line change
Expand Up @@ -893,8 +893,7 @@ static void ffb_init_fix(struct fb_info *info)
info->fix.accel = FB_ACCEL_SUN_CREATOR;
}

static int __devinit ffb_probe(struct platform_device *op,
const struct of_device_id *match)
static int __devinit ffb_probe(struct platform_device *op)
{
struct device_node *dp = op->dev.of_node;
struct ffb_fbc __iomem *fbc;
Expand Down Expand Up @@ -1052,7 +1051,7 @@ static const struct of_device_id ffb_match[] = {
};
MODULE_DEVICE_TABLE(of, ffb_match);

static struct of_platform_driver ffb_driver = {
static struct platform_driver ffb_driver = {
.driver = {
.name = "ffb",
.owner = THIS_MODULE,
Expand All @@ -1067,12 +1066,12 @@ static int __init ffb_init(void)
if (fb_get_options("ffb", NULL))
return -ENODEV;

return of_register_platform_driver(&ffb_driver);
return platform_driver_register(&ffb_driver);
}

static void __exit ffb_exit(void)
{
of_unregister_platform_driver(&ffb_driver);
platform_driver_unregister(&ffb_driver);
}

module_init(ffb_init);
Expand Down
9 changes: 4 additions & 5 deletions drivers/video/fsl-diu-fb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1487,8 +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 platform_device *ofdev,
const struct of_device_id *match)
static int __devinit fsl_diu_probe(struct platform_device *ofdev)
{
struct device_node *np = ofdev->dev.of_node;
struct mfb_info *mfbi;
Expand Down Expand Up @@ -1735,7 +1734,7 @@ static struct of_device_id fsl_diu_match[] = {
};
MODULE_DEVICE_TABLE(of, fsl_diu_match);

static struct of_platform_driver fsl_diu_driver = {
static struct platform_driver fsl_diu_driver = {
.driver = {
.name = "fsl_diu",
.owner = THIS_MODULE,
Expand Down Expand Up @@ -1797,7 +1796,7 @@ static int __init fsl_diu_init(void)
if (!coherence_data)
return -ENOMEM;
#endif
ret = of_register_platform_driver(&fsl_diu_driver);
ret = platform_driver_register(&fsl_diu_driver);
if (ret) {
printk(KERN_ERR
"fsl-diu: failed to register platform driver\n");
Expand All @@ -1811,7 +1810,7 @@ static int __init fsl_diu_init(void)

static void __exit fsl_diu_exit(void)
{
of_unregister_platform_driver(&fsl_diu_driver);
platform_driver_unregister(&fsl_diu_driver);
#if defined(CONFIG_NOT_COHERENT_CACHE)
vfree(coherence_data);
#endif
Expand Down
9 changes: 4 additions & 5 deletions drivers/video/leo.c
Original file line number Diff line number Diff line change
Expand Up @@ -547,8 +547,7 @@ static void leo_unmap_regs(struct platform_device *op, struct fb_info *info,
of_iounmap(&op->resource[0], info->screen_base, 0x800000);
}

static int __devinit leo_probe(struct platform_device *op,
const struct of_device_id *match)
static int __devinit leo_probe(struct platform_device *op)
{
struct device_node *dp = op->dev.of_node;
struct fb_info *info;
Expand Down Expand Up @@ -662,7 +661,7 @@ static const struct of_device_id leo_match[] = {
};
MODULE_DEVICE_TABLE(of, leo_match);

static struct of_platform_driver leo_driver = {
static struct platform_driver leo_driver = {
.driver = {
.name = "leo",
.owner = THIS_MODULE,
Expand All @@ -677,12 +676,12 @@ static int __init leo_init(void)
if (fb_get_options("leofb", NULL))
return -ENODEV;

return of_register_platform_driver(&leo_driver);
return platform_driver_register(&leo_driver);
}

static void __exit leo_exit(void)
{
of_unregister_platform_driver(&leo_driver);
platform_driver_unregister(&leo_driver);
}

module_init(leo_init);
Expand Down
9 changes: 4 additions & 5 deletions drivers/video/mb862xx/mb862xxfb.c
Original file line number Diff line number Diff line change
Expand Up @@ -550,8 +550,7 @@ static int mb862xx_gdc_init(struct mb862xxfb_par *par)
return 0;
}

static int __devinit of_platform_mb862xx_probe(struct platform_device *ofdev,
const struct of_device_id *id)
static int __devinit of_platform_mb862xx_probe(struct platform_device *ofdev)
{
struct device_node *np = ofdev->dev.of_node;
struct device *dev = &ofdev->dev;
Expand Down Expand Up @@ -717,7 +716,7 @@ static struct of_device_id __devinitdata of_platform_mb862xx_tbl[] = {
{ /* end */ }
};

static struct of_platform_driver of_platform_mb862xxfb_driver = {
static struct platform_driver of_platform_mb862xxfb_driver = {
.driver = {
.name = DRV_NAME,
.owner = THIS_MODULE,
Expand Down Expand Up @@ -1038,7 +1037,7 @@ static int __devinit mb862xxfb_init(void)
int ret = -ENODEV;

#if defined(CONFIG_FB_MB862XX_LIME)
ret = of_register_platform_driver(&of_platform_mb862xxfb_driver);
ret = platform_driver_register(&of_platform_mb862xxfb_driver);
#endif
#if defined(CONFIG_FB_MB862XX_PCI_GDC)
ret = pci_register_driver(&mb862xxfb_pci_driver);
Expand All @@ -1049,7 +1048,7 @@ static int __devinit mb862xxfb_init(void)
static void __exit mb862xxfb_exit(void)
{
#if defined(CONFIG_FB_MB862XX_LIME)
of_unregister_platform_driver(&of_platform_mb862xxfb_driver);
platform_driver_unregister(&of_platform_mb862xxfb_driver);
#endif
#if defined(CONFIG_FB_MB862XX_PCI_GDC)
pci_unregister_driver(&mb862xxfb_pci_driver);
Expand Down
8 changes: 4 additions & 4 deletions drivers/video/p9100.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 platform_device *op, const struct of_device_id *match)
static int __devinit p9100_probe(struct platform_device *op)
{
struct device_node *dp = op->dev.of_node;
struct fb_info *info;
Expand Down Expand Up @@ -352,7 +352,7 @@ static const struct of_device_id p9100_match[] = {
};
MODULE_DEVICE_TABLE(of, p9100_match);

static struct of_platform_driver p9100_driver = {
static struct platform_driver p9100_driver = {
.driver = {
.name = "p9100",
.owner = THIS_MODULE,
Expand All @@ -367,12 +367,12 @@ static int __init p9100_init(void)
if (fb_get_options("p9100fb", NULL))
return -ENODEV;

return of_register_platform_driver(&p9100_driver);
return platform_driver_register(&p9100_driver);
}

static void __exit p9100_exit(void)
{
of_unregister_platform_driver(&p9100_driver);
platform_driver_unregister(&p9100_driver);
}

module_init(p9100_init);
Expand Down
9 changes: 4 additions & 5 deletions drivers/video/platinumfb.c
Original file line number Diff line number Diff line change
Expand Up @@ -533,8 +533,7 @@ static int __init platinumfb_setup(char *options)
#define invalidate_cache(addr)
#endif

static int __devinit platinumfb_probe(struct platform_device* odev,
const struct of_device_id *match)
static int __devinit platinumfb_probe(struct platform_device* odev)
{
struct device_node *dp = odev->dev.of_node;
struct fb_info *info;
Expand Down Expand Up @@ -677,7 +676,7 @@ static struct of_device_id platinumfb_match[] =
{},
};

static struct of_platform_driver platinum_driver =
static struct platform_driver platinum_driver =
{
.driver = {
.name = "platinumfb",
Expand All @@ -697,14 +696,14 @@ static int __init platinumfb_init(void)
return -ENODEV;
platinumfb_setup(option);
#endif
of_register_platform_driver(&platinum_driver);
platform_driver_register(&platinum_driver);

return 0;
}

static void __exit platinumfb_exit(void)
{
of_unregister_platform_driver(&platinum_driver);
platform_driver_unregister(&platinum_driver);
}

MODULE_LICENSE("GPL");
Expand Down
9 changes: 4 additions & 5 deletions drivers/video/sunxvr1000.c
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,7 @@ static int __devinit gfb_set_fbinfo(struct gfb_info *gp)
return 0;
}

static int __devinit gfb_probe(struct platform_device *op,
const struct of_device_id *match)
static int __devinit gfb_probe(struct platform_device *op)
{
struct device_node *dp = op->dev.of_node;
struct fb_info *info;
Expand Down Expand Up @@ -198,7 +197,7 @@ static const struct of_device_id gfb_match[] = {
};
MODULE_DEVICE_TABLE(of, ffb_match);

static struct of_platform_driver gfb_driver = {
static struct platform_driver gfb_driver = {
.probe = gfb_probe,
.remove = __devexit_p(gfb_remove),
.driver = {
Expand All @@ -213,12 +212,12 @@ static int __init gfb_init(void)
if (fb_get_options("gfb", NULL))
return -ENODEV;

return of_register_platform_driver(&gfb_driver);
return platform_driver_register(&gfb_driver);
}

static void __exit gfb_exit(void)
{
of_unregister_platform_driver(&gfb_driver);
platform_driver_unregister(&gfb_driver);
}

module_init(gfb_init);
Expand Down
Loading

0 comments on commit 28541d0

Please sign in to comment.