Commit e21d2170 authored by Jingoo Han's avatar Jingoo Han Committed by Tomi Valkeinen

video: remove unnecessary platform_set_drvdata()

The driver core clears the driver data to NULL after device_release
or on probe failure, since commit 0998d063
(device-core: Ensure drvdata = NULL when no driver is bound).
Thus, it is not needed to manually clear the device driver data to NULL.
Signed-off-by: default avatarJingoo Han <jg1.han@samsung.com>
Cc: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
Acked-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: default avatarShawn Guo <shawn.guo@linaro.org>
Reviewed-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
parent 12b23d5f
......@@ -579,7 +579,6 @@ static int au1100fb_drv_probe(struct platform_device *dev)
if (fbdev->info.cmap.len != 0) {
fb_dealloc_cmap(&fbdev->info.cmap);
}
platform_set_drvdata(dev, NULL);
return -ENODEV;
}
......
......@@ -681,7 +681,6 @@ static int bfin_bf54x_probe(struct platform_device *pdev)
out2:
free_dma(CH_EPPI0);
out1:
platform_set_drvdata(pdev, NULL);
return ret;
}
......
......@@ -759,7 +759,6 @@ static int bfin_lq035q1_probe(struct platform_device *pdev)
out2:
free_dma(CH_PPI);
out1:
platform_set_drvdata(pdev, NULL);
return ret;
}
......@@ -788,7 +787,6 @@ static int bfin_lq035q1_remove(struct platform_device *pdev)
bfin_lq035q1_free_ports(info->disp_info->ppi_mode ==
USE_RGB565_16_BIT_PPI);
platform_set_drvdata(pdev, NULL);
framebuffer_release(fbinfo);
dev_info(&pdev->dev, "unregistered LCD driver\n");
......
......@@ -578,7 +578,6 @@ static int bfin_t350mcqb_probe(struct platform_device *pdev)
out2:
free_dma(CH_PPI);
out1:
platform_set_drvdata(pdev, NULL);
return ret;
}
......@@ -608,7 +607,6 @@ static int bfin_t350mcqb_remove(struct platform_device *pdev)
bfin_t350mcqb_request_ports(0);
platform_set_drvdata(pdev, NULL);
framebuffer_release(fbinfo);
printk(KERN_INFO DRIVER_NAME ": Unregister LCD driver.\n");
......
......@@ -595,7 +595,6 @@ static int ep93xxfb_probe(struct platform_device *pdev)
fb_dealloc_cmap(&info->cmap);
failed_cmap:
kfree(info);
platform_set_drvdata(pdev, NULL);
return err;
}
......@@ -614,7 +613,6 @@ static int ep93xxfb_remove(struct platform_device *pdev)
fbi->mach_info->teardown(pdev);
kfree(info);
platform_set_drvdata(pdev, NULL);
return 0;
}
......
......@@ -923,7 +923,6 @@ static int __init imxfb_probe(struct platform_device *pdev)
failed_req:
kfree(info->pseudo_palette);
failed_init:
platform_set_drvdata(pdev, NULL);
framebuffer_release(info);
return ret;
}
......@@ -955,8 +954,6 @@ static int imxfb_remove(struct platform_device *pdev)
iounmap(fbi->regs);
release_mem_region(res->start, resource_size(res));
platform_set_drvdata(pdev, NULL);
return 0;
}
......
......@@ -737,8 +737,6 @@ static int jzfb_remove(struct platform_device *pdev)
fb_dealloc_cmap(&jzfb->fb->cmap);
jzfb_free_devmem(jzfb);
platform_set_drvdata(pdev, NULL);
framebuffer_release(jzfb->fb);
return 0;
......
......@@ -659,7 +659,6 @@ static int mmpfb_probe(struct platform_device *pdev)
mutex_destroy(&fbi->access_ok);
failed:
dev_err(fbi->dev, "mmp-fb: frame buffer device init failed\n");
platform_set_drvdata(pdev, NULL);
framebuffer_release(info);
......
......@@ -566,7 +566,6 @@ static int mmphw_probe(struct platform_device *pdev)
devm_kfree(ctrl->dev, ctrl);
}
platform_set_drvdata(pdev, NULL);
dev_err(&pdev->dev, "device init failed\n");
return ret;
......
......@@ -985,8 +985,6 @@ static int mxsfb_remove(struct platform_device *pdev)
framebuffer_release(fb_info);
platform_set_drvdata(pdev, NULL);
return 0;
}
......
......@@ -707,7 +707,6 @@ static int nuc900fb_remove(struct platform_device *pdev)
release_resource(fbi->mem);
kfree(fbi->mem);
platform_set_drvdata(pdev, NULL);
framebuffer_release(fbinfo);
return 0;
......
......@@ -711,7 +711,6 @@ static int pxa3xx_gcu_probe(struct platform_device *dev)
misc_deregister(&priv->misc_dev);
err_free_priv:
platform_set_drvdata(dev, NULL);
free_buffers(dev, priv);
kfree(priv);
return ret;
......@@ -729,7 +728,6 @@ static int pxa3xx_gcu_remove(struct platform_device *dev)
priv->shared, priv->shared_phys);
iounmap(priv->mmio_base);
release_mem_region(r->start, resource_size(r));
platform_set_drvdata(dev, NULL);
clk_disable(priv->clk);
free_buffers(dev, priv);
kfree(priv);
......
......@@ -2256,7 +2256,6 @@ static int pxafb_probe(struct platform_device *dev)
release_mem_region(r->start, resource_size(r));
failed_fbi:
clk_put(fbi->clk);
platform_set_drvdata(dev, NULL);
kfree(fbi);
failed:
return ret;
......
......@@ -1005,7 +1005,6 @@ static int s3c24xxfb_probe(struct platform_device *pdev,
release_mem:
release_mem_region(res->start, size);
dealloc_fb:
platform_set_drvdata(pdev, NULL);
framebuffer_release(fbinfo);
return ret;
}
......@@ -1051,7 +1050,6 @@ static int s3c2410fb_remove(struct platform_device *pdev)
release_mem_region(info->mem->start, resource_size(info->mem));
platform_set_drvdata(pdev, NULL);
framebuffer_release(fbinfo);
return 0;
......
......@@ -1271,7 +1271,6 @@ static int sa1100fb_probe(struct platform_device *pdev)
failed:
if (fbi)
iounmap(fbi->base);
platform_set_drvdata(pdev, NULL);
kfree(fbi);
release_mem_region(res->start, resource_size(res));
return ret;
......
......@@ -571,7 +571,6 @@ static int sh7760fb_remove(struct platform_device *dev)
iounmap(par->base);
release_mem_region(par->ioarea->start, resource_size(par->ioarea));
framebuffer_release(info);
platform_set_drvdata(dev, NULL);
return 0;
}
......
......@@ -567,7 +567,6 @@ static int sh_mipi_remove(struct platform_device *pdev)
iounmap(mipi->base);
if (res)
release_mem_region(res->start, resource_size(res));
platform_set_drvdata(pdev, NULL);
kfree(mipi);
return 0;
......
......@@ -794,7 +794,6 @@ static int tmiofb_probe(struct platform_device *dev)
cell->disable(dev);
err_enable:
err_find_mode:
platform_set_drvdata(dev, NULL);
free_irq(irq, info);
err_request_irq:
iounmap(info->screen_base);
......@@ -823,8 +822,6 @@ static int tmiofb_remove(struct platform_device *dev)
if (cell->disable)
cell->disable(dev);
platform_set_drvdata(dev, NULL);
free_irq(irq, info);
iounmap(info->screen_base);
......
......@@ -1269,7 +1269,6 @@ static void vga16fb_destroy(struct fb_info *info)
iounmap(info->screen_base);
fb_dealloc_cmap(&info->cmap);
/* XXX unshare VGA regions */
platform_set_drvdata(dev, NULL);
framebuffer_release(info);
}
......
......@@ -448,7 +448,6 @@ static int vt8500lcd_probe(struct platform_device *pdev)
failed_free_res:
release_mem_region(res->start, resource_size(res));
failed_fbi:
platform_set_drvdata(pdev, NULL);
kfree(fbi);
failed:
return ret;
......
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