diff options
author | Samuel Ortiz <sameo@linux.intel.com> | 2011-04-06 06:13:25 -0400 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2011-05-26 13:45:03 -0400 |
commit | 1f8c666caddb4cd0c547bbedbc9f98c7bf51e176 (patch) | |
tree | a70d8c88bf91a4ea3342333d8763b9be4d620c87 | |
parent | 9e554696c03e04c51d095c1c451e26a8cb6a84fa (diff) |
fb: Use platform_data to retrieve tmiofb platform bits
With the addition of the platform device mfd_cell pointer, we can now
cleanly pass the sub device drivers platform data pointers through the
regular device platform_data one, and get rid of mfd_get_data().
Cc: Ian Molton <spyro@f2s.com>
Cc: Paul Mundt <lethal@linux-sh.org>
Acked-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
-rw-r--r-- | drivers/mfd/tc6393xb.c | 3 | ||||
-rw-r--r-- | drivers/video/tmiofb.c | 12 |
2 files changed, 7 insertions, 8 deletions
diff --git a/drivers/mfd/tc6393xb.c b/drivers/mfd/tc6393xb.c index 8e9b1b765f1a..b3d5852b0698 100644 --- a/drivers/mfd/tc6393xb.c +++ b/drivers/mfd/tc6393xb.c | |||
@@ -694,7 +694,8 @@ static int __devinit tc6393xb_probe(struct platform_device *dev) | |||
694 | } | 694 | } |
695 | 695 | ||
696 | tc6393xb_cells[TC6393XB_CELL_NAND].mfd_data = tcpd->nand_data; | 696 | tc6393xb_cells[TC6393XB_CELL_NAND].mfd_data = tcpd->nand_data; |
697 | tc6393xb_cells[TC6393XB_CELL_FB].mfd_data = tcpd->fb_data; | 697 | tc6393xb_cells[TC6393XB_CELL_FB].platform_data = tcpd->fb_data; |
698 | tc6393xb_cells[TC6393XB_CELL_FB].pdata_size = sizeof(*tcpd->fb_data); | ||
698 | 699 | ||
699 | ret = mfd_add_devices(&dev->dev, dev->id, | 700 | ret = mfd_add_devices(&dev->dev, dev->id, |
700 | tc6393xb_cells, ARRAY_SIZE(tc6393xb_cells), | 701 | tc6393xb_cells, ARRAY_SIZE(tc6393xb_cells), |
diff --git a/drivers/video/tmiofb.c b/drivers/video/tmiofb.c index 0c341d739604..cd1c4dcef8fd 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 | */ |
251 | static int tmiofb_hw_stop(struct platform_device *dev) | 251 | static int tmiofb_hw_stop(struct platform_device *dev) |
252 | { | 252 | { |
253 | struct tmio_fb_data *data = mfd_get_data(dev); | 253 | struct tmio_fb_data *data = dev->dev.platform_data; |
254 | struct fb_info *info = platform_get_drvdata(dev); | 254 | struct fb_info *info = platform_get_drvdata(dev); |
255 | struct tmiofb_par *par = info->par; | 255 | struct tmiofb_par *par = info->par; |
256 | 256 | ||
@@ -311,7 +311,7 @@ static int tmiofb_hw_init(struct platform_device *dev) | |||
311 | */ | 311 | */ |
312 | static void tmiofb_hw_mode(struct platform_device *dev) | 312 | static void tmiofb_hw_mode(struct platform_device *dev) |
313 | { | 313 | { |
314 | struct tmio_fb_data *data = mfd_get_data(dev); | 314 | struct tmio_fb_data *data = dev->dev.platform_data; |
315 | struct fb_info *info = platform_get_drvdata(dev); | 315 | struct fb_info *info = platform_get_drvdata(dev); |
316 | struct fb_videomode *mode = info->mode; | 316 | struct fb_videomode *mode = info->mode; |
317 | struct tmiofb_par *par = info->par; | 317 | struct tmiofb_par *par = info->par; |
@@ -557,8 +557,7 @@ static int tmiofb_ioctl(struct fb_info *fbi, | |||
557 | static struct fb_videomode * | 557 | static struct fb_videomode * |
558 | tmiofb_find_mode(struct fb_info *info, struct fb_var_screeninfo *var) | 558 | tmiofb_find_mode(struct fb_info *info, struct fb_var_screeninfo *var) |
559 | { | 559 | { |
560 | struct tmio_fb_data *data = | 560 | struct tmio_fb_data *data = info->device->platform_data; |
561 | mfd_get_data(to_platform_device(info->device)); | ||
562 | struct fb_videomode *best = NULL; | 561 | struct fb_videomode *best = NULL; |
563 | int i; | 562 | int i; |
564 | 563 | ||
@@ -578,8 +577,7 @@ static int tmiofb_check_var(struct fb_var_screeninfo *var, struct fb_info *info) | |||
578 | { | 577 | { |
579 | 578 | ||
580 | struct fb_videomode *mode; | 579 | struct fb_videomode *mode; |
581 | struct tmio_fb_data *data = | 580 | struct tmio_fb_data *data = info->device->platform_data; |
582 | mfd_get_data(to_platform_device(info->device)); | ||
583 | 581 | ||
584 | mode = tmiofb_find_mode(info, var); | 582 | mode = tmiofb_find_mode(info, var); |
585 | if (!mode || var->bits_per_pixel > 16) | 583 | if (!mode || var->bits_per_pixel > 16) |
@@ -680,7 +678,7 @@ static struct fb_ops tmiofb_ops = { | |||
680 | static int __devinit tmiofb_probe(struct platform_device *dev) | 678 | static int __devinit tmiofb_probe(struct platform_device *dev) |
681 | { | 679 | { |
682 | const struct mfd_cell *cell = mfd_get_cell(dev); | 680 | const struct mfd_cell *cell = mfd_get_cell(dev); |
683 | struct tmio_fb_data *data = mfd_get_data(dev); | 681 | struct tmio_fb_data *data = dev->dev.platform_data; |
684 | struct resource *ccr = platform_get_resource(dev, IORESOURCE_MEM, 1); | 682 | struct resource *ccr = platform_get_resource(dev, IORESOURCE_MEM, 1); |
685 | struct resource *lcr = platform_get_resource(dev, IORESOURCE_MEM, 0); | 683 | struct resource *lcr = platform_get_resource(dev, IORESOURCE_MEM, 0); |
686 | struct resource *vram = platform_get_resource(dev, IORESOURCE_MEM, 2); | 684 | struct resource *vram = platform_get_resource(dev, IORESOURCE_MEM, 2); |