Commit e948d32c authored by Uwe Kleine-König's avatar Uwe Kleine-König Committed by Helge Deller

video: fbdev: imxfb: Drop platform data support

No source file but the driver itself includes the header containing the
platform data definition. The last user is gone since commit
8485adf1 ("ARM: imx: Remove imx device directory").

So we can safely drop platform data support.
Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: default avatarHelge Deller <deller@gmx.de>
parent 26c2b7d9
...@@ -656,7 +656,6 @@ static int imxfb_activate_var(struct fb_var_screeninfo *var, struct fb_info *inf ...@@ -656,7 +656,6 @@ static int imxfb_activate_var(struct fb_var_screeninfo *var, struct fb_info *inf
static int imxfb_init_fbinfo(struct platform_device *pdev) static int imxfb_init_fbinfo(struct platform_device *pdev)
{ {
struct imx_fb_platform_data *pdata = dev_get_platdata(&pdev->dev);
struct fb_info *info = platform_get_drvdata(pdev); struct fb_info *info = platform_get_drvdata(pdev);
struct imxfb_info *fbi = info->par; struct imxfb_info *fbi = info->par;
struct device_node *np; struct device_node *np;
...@@ -690,11 +689,7 @@ static int imxfb_init_fbinfo(struct platform_device *pdev) ...@@ -690,11 +689,7 @@ static int imxfb_init_fbinfo(struct platform_device *pdev)
info->fbops = &imxfb_ops; info->fbops = &imxfb_ops;
info->flags = FBINFO_FLAG_DEFAULT | info->flags = FBINFO_FLAG_DEFAULT |
FBINFO_READS_FAST; FBINFO_READS_FAST;
if (pdata) {
fbi->lscr1 = pdata->lscr1;
fbi->dmacr = pdata->dmacr;
fbi->pwmr = pdata->pwmr;
} else {
np = pdev->dev.of_node; np = pdev->dev.of_node;
info->var.grayscale = of_property_read_bool(np, info->var.grayscale = of_property_read_bool(np,
"cmap-greyscale"); "cmap-greyscale");
...@@ -708,7 +703,6 @@ static int imxfb_init_fbinfo(struct platform_device *pdev) ...@@ -708,7 +703,6 @@ static int imxfb_init_fbinfo(struct platform_device *pdev)
of_property_read_u32(np, "fsl,lscr1", &fbi->lscr1); of_property_read_u32(np, "fsl,lscr1", &fbi->lscr1);
of_property_read_u32(np, "fsl,dmacr", &fbi->dmacr); of_property_read_u32(np, "fsl,dmacr", &fbi->dmacr);
}
return 0; return 0;
} }
...@@ -863,10 +857,10 @@ static int imxfb_probe(struct platform_device *pdev) ...@@ -863,10 +857,10 @@ static int imxfb_probe(struct platform_device *pdev)
struct imxfb_info *fbi; struct imxfb_info *fbi;
struct lcd_device *lcd; struct lcd_device *lcd;
struct fb_info *info; struct fb_info *info;
struct imx_fb_platform_data *pdata;
struct resource *res; struct resource *res;
struct imx_fb_videomode *m; struct imx_fb_videomode *m;
const struct of_device_id *of_id; const struct of_device_id *of_id;
struct device_node *display_np;
int ret, i; int ret, i;
int bytes_per_pixel; int bytes_per_pixel;
...@@ -884,8 +878,6 @@ static int imxfb_probe(struct platform_device *pdev) ...@@ -884,8 +878,6 @@ static int imxfb_probe(struct platform_device *pdev)
if (!res) if (!res)
return -ENODEV; return -ENODEV;
pdata = dev_get_platdata(&pdev->dev);
info = framebuffer_alloc(sizeof(struct imxfb_info), &pdev->dev); info = framebuffer_alloc(sizeof(struct imxfb_info), &pdev->dev);
if (!info) if (!info)
return -ENOMEM; return -ENOMEM;
...@@ -898,14 +890,6 @@ static int imxfb_probe(struct platform_device *pdev) ...@@ -898,14 +890,6 @@ static int imxfb_probe(struct platform_device *pdev)
if (ret < 0) if (ret < 0)
goto failed_init; goto failed_init;
if (pdata) {
if (!fb_mode)
fb_mode = pdata->mode[0].mode.name;
fbi->mode = pdata->mode;
fbi->num_modes = pdata->num_modes;
} else {
struct device_node *display_np;
fb_mode = NULL; fb_mode = NULL;
display_np = of_parse_phandle(pdev->dev.of_node, "display", 0); display_np = of_parse_phandle(pdev->dev.of_node, "display", 0);
...@@ -933,7 +917,6 @@ static int imxfb_probe(struct platform_device *pdev) ...@@ -933,7 +917,6 @@ static int imxfb_probe(struct platform_device *pdev)
of_node_put(display_np); of_node_put(display_np);
if (ret) if (ret)
goto failed_of_parse; goto failed_of_parse;
}
/* Calculate maximum bytes used per pixel. In most cases this should /* Calculate maximum bytes used per pixel. In most cases this should
* be the same as m->bpp/8 */ * be the same as m->bpp/8 */
...@@ -1001,13 +984,6 @@ static int imxfb_probe(struct platform_device *pdev) ...@@ -1001,13 +984,6 @@ static int imxfb_probe(struct platform_device *pdev)
info->fix.smem_start = fbi->map_dma; info->fix.smem_start = fbi->map_dma;
if (pdata && pdata->init) {
ret = pdata->init(fbi->pdev);
if (ret)
goto failed_platform_init;
}
INIT_LIST_HEAD(&info->modelist); INIT_LIST_HEAD(&info->modelist);
for (i = 0; i < fbi->num_modes; i++) for (i = 0; i < fbi->num_modes; i++)
fb_add_videomode(&fbi->mode[i].mode, &info->modelist); fb_add_videomode(&fbi->mode[i].mode, &info->modelist);
...@@ -1059,9 +1035,6 @@ static int imxfb_probe(struct platform_device *pdev) ...@@ -1059,9 +1035,6 @@ static int imxfb_probe(struct platform_device *pdev)
failed_register: failed_register:
fb_dealloc_cmap(&info->cmap); fb_dealloc_cmap(&info->cmap);
failed_cmap: failed_cmap:
if (pdata && pdata->exit)
pdata->exit(fbi->pdev);
failed_platform_init:
dma_free_wc(&pdev->dev, fbi->map_size, info->screen_buffer, dma_free_wc(&pdev->dev, fbi->map_size, info->screen_buffer,
fbi->map_dma); fbi->map_dma);
failed_map: failed_map:
...@@ -1079,7 +1052,6 @@ static int imxfb_probe(struct platform_device *pdev) ...@@ -1079,7 +1052,6 @@ static int imxfb_probe(struct platform_device *pdev)
static int imxfb_remove(struct platform_device *pdev) static int imxfb_remove(struct platform_device *pdev)
{ {
struct imx_fb_platform_data *pdata;
struct fb_info *info = platform_get_drvdata(pdev); struct fb_info *info = platform_get_drvdata(pdev);
struct imxfb_info *fbi = info->par; struct imxfb_info *fbi = info->par;
struct resource *res; struct resource *res;
...@@ -1092,9 +1064,6 @@ static int imxfb_remove(struct platform_device *pdev) ...@@ -1092,9 +1064,6 @@ static int imxfb_remove(struct platform_device *pdev)
unregister_framebuffer(info); unregister_framebuffer(info);
fb_dealloc_cmap(&info->cmap); fb_dealloc_cmap(&info->cmap);
pdata = dev_get_platdata(&pdev->dev);
if (pdata && pdata->exit)
pdata->exit(fbi->pdev);
dma_free_wc(&pdev->dev, fbi->map_size, info->screen_buffer, dma_free_wc(&pdev->dev, fbi->map_size, info->screen_buffer,
fbi->map_dma); fbi->map_dma);
iounmap(fbi->regs); iounmap(fbi->regs);
......
...@@ -55,16 +55,4 @@ struct imx_fb_videomode { ...@@ -55,16 +55,4 @@ struct imx_fb_videomode {
unsigned char bpp; unsigned char bpp;
}; };
struct imx_fb_platform_data {
struct imx_fb_videomode *mode;
int num_modes;
u_int pwmr;
u_int lscr1;
u_int dmacr;
int (*init)(struct platform_device *);
void (*exit)(struct platform_device *);
};
#endif /* ifndef __MACH_IMXFB_H__ */ #endif /* ifndef __MACH_IMXFB_H__ */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment