video: remove unnecessary platform_set_drvdata()

The driver core clears the driver data to NULL after device_release
or on probe failure, since commit 0998d06310
(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: Jingoo Han <jg1.han@samsung.com>
Cc: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
This commit is contained in:
Jingoo Han 2013-06-25 10:56:07 +09:00 коммит произвёл Tomi Valkeinen
Родитель 12b23d5ffa
Коммит e21d2170f3
20 изменённых файлов: 0 добавлений и 31 удалений

Просмотреть файл

@ -579,7 +579,6 @@ failed:
if (fbdev->info.cmap.len != 0) { if (fbdev->info.cmap.len != 0) {
fb_dealloc_cmap(&fbdev->info.cmap); fb_dealloc_cmap(&fbdev->info.cmap);
} }
platform_set_drvdata(dev, NULL);
return -ENODEV; return -ENODEV;
} }

Просмотреть файл

@ -681,7 +681,6 @@ out3:
out2: out2:
free_dma(CH_EPPI0); free_dma(CH_EPPI0);
out1: out1:
platform_set_drvdata(pdev, NULL);
return ret; return ret;
} }

Просмотреть файл

@ -759,7 +759,6 @@ static int bfin_lq035q1_probe(struct platform_device *pdev)
out2: out2:
free_dma(CH_PPI); free_dma(CH_PPI);
out1: out1:
platform_set_drvdata(pdev, NULL);
return ret; return ret;
} }
@ -788,7 +787,6 @@ static int bfin_lq035q1_remove(struct platform_device *pdev)
bfin_lq035q1_free_ports(info->disp_info->ppi_mode == bfin_lq035q1_free_ports(info->disp_info->ppi_mode ==
USE_RGB565_16_BIT_PPI); USE_RGB565_16_BIT_PPI);
platform_set_drvdata(pdev, NULL);
framebuffer_release(fbinfo); framebuffer_release(fbinfo);
dev_info(&pdev->dev, "unregistered LCD driver\n"); dev_info(&pdev->dev, "unregistered LCD driver\n");

Просмотреть файл

@ -578,7 +578,6 @@ out3:
out2: out2:
free_dma(CH_PPI); free_dma(CH_PPI);
out1: out1:
platform_set_drvdata(pdev, NULL);
return ret; return ret;
} }
@ -608,7 +607,6 @@ static int bfin_t350mcqb_remove(struct platform_device *pdev)
bfin_t350mcqb_request_ports(0); bfin_t350mcqb_request_ports(0);
platform_set_drvdata(pdev, NULL);
framebuffer_release(fbinfo); framebuffer_release(fbinfo);
printk(KERN_INFO DRIVER_NAME ": Unregister LCD driver.\n"); printk(KERN_INFO DRIVER_NAME ": Unregister LCD driver.\n");

Просмотреть файл

@ -595,7 +595,6 @@ failed_videomem:
fb_dealloc_cmap(&info->cmap); fb_dealloc_cmap(&info->cmap);
failed_cmap: failed_cmap:
kfree(info); kfree(info);
platform_set_drvdata(pdev, NULL);
return err; return err;
} }
@ -614,7 +613,6 @@ static int ep93xxfb_remove(struct platform_device *pdev)
fbi->mach_info->teardown(pdev); fbi->mach_info->teardown(pdev);
kfree(info); kfree(info);
platform_set_drvdata(pdev, NULL);
return 0; return 0;
} }

Просмотреть файл

@ -923,7 +923,6 @@ failed_getclock:
failed_req: failed_req:
kfree(info->pseudo_palette); kfree(info->pseudo_palette);
failed_init: failed_init:
platform_set_drvdata(pdev, NULL);
framebuffer_release(info); framebuffer_release(info);
return ret; return ret;
} }
@ -955,8 +954,6 @@ static int imxfb_remove(struct platform_device *pdev)
iounmap(fbi->regs); iounmap(fbi->regs);
release_mem_region(res->start, resource_size(res)); release_mem_region(res->start, resource_size(res));
platform_set_drvdata(pdev, NULL);
return 0; return 0;
} }

Просмотреть файл

@ -737,8 +737,6 @@ static int jzfb_remove(struct platform_device *pdev)
fb_dealloc_cmap(&jzfb->fb->cmap); fb_dealloc_cmap(&jzfb->fb->cmap);
jzfb_free_devmem(jzfb); jzfb_free_devmem(jzfb);
platform_set_drvdata(pdev, NULL);
framebuffer_release(jzfb->fb); framebuffer_release(jzfb->fb);
return 0; return 0;

Просмотреть файл

@ -659,7 +659,6 @@ failed_destroy_mutex:
mutex_destroy(&fbi->access_ok); mutex_destroy(&fbi->access_ok);
failed: failed:
dev_err(fbi->dev, "mmp-fb: frame buffer device init failed\n"); dev_err(fbi->dev, "mmp-fb: frame buffer device init failed\n");
platform_set_drvdata(pdev, NULL);
framebuffer_release(info); framebuffer_release(info);

Просмотреть файл

@ -566,7 +566,6 @@ failed:
devm_kfree(ctrl->dev, ctrl); devm_kfree(ctrl->dev, ctrl);
} }
platform_set_drvdata(pdev, NULL);
dev_err(&pdev->dev, "device init failed\n"); dev_err(&pdev->dev, "device init failed\n");
return ret; return ret;

Просмотреть файл

@ -985,8 +985,6 @@ static int mxsfb_remove(struct platform_device *pdev)
framebuffer_release(fb_info); framebuffer_release(fb_info);
platform_set_drvdata(pdev, NULL);
return 0; return 0;
} }

Просмотреть файл

@ -707,7 +707,6 @@ static int nuc900fb_remove(struct platform_device *pdev)
release_resource(fbi->mem); release_resource(fbi->mem);
kfree(fbi->mem); kfree(fbi->mem);
platform_set_drvdata(pdev, NULL);
framebuffer_release(fbinfo); framebuffer_release(fbinfo);
return 0; return 0;

Просмотреть файл

@ -711,7 +711,6 @@ err_misc_deregister:
misc_deregister(&priv->misc_dev); misc_deregister(&priv->misc_dev);
err_free_priv: err_free_priv:
platform_set_drvdata(dev, NULL);
free_buffers(dev, priv); free_buffers(dev, priv);
kfree(priv); kfree(priv);
return ret; return ret;
@ -729,7 +728,6 @@ static int pxa3xx_gcu_remove(struct platform_device *dev)
priv->shared, priv->shared_phys); priv->shared, priv->shared_phys);
iounmap(priv->mmio_base); iounmap(priv->mmio_base);
release_mem_region(r->start, resource_size(r)); release_mem_region(r->start, resource_size(r));
platform_set_drvdata(dev, NULL);
clk_disable(priv->clk); clk_disable(priv->clk);
free_buffers(dev, priv); free_buffers(dev, priv);
kfree(priv); kfree(priv);

Просмотреть файл

@ -2256,7 +2256,6 @@ failed_free_res:
release_mem_region(r->start, resource_size(r)); release_mem_region(r->start, resource_size(r));
failed_fbi: failed_fbi:
clk_put(fbi->clk); clk_put(fbi->clk);
platform_set_drvdata(dev, NULL);
kfree(fbi); kfree(fbi);
failed: failed:
return ret; return ret;

Просмотреть файл

@ -1005,7 +1005,6 @@ release_regs:
release_mem: release_mem:
release_mem_region(res->start, size); release_mem_region(res->start, size);
dealloc_fb: dealloc_fb:
platform_set_drvdata(pdev, NULL);
framebuffer_release(fbinfo); framebuffer_release(fbinfo);
return ret; return ret;
} }
@ -1051,7 +1050,6 @@ static int s3c2410fb_remove(struct platform_device *pdev)
release_mem_region(info->mem->start, resource_size(info->mem)); release_mem_region(info->mem->start, resource_size(info->mem));
platform_set_drvdata(pdev, NULL);
framebuffer_release(fbinfo); framebuffer_release(fbinfo);
return 0; return 0;

Просмотреть файл

@ -1271,7 +1271,6 @@ static int sa1100fb_probe(struct platform_device *pdev)
failed: failed:
if (fbi) if (fbi)
iounmap(fbi->base); iounmap(fbi->base);
platform_set_drvdata(pdev, NULL);
kfree(fbi); kfree(fbi);
release_mem_region(res->start, resource_size(res)); release_mem_region(res->start, resource_size(res));
return ret; return ret;

Просмотреть файл

@ -571,7 +571,6 @@ static int sh7760fb_remove(struct platform_device *dev)
iounmap(par->base); iounmap(par->base);
release_mem_region(par->ioarea->start, resource_size(par->ioarea)); release_mem_region(par->ioarea->start, resource_size(par->ioarea));
framebuffer_release(info); framebuffer_release(info);
platform_set_drvdata(dev, NULL);
return 0; return 0;
} }

Просмотреть файл

@ -567,7 +567,6 @@ static int sh_mipi_remove(struct platform_device *pdev)
iounmap(mipi->base); iounmap(mipi->base);
if (res) if (res)
release_mem_region(res->start, resource_size(res)); release_mem_region(res->start, resource_size(res));
platform_set_drvdata(pdev, NULL);
kfree(mipi); kfree(mipi);
return 0; return 0;

Просмотреть файл

@ -794,7 +794,6 @@ err_hw_init:
cell->disable(dev); cell->disable(dev);
err_enable: err_enable:
err_find_mode: err_find_mode:
platform_set_drvdata(dev, NULL);
free_irq(irq, info); free_irq(irq, info);
err_request_irq: err_request_irq:
iounmap(info->screen_base); iounmap(info->screen_base);
@ -823,8 +822,6 @@ static int tmiofb_remove(struct platform_device *dev)
if (cell->disable) if (cell->disable)
cell->disable(dev); cell->disable(dev);
platform_set_drvdata(dev, NULL);
free_irq(irq, info); free_irq(irq, info);
iounmap(info->screen_base); iounmap(info->screen_base);

Просмотреть файл

@ -1269,7 +1269,6 @@ static void vga16fb_destroy(struct fb_info *info)
iounmap(info->screen_base); iounmap(info->screen_base);
fb_dealloc_cmap(&info->cmap); fb_dealloc_cmap(&info->cmap);
/* XXX unshare VGA regions */ /* XXX unshare VGA regions */
platform_set_drvdata(dev, NULL);
framebuffer_release(info); framebuffer_release(info);
} }

Просмотреть файл

@ -448,7 +448,6 @@ failed_free_io:
failed_free_res: failed_free_res:
release_mem_region(res->start, resource_size(res)); release_mem_region(res->start, resource_size(res));
failed_fbi: failed_fbi:
platform_set_drvdata(pdev, NULL);
kfree(fbi); kfree(fbi);
failed: failed:
return ret; return ret;