Commit 18553507 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'fbdev-for-6.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev

Pull fbdev fixes and cleanups from Helge Deller:

 - fix double free and resource leaks in imsttfb

 - lots of remove callback cleanups and section mismatch fixes in
   omapfb, amifb and atmel_lcdfb

 - error code fix and memparse simplification in omapfb

* tag 'fbdev-for-6.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev: (31 commits)
  fbdev: fsl-diu-fb: mark wr_reg_wa() static
  fbdev: amifb: Convert to platform remove callback returning void
  fbdev: amifb: Mark driver struct with __refdata to prevent section mismatch warning
  fbdev: hyperv_fb: fix uninitialized local variable use
  fbdev: omapfb/tpd12s015: Convert to platform remove callback returning void
  fbdev: omapfb/tfp410: Convert to platform remove callback returning void
  fbdev: omapfb/sharp-ls037v7dw01: Convert to platform remove callback returning void
  fbdev: omapfb/opa362: Convert to platform remove callback returning void
  fbdev: omapfb/hdmi: Convert to platform remove callback returning void
  fbdev: omapfb/dvi: Convert to platform remove callback returning void
  fbdev: omapfb/dsi-cm: Convert to platform remove callback returning void
  fbdev: omapfb/dpi: Convert to platform remove callback returning void
  fbdev: omapfb/analog-tv: Convert to platform remove callback returning void
  fbdev: atmel_lcdfb: Convert to platform remove callback returning void
  fbdev: omapfb/tpd12s015: Don't put .remove() in .exit.text and drop suppress_bind_attrs
  fbdev: omapfb/tfp410: Don't put .remove() in .exit.text and drop suppress_bind_attrs
  fbdev: omapfb/sharp-ls037v7dw01: Don't put .remove() in .exit.text and drop suppress_bind_attrs
  fbdev: omapfb/opa362: Don't put .remove() in .exit.text and drop suppress_bind_attrs
  fbdev: omapfb/hdmi: Don't put .remove() in .exit.text and drop suppress_bind_attrs
  fbdev: omapfb/dvi: Don't put .remove() in .exit.text and drop suppress_bind_attrs
  ...
parents c0d12d76 a5035c81
...@@ -3752,7 +3752,7 @@ static int __init amifb_probe(struct platform_device *pdev) ...@@ -3752,7 +3752,7 @@ static int __init amifb_probe(struct platform_device *pdev)
} }
static int __exit amifb_remove(struct platform_device *pdev) static void __exit amifb_remove(struct platform_device *pdev)
{ {
struct fb_info *info = platform_get_drvdata(pdev); struct fb_info *info = platform_get_drvdata(pdev);
...@@ -3765,11 +3765,16 @@ static int __exit amifb_remove(struct platform_device *pdev) ...@@ -3765,11 +3765,16 @@ static int __exit amifb_remove(struct platform_device *pdev)
chipfree(); chipfree();
framebuffer_release(info); framebuffer_release(info);
amifb_video_off(); amifb_video_off();
return 0;
} }
static struct platform_driver amifb_driver = { /*
.remove = __exit_p(amifb_remove), * amifb_remove() lives in .exit.text. For drivers registered via
* module_platform_driver_probe() this ok because they cannot get unboud at
* runtime. The driver needs to be marked with __refdata, otherwise modpost
* triggers a section mismatch warning.
*/
static struct platform_driver amifb_driver __refdata = {
.remove_new = __exit_p(amifb_remove),
.driver = { .driver = {
.name = "amiga-video", .name = "amiga-video",
}, },
......
...@@ -220,7 +220,7 @@ static inline void atmel_lcdfb_power_control(struct atmel_lcdfb_info *sinfo, int ...@@ -220,7 +220,7 @@ static inline void atmel_lcdfb_power_control(struct atmel_lcdfb_info *sinfo, int
} }
} }
static const struct fb_fix_screeninfo atmel_lcdfb_fix __initconst = { static const struct fb_fix_screeninfo atmel_lcdfb_fix = {
.type = FB_TYPE_PACKED_PIXELS, .type = FB_TYPE_PACKED_PIXELS,
.visual = FB_VISUAL_TRUECOLOR, .visual = FB_VISUAL_TRUECOLOR,
.xpanstep = 0, .xpanstep = 0,
...@@ -841,7 +841,7 @@ static void atmel_lcdfb_task(struct work_struct *work) ...@@ -841,7 +841,7 @@ static void atmel_lcdfb_task(struct work_struct *work)
atmel_lcdfb_reset(sinfo); atmel_lcdfb_reset(sinfo);
} }
static int __init atmel_lcdfb_init_fbinfo(struct atmel_lcdfb_info *sinfo) static int atmel_lcdfb_init_fbinfo(struct atmel_lcdfb_info *sinfo)
{ {
struct fb_info *info = sinfo->info; struct fb_info *info = sinfo->info;
int ret = 0; int ret = 0;
...@@ -1017,7 +1017,7 @@ static int atmel_lcdfb_of_init(struct atmel_lcdfb_info *sinfo) ...@@ -1017,7 +1017,7 @@ static int atmel_lcdfb_of_init(struct atmel_lcdfb_info *sinfo)
return ret; return ret;
} }
static int __init atmel_lcdfb_probe(struct platform_device *pdev) static int atmel_lcdfb_probe(struct platform_device *pdev)
{ {
struct device *dev = &pdev->dev; struct device *dev = &pdev->dev;
struct fb_info *info; struct fb_info *info;
...@@ -1223,14 +1223,14 @@ static int __init atmel_lcdfb_probe(struct platform_device *pdev) ...@@ -1223,14 +1223,14 @@ static int __init atmel_lcdfb_probe(struct platform_device *pdev)
return ret; return ret;
} }
static int __exit atmel_lcdfb_remove(struct platform_device *pdev) static void atmel_lcdfb_remove(struct platform_device *pdev)
{ {
struct device *dev = &pdev->dev; struct device *dev = &pdev->dev;
struct fb_info *info = dev_get_drvdata(dev); struct fb_info *info = dev_get_drvdata(dev);
struct atmel_lcdfb_info *sinfo; struct atmel_lcdfb_info *sinfo;
if (!info || !info->par) if (!info || !info->par)
return 0; return;
sinfo = info->par; sinfo = info->par;
cancel_work_sync(&sinfo->task); cancel_work_sync(&sinfo->task);
...@@ -1252,8 +1252,6 @@ static int __exit atmel_lcdfb_remove(struct platform_device *pdev) ...@@ -1252,8 +1252,6 @@ static int __exit atmel_lcdfb_remove(struct platform_device *pdev)
} }
framebuffer_release(info); framebuffer_release(info);
return 0;
} }
#ifdef CONFIG_PM #ifdef CONFIG_PM
...@@ -1301,7 +1299,8 @@ static int atmel_lcdfb_resume(struct platform_device *pdev) ...@@ -1301,7 +1299,8 @@ static int atmel_lcdfb_resume(struct platform_device *pdev)
#endif #endif
static struct platform_driver atmel_lcdfb_driver = { static struct platform_driver atmel_lcdfb_driver = {
.remove = __exit_p(atmel_lcdfb_remove), .probe = atmel_lcdfb_probe,
.remove_new = atmel_lcdfb_remove,
.suspend = atmel_lcdfb_suspend, .suspend = atmel_lcdfb_suspend,
.resume = atmel_lcdfb_resume, .resume = atmel_lcdfb_resume,
.driver = { .driver = {
...@@ -1309,8 +1308,7 @@ static struct platform_driver atmel_lcdfb_driver = { ...@@ -1309,8 +1308,7 @@ static struct platform_driver atmel_lcdfb_driver = {
.of_match_table = atmel_lcdfb_dt_ids, .of_match_table = atmel_lcdfb_dt_ids,
}, },
}; };
module_platform_driver(atmel_lcdfb_driver);
module_platform_driver_probe(atmel_lcdfb_driver, atmel_lcdfb_probe);
MODULE_DESCRIPTION("AT91 LCD Controller framebuffer driver"); MODULE_DESCRIPTION("AT91 LCD Controller framebuffer driver");
MODULE_AUTHOR("Nicolas Ferre <nicolas.ferre@atmel.com>"); MODULE_AUTHOR("Nicolas Ferre <nicolas.ferre@atmel.com>");
......
...@@ -490,7 +490,7 @@ static enum fsl_diu_monitor_port fsl_diu_name_to_port(const char *s) ...@@ -490,7 +490,7 @@ static enum fsl_diu_monitor_port fsl_diu_name_to_port(const char *s)
* Workaround for failed writing desc register of planes. * Workaround for failed writing desc register of planes.
* Needed with MPC5121 DIU rev 2.0 silicon. * Needed with MPC5121 DIU rev 2.0 silicon.
*/ */
void wr_reg_wa(u32 *reg, u32 val) static void wr_reg_wa(u32 *reg, u32 val)
{ {
do { do {
out_be32(reg, val); out_be32(reg, val);
......
...@@ -1013,6 +1013,8 @@ static int hvfb_getmem(struct hv_device *hdev, struct fb_info *info) ...@@ -1013,6 +1013,8 @@ static int hvfb_getmem(struct hv_device *hdev, struct fb_info *info)
} else if (IS_ENABLED(CONFIG_SYSFB)) { } else if (IS_ENABLED(CONFIG_SYSFB)) {
base = screen_info.lfb_base; base = screen_info.lfb_base;
size = screen_info.lfb_size; size = screen_info.lfb_size;
} else {
goto err1;
} }
/* /*
......
...@@ -1421,7 +1421,6 @@ static int init_imstt(struct fb_info *info) ...@@ -1421,7 +1421,6 @@ static int init_imstt(struct fb_info *info)
if ((info->var.xres * info->var.yres) * (info->var.bits_per_pixel >> 3) > info->fix.smem_len if ((info->var.xres * info->var.yres) * (info->var.bits_per_pixel >> 3) > info->fix.smem_len
|| !(compute_imstt_regvals(par, info->var.xres, info->var.yres))) { || !(compute_imstt_regvals(par, info->var.xres, info->var.yres))) {
printk("imsttfb: %ux%ux%u not supported\n", info->var.xres, info->var.yres, info->var.bits_per_pixel); printk("imsttfb: %ux%ux%u not supported\n", info->var.xres, info->var.yres, info->var.bits_per_pixel);
framebuffer_release(info);
return -ENODEV; return -ENODEV;
} }
...@@ -1453,14 +1452,11 @@ static int init_imstt(struct fb_info *info) ...@@ -1453,14 +1452,11 @@ static int init_imstt(struct fb_info *info)
FBINFO_HWACCEL_FILLRECT | FBINFO_HWACCEL_FILLRECT |
FBINFO_HWACCEL_YPAN; FBINFO_HWACCEL_YPAN;
if (fb_alloc_cmap(&info->cmap, 0, 0)) { if (fb_alloc_cmap(&info->cmap, 0, 0))
framebuffer_release(info);
return -ENODEV; return -ENODEV;
}
if (register_framebuffer(info) < 0) { if (register_framebuffer(info) < 0) {
fb_dealloc_cmap(&info->cmap); fb_dealloc_cmap(&info->cmap);
framebuffer_release(info);
return -ENODEV; return -ENODEV;
} }
...@@ -1500,8 +1496,8 @@ static int imsttfb_probe(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -1500,8 +1496,8 @@ static int imsttfb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
if (!request_mem_region(addr, size, "imsttfb")) { if (!request_mem_region(addr, size, "imsttfb")) {
printk(KERN_ERR "imsttfb: Can't reserve memory region\n"); printk(KERN_ERR "imsttfb: Can't reserve memory region\n");
framebuffer_release(info); ret = -ENODEV;
return -ENODEV; goto release_info;
} }
switch (pdev->device) { switch (pdev->device) {
...@@ -1518,36 +1514,39 @@ static int imsttfb_probe(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -1518,36 +1514,39 @@ static int imsttfb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
printk(KERN_INFO "imsttfb: Device 0x%x unknown, " printk(KERN_INFO "imsttfb: Device 0x%x unknown, "
"contact maintainer.\n", pdev->device); "contact maintainer.\n", pdev->device);
ret = -ENODEV; ret = -ENODEV;
goto error; goto release_mem_region;
} }
info->fix.smem_start = addr; info->fix.smem_start = addr;
info->screen_base = (__u8 *)ioremap(addr, par->ramdac == IBM ? info->screen_base = (__u8 *)ioremap(addr, par->ramdac == IBM ?
0x400000 : 0x800000); 0x400000 : 0x800000);
if (!info->screen_base) if (!info->screen_base)
goto error; goto release_mem_region;
info->fix.mmio_start = addr + 0x800000; info->fix.mmio_start = addr + 0x800000;
par->dc_regs = ioremap(addr + 0x800000, 0x1000); par->dc_regs = ioremap(addr + 0x800000, 0x1000);
if (!par->dc_regs) if (!par->dc_regs)
goto error; goto unmap_screen_base;
par->cmap_regs_phys = addr + 0x840000; par->cmap_regs_phys = addr + 0x840000;
par->cmap_regs = (__u8 *)ioremap(addr + 0x840000, 0x1000); par->cmap_regs = (__u8 *)ioremap(addr + 0x840000, 0x1000);
if (!par->cmap_regs) if (!par->cmap_regs)
goto error; goto unmap_dc_regs;
info->pseudo_palette = par->palette; info->pseudo_palette = par->palette;
ret = init_imstt(info); ret = init_imstt(info);
if (ret) if (ret)
goto error; goto unmap_cmap_regs;
pci_set_drvdata(pdev, info); pci_set_drvdata(pdev, info);
return ret; return 0;
error: unmap_cmap_regs:
if (par->dc_regs) iounmap(par->cmap_regs);
iounmap(par->dc_regs); unmap_dc_regs:
if (info->screen_base) iounmap(par->dc_regs);
iounmap(info->screen_base); unmap_screen_base:
iounmap(info->screen_base);
release_mem_region:
release_mem_region(addr, size); release_mem_region(addr, size);
release_info:
framebuffer_release(info); framebuffer_release(info);
return ret; return ret;
} }
......
...@@ -423,11 +423,9 @@ static void offb_init_fb(struct platform_device *parent, const char *name, ...@@ -423,11 +423,9 @@ static void offb_init_fb(struct platform_device *parent, const char *name,
fix = &info->fix; fix = &info->fix;
var = &info->var; var = &info->var;
if (name) { if (name)
strcpy(fix->id, "OFfb "); snprintf(fix->id, sizeof(fix->id), "OFfb %s", name);
strncat(fix->id, name, sizeof(fix->id) - sizeof("OFfb ")); else
fix->id[sizeof(fix->id) - 1] = '\0';
} else
snprintf(fix->id, sizeof(fix->id), "OFfb %pOFn", dp); snprintf(fix->id, sizeof(fix->id), "OFfb %pOFn", dp);
......
...@@ -1643,17 +1643,16 @@ static int omapfb_do_probe(struct platform_device *pdev, ...@@ -1643,17 +1643,16 @@ static int omapfb_do_probe(struct platform_device *pdev,
r = -ENOMEM; r = -ENOMEM;
goto cleanup; goto cleanup;
} }
fbdev->int_irq = platform_get_irq(pdev, 0);
if (fbdev->int_irq < 0) { r = platform_get_irq(pdev, 0);
r = -ENXIO; if (r < 0)
goto cleanup; goto cleanup;
} fbdev->int_irq = r;
fbdev->ext_irq = platform_get_irq(pdev, 1); r = platform_get_irq(pdev, 1);
if (fbdev->ext_irq < 0) { if (r < 0)
r = -ENXIO;
goto cleanup; goto cleanup;
} fbdev->ext_irq = r;
init_state++; init_state++;
...@@ -1857,20 +1856,13 @@ static int __init omapfb_setup(char *options) ...@@ -1857,20 +1856,13 @@ static int __init omapfb_setup(char *options)
if (!strncmp(this_opt, "accel", 5)) if (!strncmp(this_opt, "accel", 5))
def_accel = 1; def_accel = 1;
else if (!strncmp(this_opt, "vram:", 5)) { else if (!strncmp(this_opt, "vram:", 5)) {
unsigned long long vram;
char *suffix; char *suffix;
unsigned long vram;
vram = (simple_strtoul(this_opt + 5, &suffix, 0)); vram = memparse(this_opt + 5, &suffix);
switch (suffix[0]) { switch (suffix[0]) {
case '\0': case '\0':
break; break;
case 'm':
case 'M':
vram *= 1024;
fallthrough;
case 'k':
case 'K':
vram *= 1024;
break;
default: default:
pr_debug("omapfb: invalid vram suffix %c\n", pr_debug("omapfb: invalid vram suffix %c\n",
suffix[0]); suffix[0]);
......
...@@ -221,7 +221,7 @@ static int tvc_probe(struct platform_device *pdev) ...@@ -221,7 +221,7 @@ static int tvc_probe(struct platform_device *pdev)
return r; return r;
} }
static int __exit tvc_remove(struct platform_device *pdev) static void tvc_remove(struct platform_device *pdev)
{ {
struct panel_drv_data *ddata = platform_get_drvdata(pdev); struct panel_drv_data *ddata = platform_get_drvdata(pdev);
struct omap_dss_device *dssdev = &ddata->dssdev; struct omap_dss_device *dssdev = &ddata->dssdev;
...@@ -233,8 +233,6 @@ static int __exit tvc_remove(struct platform_device *pdev) ...@@ -233,8 +233,6 @@ static int __exit tvc_remove(struct platform_device *pdev)
tvc_disconnect(dssdev); tvc_disconnect(dssdev);
omap_dss_put_device(in); omap_dss_put_device(in);
return 0;
} }
static const struct of_device_id tvc_of_match[] = { static const struct of_device_id tvc_of_match[] = {
...@@ -247,11 +245,10 @@ MODULE_DEVICE_TABLE(of, tvc_of_match); ...@@ -247,11 +245,10 @@ MODULE_DEVICE_TABLE(of, tvc_of_match);
static struct platform_driver tvc_connector_driver = { static struct platform_driver tvc_connector_driver = {
.probe = tvc_probe, .probe = tvc_probe,
.remove = __exit_p(tvc_remove), .remove_new = tvc_remove,
.driver = { .driver = {
.name = "connector-analog-tv", .name = "connector-analog-tv",
.of_match_table = tvc_of_match, .of_match_table = tvc_of_match,
.suppress_bind_attrs = true,
}, },
}; };
......
...@@ -303,7 +303,7 @@ static int dvic_probe(struct platform_device *pdev) ...@@ -303,7 +303,7 @@ static int dvic_probe(struct platform_device *pdev)
return r; return r;
} }
static int __exit dvic_remove(struct platform_device *pdev) static void dvic_remove(struct platform_device *pdev)
{ {
struct panel_drv_data *ddata = platform_get_drvdata(pdev); struct panel_drv_data *ddata = platform_get_drvdata(pdev);
struct omap_dss_device *dssdev = &ddata->dssdev; struct omap_dss_device *dssdev = &ddata->dssdev;
...@@ -317,8 +317,6 @@ static int __exit dvic_remove(struct platform_device *pdev) ...@@ -317,8 +317,6 @@ static int __exit dvic_remove(struct platform_device *pdev)
omap_dss_put_device(in); omap_dss_put_device(in);
i2c_put_adapter(ddata->i2c_adapter); i2c_put_adapter(ddata->i2c_adapter);
return 0;
} }
static const struct of_device_id dvic_of_match[] = { static const struct of_device_id dvic_of_match[] = {
...@@ -330,11 +328,10 @@ MODULE_DEVICE_TABLE(of, dvic_of_match); ...@@ -330,11 +328,10 @@ MODULE_DEVICE_TABLE(of, dvic_of_match);
static struct platform_driver dvi_connector_driver = { static struct platform_driver dvi_connector_driver = {
.probe = dvic_probe, .probe = dvic_probe,
.remove = __exit_p(dvic_remove), .remove_new = dvic_remove,
.driver = { .driver = {
.name = "connector-dvi", .name = "connector-dvi",
.of_match_table = dvic_of_match, .of_match_table = dvic_of_match,
.suppress_bind_attrs = true,
}, },
}; };
......
...@@ -249,7 +249,7 @@ static int hdmic_probe(struct platform_device *pdev) ...@@ -249,7 +249,7 @@ static int hdmic_probe(struct platform_device *pdev)
return r; return r;
} }
static int __exit hdmic_remove(struct platform_device *pdev) static void hdmic_remove(struct platform_device *pdev)
{ {
struct panel_drv_data *ddata = platform_get_drvdata(pdev); struct panel_drv_data *ddata = platform_get_drvdata(pdev);
struct omap_dss_device *dssdev = &ddata->dssdev; struct omap_dss_device *dssdev = &ddata->dssdev;
...@@ -261,8 +261,6 @@ static int __exit hdmic_remove(struct platform_device *pdev) ...@@ -261,8 +261,6 @@ static int __exit hdmic_remove(struct platform_device *pdev)
hdmic_disconnect(dssdev); hdmic_disconnect(dssdev);
omap_dss_put_device(in); omap_dss_put_device(in);
return 0;
} }
static const struct of_device_id hdmic_of_match[] = { static const struct of_device_id hdmic_of_match[] = {
...@@ -274,11 +272,10 @@ MODULE_DEVICE_TABLE(of, hdmic_of_match); ...@@ -274,11 +272,10 @@ MODULE_DEVICE_TABLE(of, hdmic_of_match);
static struct platform_driver hdmi_connector_driver = { static struct platform_driver hdmi_connector_driver = {
.probe = hdmic_probe, .probe = hdmic_probe,
.remove = __exit_p(hdmic_remove), .remove_new = hdmic_remove,
.driver = { .driver = {
.name = "connector-hdmi", .name = "connector-hdmi",
.of_match_table = hdmic_of_match, .of_match_table = hdmic_of_match,
.suppress_bind_attrs = true,
}, },
}; };
......
...@@ -231,7 +231,7 @@ static int opa362_probe(struct platform_device *pdev) ...@@ -231,7 +231,7 @@ static int opa362_probe(struct platform_device *pdev)
return r; return r;
} }
static int __exit opa362_remove(struct platform_device *pdev) static void opa362_remove(struct platform_device *pdev)
{ {
struct panel_drv_data *ddata = platform_get_drvdata(pdev); struct panel_drv_data *ddata = platform_get_drvdata(pdev);
struct omap_dss_device *dssdev = &ddata->dssdev; struct omap_dss_device *dssdev = &ddata->dssdev;
...@@ -248,8 +248,6 @@ static int __exit opa362_remove(struct platform_device *pdev) ...@@ -248,8 +248,6 @@ static int __exit opa362_remove(struct platform_device *pdev)
opa362_disconnect(dssdev, dssdev->dst); opa362_disconnect(dssdev, dssdev->dst);
omap_dss_put_device(in); omap_dss_put_device(in);
return 0;
} }
static const struct of_device_id opa362_of_match[] = { static const struct of_device_id opa362_of_match[] = {
...@@ -260,11 +258,10 @@ MODULE_DEVICE_TABLE(of, opa362_of_match); ...@@ -260,11 +258,10 @@ MODULE_DEVICE_TABLE(of, opa362_of_match);
static struct platform_driver opa362_driver = { static struct platform_driver opa362_driver = {
.probe = opa362_probe, .probe = opa362_probe,
.remove = __exit_p(opa362_remove), .remove_new = opa362_remove,
.driver = { .driver = {
.name = "amplifier-opa362", .name = "amplifier-opa362",
.of_match_table = opa362_of_match, .of_match_table = opa362_of_match,
.suppress_bind_attrs = true,
}, },
}; };
......
...@@ -217,7 +217,7 @@ static int tfp410_probe(struct platform_device *pdev) ...@@ -217,7 +217,7 @@ static int tfp410_probe(struct platform_device *pdev)
return r; return r;
} }
static int __exit tfp410_remove(struct platform_device *pdev) static void tfp410_remove(struct platform_device *pdev)
{ {
struct panel_drv_data *ddata = platform_get_drvdata(pdev); struct panel_drv_data *ddata = platform_get_drvdata(pdev);
struct omap_dss_device *dssdev = &ddata->dssdev; struct omap_dss_device *dssdev = &ddata->dssdev;
...@@ -234,8 +234,6 @@ static int __exit tfp410_remove(struct platform_device *pdev) ...@@ -234,8 +234,6 @@ static int __exit tfp410_remove(struct platform_device *pdev)
tfp410_disconnect(dssdev, dssdev->dst); tfp410_disconnect(dssdev, dssdev->dst);
omap_dss_put_device(in); omap_dss_put_device(in);
return 0;
} }
static const struct of_device_id tfp410_of_match[] = { static const struct of_device_id tfp410_of_match[] = {
...@@ -247,11 +245,10 @@ MODULE_DEVICE_TABLE(of, tfp410_of_match); ...@@ -247,11 +245,10 @@ MODULE_DEVICE_TABLE(of, tfp410_of_match);
static struct platform_driver tfp410_driver = { static struct platform_driver tfp410_driver = {
.probe = tfp410_probe, .probe = tfp410_probe,
.remove = __exit_p(tfp410_remove), .remove_new = tfp410_remove,
.driver = { .driver = {
.name = "tfp410", .name = "tfp410",
.of_match_table = tfp410_of_match, .of_match_table = tfp410_of_match,
.suppress_bind_attrs = true,
}, },
}; };
......
...@@ -283,7 +283,7 @@ static int tpd_probe(struct platform_device *pdev) ...@@ -283,7 +283,7 @@ static int tpd_probe(struct platform_device *pdev)
return r; return r;
} }
static int __exit tpd_remove(struct platform_device *pdev) static void tpd_remove(struct platform_device *pdev)
{ {
struct panel_drv_data *ddata = platform_get_drvdata(pdev); struct panel_drv_data *ddata = platform_get_drvdata(pdev);
struct omap_dss_device *dssdev = &ddata->dssdev; struct omap_dss_device *dssdev = &ddata->dssdev;
...@@ -300,8 +300,6 @@ static int __exit tpd_remove(struct platform_device *pdev) ...@@ -300,8 +300,6 @@ static int __exit tpd_remove(struct platform_device *pdev)
tpd_disconnect(dssdev, dssdev->dst); tpd_disconnect(dssdev, dssdev->dst);
omap_dss_put_device(in); omap_dss_put_device(in);
return 0;
} }
static const struct of_device_id tpd_of_match[] = { static const struct of_device_id tpd_of_match[] = {
...@@ -313,11 +311,10 @@ MODULE_DEVICE_TABLE(of, tpd_of_match); ...@@ -313,11 +311,10 @@ MODULE_DEVICE_TABLE(of, tpd_of_match);
static struct platform_driver tpd_driver = { static struct platform_driver tpd_driver = {
.probe = tpd_probe, .probe = tpd_probe,
.remove = __exit_p(tpd_remove), .remove_new = tpd_remove,
.driver = { .driver = {
.name = "tpd12s015", .name = "tpd12s015",
.of_match_table = tpd_of_match, .of_match_table = tpd_of_match,
.suppress_bind_attrs = true,
}, },
}; };
......
...@@ -211,7 +211,7 @@ static int panel_dpi_probe(struct platform_device *pdev) ...@@ -211,7 +211,7 @@ static int panel_dpi_probe(struct platform_device *pdev)
return r; return r;
} }
static int __exit panel_dpi_remove(struct platform_device *pdev) static void panel_dpi_remove(struct platform_device *pdev)
{ {
struct panel_drv_data *ddata = platform_get_drvdata(pdev); struct panel_drv_data *ddata = platform_get_drvdata(pdev);
struct omap_dss_device *dssdev = &ddata->dssdev; struct omap_dss_device *dssdev = &ddata->dssdev;
...@@ -223,8 +223,6 @@ static int __exit panel_dpi_remove(struct platform_device *pdev) ...@@ -223,8 +223,6 @@ static int __exit panel_dpi_remove(struct platform_device *pdev)
panel_dpi_disconnect(dssdev); panel_dpi_disconnect(dssdev);
omap_dss_put_device(in); omap_dss_put_device(in);
return 0;
} }
static const struct of_device_id panel_dpi_of_match[] = { static const struct of_device_id panel_dpi_of_match[] = {
...@@ -236,11 +234,10 @@ MODULE_DEVICE_TABLE(of, panel_dpi_of_match); ...@@ -236,11 +234,10 @@ MODULE_DEVICE_TABLE(of, panel_dpi_of_match);
static struct platform_driver panel_dpi_driver = { static struct platform_driver panel_dpi_driver = {
.probe = panel_dpi_probe, .probe = panel_dpi_probe,
.remove = __exit_p(panel_dpi_remove), .remove_new = panel_dpi_remove,
.driver = { .driver = {
.name = "panel-dpi", .name = "panel-dpi",
.of_match_table = panel_dpi_of_match, .of_match_table = panel_dpi_of_match,
.suppress_bind_attrs = true,
}, },
}; };
......
...@@ -1241,7 +1241,7 @@ static int dsicm_probe(struct platform_device *pdev) ...@@ -1241,7 +1241,7 @@ static int dsicm_probe(struct platform_device *pdev)
return r; return r;
} }
static int __exit dsicm_remove(struct platform_device *pdev) static void dsicm_remove(struct platform_device *pdev)
{ {
struct panel_drv_data *ddata = platform_get_drvdata(pdev); struct panel_drv_data *ddata = platform_get_drvdata(pdev);
struct omap_dss_device *dssdev = &ddata->dssdev; struct omap_dss_device *dssdev = &ddata->dssdev;
...@@ -1269,8 +1269,6 @@ static int __exit dsicm_remove(struct platform_device *pdev) ...@@ -1269,8 +1269,6 @@ static int __exit dsicm_remove(struct platform_device *pdev)
/* reset, to be sure that the panel is in a valid state */ /* reset, to be sure that the panel is in a valid state */
dsicm_hw_reset(ddata); dsicm_hw_reset(ddata);
return 0;
} }
static const struct of_device_id dsicm_of_match[] = { static const struct of_device_id dsicm_of_match[] = {
...@@ -1282,11 +1280,10 @@ MODULE_DEVICE_TABLE(of, dsicm_of_match); ...@@ -1282,11 +1280,10 @@ MODULE_DEVICE_TABLE(of, dsicm_of_match);
static struct platform_driver dsicm_driver = { static struct platform_driver dsicm_driver = {
.probe = dsicm_probe, .probe = dsicm_probe,
.remove = __exit_p(dsicm_remove), .remove_new = dsicm_remove,
.driver = { .driver = {
.name = "panel-dsi-cm", .name = "panel-dsi-cm",
.of_match_table = dsicm_of_match, .of_match_table = dsicm_of_match,
.suppress_bind_attrs = true,
}, },
}; };
......
...@@ -292,7 +292,7 @@ static int sharp_ls_probe(struct platform_device *pdev) ...@@ -292,7 +292,7 @@ static int sharp_ls_probe(struct platform_device *pdev)
return r; return r;
} }
static int __exit sharp_ls_remove(struct platform_device *pdev) static void sharp_ls_remove(struct platform_device *pdev)
{ {
struct panel_drv_data *ddata = platform_get_drvdata(pdev); struct panel_drv_data *ddata = platform_get_drvdata(pdev);
struct omap_dss_device *dssdev = &ddata->dssdev; struct omap_dss_device *dssdev = &ddata->dssdev;
...@@ -304,8 +304,6 @@ static int __exit sharp_ls_remove(struct platform_device *pdev) ...@@ -304,8 +304,6 @@ static int __exit sharp_ls_remove(struct platform_device *pdev)
sharp_ls_disconnect(dssdev); sharp_ls_disconnect(dssdev);
omap_dss_put_device(in); omap_dss_put_device(in);
return 0;
} }
static const struct of_device_id sharp_ls_of_match[] = { static const struct of_device_id sharp_ls_of_match[] = {
...@@ -317,11 +315,10 @@ MODULE_DEVICE_TABLE(of, sharp_ls_of_match); ...@@ -317,11 +315,10 @@ MODULE_DEVICE_TABLE(of, sharp_ls_of_match);
static struct platform_driver sharp_ls_driver = { static struct platform_driver sharp_ls_driver = {
.probe = sharp_ls_probe, .probe = sharp_ls_probe,
.remove = __exit_p(sharp_ls_remove), .remove_new = sharp_ls_remove,
.driver = { .driver = {
.name = "panel-sharp-ls037v7dw01", .name = "panel-sharp-ls037v7dw01",
.of_match_table = sharp_ls_of_match, .of_match_table = sharp_ls_of_match,
.suppress_bind_attrs = true,
}, },
}; };
......
...@@ -368,17 +368,10 @@ static int __init vrfb_probe(struct platform_device *pdev) ...@@ -368,17 +368,10 @@ static int __init vrfb_probe(struct platform_device *pdev)
return 0; return 0;
} }
static void __exit vrfb_remove(struct platform_device *pdev)
{
vrfb_loaded = false;
}
static struct platform_driver vrfb_driver = { static struct platform_driver vrfb_driver = {
.driver.name = "omapvrfb", .driver.name = "omapvrfb",
.remove = __exit_p(vrfb_remove),
}; };
builtin_platform_driver_probe(vrfb_driver, vrfb_probe);
module_platform_driver_probe(vrfb_driver, vrfb_probe);
MODULE_AUTHOR("Tomi Valkeinen <tomi.valkeinen@ti.com>"); MODULE_AUTHOR("Tomi Valkeinen <tomi.valkeinen@ti.com>");
MODULE_DESCRIPTION("OMAP VRFB"); MODULE_DESCRIPTION("OMAP VRFB");
......
...@@ -574,7 +574,7 @@ static int viafb_ioctl(struct fb_info *info, u_int cmd, u_long arg) ...@@ -574,7 +574,7 @@ static int viafb_ioctl(struct fb_info *info, u_int cmd, u_long arg)
break; break;
case VIAFB_SET_GAMMA_LUT: case VIAFB_SET_GAMMA_LUT:
viafb_gamma_table = memdup_user(argp, 256 * sizeof(u32)); viafb_gamma_table = memdup_array_user(argp, 256, sizeof(u32));
if (IS_ERR(viafb_gamma_table)) if (IS_ERR(viafb_gamma_table))
return PTR_ERR(viafb_gamma_table); return PTR_ERR(viafb_gamma_table);
viafb_set_gamma_table(viafb_bpp, viafb_gamma_table); viafb_set_gamma_table(viafb_bpp, viafb_gamma_table);
......
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