aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/w100fb.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/w100fb.c')
-rw-r--r--drivers/video/w100fb.c46
1 files changed, 23 insertions, 23 deletions
diff --git a/drivers/video/w100fb.c b/drivers/video/w100fb.c
index 48e70f153c4b..daa46051f55d 100644
--- a/drivers/video/w100fb.c
+++ b/drivers/video/w100fb.c
@@ -437,9 +437,9 @@ static void w100fb_restore_vidmem(struct w100fb_par *par)
437 } 437 }
438} 438}
439 439
440static int w100fb_suspend(struct device *dev, pm_message_t state) 440static int w100fb_suspend(struct platform_device *dev, pm_message_t state)
441{ 441{
442 struct fb_info *info = dev_get_drvdata(dev); 442 struct fb_info *info = platform_get_drvdata(dev);
443 struct w100fb_par *par=info->par; 443 struct w100fb_par *par=info->par;
444 struct w100_tg_info *tg = par->mach->tg; 444 struct w100_tg_info *tg = par->mach->tg;
445 445
@@ -452,9 +452,9 @@ static int w100fb_suspend(struct device *dev, pm_message_t state)
452 return 0; 452 return 0;
453} 453}
454 454
455static int w100fb_resume(struct device *dev) 455static int w100fb_resume(struct platform_device *dev)
456{ 456{
457 struct fb_info *info = dev_get_drvdata(dev); 457 struct fb_info *info = platform_get_drvdata(dev);
458 struct w100fb_par *par=info->par; 458 struct w100fb_par *par=info->par;
459 struct w100_tg_info *tg = par->mach->tg; 459 struct w100_tg_info *tg = par->mach->tg;
460 460
@@ -473,13 +473,12 @@ static int w100fb_resume(struct device *dev)
473#endif 473#endif
474 474
475 475
476int __init w100fb_probe(struct device *dev) 476int __init w100fb_probe(struct platform_device *pdev)
477{ 477{
478 int err = -EIO; 478 int err = -EIO;
479 struct w100fb_mach_info *inf; 479 struct w100fb_mach_info *inf;
480 struct fb_info *info = NULL; 480 struct fb_info *info = NULL;
481 struct w100fb_par *par; 481 struct w100fb_par *par;
482 struct platform_device *pdev = to_platform_device(dev);
483 struct resource *mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); 482 struct resource *mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
484 unsigned int chip_id; 483 unsigned int chip_id;
485 484
@@ -522,9 +521,9 @@ int __init w100fb_probe(struct device *dev)
522 } 521 }
523 522
524 par = info->par; 523 par = info->par;
525 dev_set_drvdata(dev, info); 524 platform_set_drvdata(pdev, info);
526 525
527 inf = dev->platform_data; 526 inf = pdev->dev.platform_data;
528 par->chip_id = chip_id; 527 par->chip_id = chip_id;
529 par->mach = inf; 528 par->mach = inf;
530 par->fastpll_mode = 0; 529 par->fastpll_mode = 0;
@@ -600,10 +599,10 @@ int __init w100fb_probe(struct device *dev)
600 goto out; 599 goto out;
601 } 600 }
602 601
603 device_create_file(dev, &dev_attr_fastpllclk); 602 device_create_file(&pdev->dev, &dev_attr_fastpllclk);
604 device_create_file(dev, &dev_attr_reg_read); 603 device_create_file(&pdev->dev, &dev_attr_reg_read);
605 device_create_file(dev, &dev_attr_reg_write); 604 device_create_file(&pdev->dev, &dev_attr_reg_write);
606 device_create_file(dev, &dev_attr_flip); 605 device_create_file(&pdev->dev, &dev_attr_flip);
607 606
608 printk(KERN_INFO "fb%d: %s frame buffer device\n", info->node, info->fix.id); 607 printk(KERN_INFO "fb%d: %s frame buffer device\n", info->node, info->fix.id);
609 return 0; 608 return 0;
@@ -622,15 +621,15 @@ out:
622} 621}
623 622
624 623
625static int w100fb_remove(struct device *dev) 624static int w100fb_remove(struct platform_device *pdev)
626{ 625{
627 struct fb_info *info = dev_get_drvdata(dev); 626 struct fb_info *info = platform_get_drvdata(pdev);
628 struct w100fb_par *par=info->par; 627 struct w100fb_par *par=info->par;
629 628
630 device_remove_file(dev, &dev_attr_fastpllclk); 629 device_remove_file(&pdev->dev, &dev_attr_fastpllclk);
631 device_remove_file(dev, &dev_attr_reg_read); 630 device_remove_file(&pdev->dev, &dev_attr_reg_read);
632 device_remove_file(dev, &dev_attr_reg_write); 631 device_remove_file(&pdev->dev, &dev_attr_reg_write);
633 device_remove_file(dev, &dev_attr_flip); 632 device_remove_file(&pdev->dev, &dev_attr_flip);
634 633
635 unregister_framebuffer(info); 634 unregister_framebuffer(info);
636 635
@@ -1448,23 +1447,24 @@ static void w100_vsync(void)
1448 writel(0x00000002, remapped_regs + mmGEN_INT_STATUS); 1447 writel(0x00000002, remapped_regs + mmGEN_INT_STATUS);
1449} 1448}
1450 1449
1451static struct device_driver w100fb_driver = { 1450static struct platform_driver w100fb_driver = {
1452 .name = "w100fb",
1453 .bus = &platform_bus_type,
1454 .probe = w100fb_probe, 1451 .probe = w100fb_probe,
1455 .remove = w100fb_remove, 1452 .remove = w100fb_remove,
1456 .suspend = w100fb_suspend, 1453 .suspend = w100fb_suspend,
1457 .resume = w100fb_resume, 1454 .resume = w100fb_resume,
1455 .driver = {
1456 .name = "w100fb",
1457 },
1458}; 1458};
1459 1459
1460int __devinit w100fb_init(void) 1460int __devinit w100fb_init(void)
1461{ 1461{
1462 return driver_register(&w100fb_driver); 1462 return platform_driver_register(&w100fb_driver);
1463} 1463}
1464 1464
1465void __exit w100fb_cleanup(void) 1465void __exit w100fb_cleanup(void)
1466{ 1466{
1467 driver_unregister(&w100fb_driver); 1467 platform_driver_unregister(&w100fb_driver);
1468} 1468}
1469 1469
1470module_init(w100fb_init); 1470module_init(w100fb_init);