aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/tmiofb.c
diff options
context:
space:
mode:
authorAndres Salomon <dilinger@queued.net>2011-02-17 22:07:19 -0500
committerSamuel Ortiz <sameo@linux.intel.com>2011-03-23 05:41:53 -0400
commit7d76ac15ad1a8d8b1a7b7b4f6be7a9d8dfd225bf (patch)
tree602bce48b9e86b26c44890dce8a0b9c698ee047c /drivers/video/tmiofb.c
parent410b09172787a930753fa5ed904d820e3a9d7a1f (diff)
mfd: mfd_cell is now implicitly available to tc6393xb drivers
No need to explicitly set the cell's platform_data/data_size. Modify clients to use mfd_get_cell helper function instead of accessing platform_data directly. Signed-off-by: Andres Salomon <dilinger@queued.net> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/video/tmiofb.c')
-rw-r--r--drivers/video/tmiofb.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/drivers/video/tmiofb.c b/drivers/video/tmiofb.c
index dfef88c803d4..630288212656 100644
--- a/drivers/video/tmiofb.c
+++ b/drivers/video/tmiofb.c
@@ -250,7 +250,7 @@ static irqreturn_t tmiofb_irq(int irq, void *__info)
250 */ 250 */
251static int tmiofb_hw_stop(struct platform_device *dev) 251static int tmiofb_hw_stop(struct platform_device *dev)
252{ 252{
253 struct mfd_cell *cell = dev->dev.platform_data; 253 struct mfd_cell *cell = mfd_get_cell(dev);
254 struct tmio_fb_data *data = cell->driver_data; 254 struct tmio_fb_data *data = cell->driver_data;
255 struct fb_info *info = platform_get_drvdata(dev); 255 struct fb_info *info = platform_get_drvdata(dev);
256 struct tmiofb_par *par = info->par; 256 struct tmiofb_par *par = info->par;
@@ -268,7 +268,7 @@ static int tmiofb_hw_stop(struct platform_device *dev)
268 */ 268 */
269static int tmiofb_hw_init(struct platform_device *dev) 269static int tmiofb_hw_init(struct platform_device *dev)
270{ 270{
271 struct mfd_cell *cell = dev->dev.platform_data; 271 struct mfd_cell *cell = mfd_get_cell(dev);
272 struct fb_info *info = platform_get_drvdata(dev); 272 struct fb_info *info = platform_get_drvdata(dev);
273 struct tmiofb_par *par = info->par; 273 struct tmiofb_par *par = info->par;
274 const struct resource *nlcr = &cell->resources[0]; 274 const struct resource *nlcr = &cell->resources[0];
@@ -312,7 +312,7 @@ static int tmiofb_hw_init(struct platform_device *dev)
312 */ 312 */
313static void tmiofb_hw_mode(struct platform_device *dev) 313static void tmiofb_hw_mode(struct platform_device *dev)
314{ 314{
315 struct mfd_cell *cell = dev->dev.platform_data; 315 struct mfd_cell *cell = mfd_get_cell(dev);
316 struct tmio_fb_data *data = cell->driver_data; 316 struct tmio_fb_data *data = cell->driver_data;
317 struct fb_info *info = platform_get_drvdata(dev); 317 struct fb_info *info = platform_get_drvdata(dev);
318 struct fb_videomode *mode = info->mode; 318 struct fb_videomode *mode = info->mode;
@@ -559,8 +559,7 @@ static int tmiofb_ioctl(struct fb_info *fbi,
559static struct fb_videomode * 559static struct fb_videomode *
560tmiofb_find_mode(struct fb_info *info, struct fb_var_screeninfo *var) 560tmiofb_find_mode(struct fb_info *info, struct fb_var_screeninfo *var)
561{ 561{
562 struct mfd_cell *cell = 562 struct mfd_cell *cell = mfd_get_cell(to_platform_device(info->device));
563 info->device->platform_data;
564 struct tmio_fb_data *data = cell->driver_data; 563 struct tmio_fb_data *data = cell->driver_data;
565 struct fb_videomode *best = NULL; 564 struct fb_videomode *best = NULL;
566 int i; 565 int i;
@@ -581,8 +580,7 @@ static int tmiofb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
581{ 580{
582 581
583 struct fb_videomode *mode; 582 struct fb_videomode *mode;
584 struct mfd_cell *cell = 583 struct mfd_cell *cell = mfd_get_cell(to_platform_device(info->device));
585 info->device->platform_data;
586 struct tmio_fb_data *data = cell->driver_data; 584 struct tmio_fb_data *data = cell->driver_data;
587 585
588 mode = tmiofb_find_mode(info, var); 586 mode = tmiofb_find_mode(info, var);
@@ -683,7 +681,7 @@ static struct fb_ops tmiofb_ops = {
683 681
684static int __devinit tmiofb_probe(struct platform_device *dev) 682static int __devinit tmiofb_probe(struct platform_device *dev)
685{ 683{
686 struct mfd_cell *cell = dev->dev.platform_data; 684 struct mfd_cell *cell = mfd_get_cell(dev);
687 struct tmio_fb_data *data = cell->driver_data; 685 struct tmio_fb_data *data = cell->driver_data;
688 struct resource *ccr = platform_get_resource(dev, IORESOURCE_MEM, 1); 686 struct resource *ccr = platform_get_resource(dev, IORESOURCE_MEM, 1);
689 struct resource *lcr = platform_get_resource(dev, IORESOURCE_MEM, 0); 687 struct resource *lcr = platform_get_resource(dev, IORESOURCE_MEM, 0);
@@ -811,7 +809,7 @@ err_ioremap_ccr:
811 809
812static int __devexit tmiofb_remove(struct platform_device *dev) 810static int __devexit tmiofb_remove(struct platform_device *dev)
813{ 811{
814 struct mfd_cell *cell = dev->dev.platform_data; 812 struct mfd_cell *cell = mfd_get_cell(dev);
815 struct fb_info *info = platform_get_drvdata(dev); 813 struct fb_info *info = platform_get_drvdata(dev);
816 int irq = platform_get_irq(dev, 0); 814 int irq = platform_get_irq(dev, 0);
817 struct tmiofb_par *par; 815 struct tmiofb_par *par;
@@ -941,7 +939,7 @@ static int tmiofb_suspend(struct platform_device *dev, pm_message_t state)
941#ifdef CONFIG_FB_TMIO_ACCELL 939#ifdef CONFIG_FB_TMIO_ACCELL
942 struct tmiofb_par *par = info->par; 940 struct tmiofb_par *par = info->par;
943#endif 941#endif
944 struct mfd_cell *cell = dev->dev.platform_data; 942 struct mfd_cell *cell = mfd_get_cell(dev);
945 int retval = 0; 943 int retval = 0;
946 944
947 console_lock(); 945 console_lock();
@@ -973,7 +971,7 @@ static int tmiofb_suspend(struct platform_device *dev, pm_message_t state)
973static int tmiofb_resume(struct platform_device *dev) 971static int tmiofb_resume(struct platform_device *dev)
974{ 972{
975 struct fb_info *info = platform_get_drvdata(dev); 973 struct fb_info *info = platform_get_drvdata(dev);
976 struct mfd_cell *cell = dev->dev.platform_data; 974 struct mfd_cell *cell = mfd_get_cell(dev);
977 int retval = 0; 975 int retval = 0;
978 976
979 console_lock(); 977 console_lock();