diff options
author | Jingoo Han <jg1.han@samsung.com> | 2013-06-24 21:56:07 -0400 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2013-06-26 07:44:40 -0400 |
commit | e21d2170f36602ae2708597aabfbdf54c6144d3e (patch) | |
tree | f65adf5993f5d9b5cc36ea7a7c60a7fd510b934a /drivers | |
parent | 12b23d5ffafcc27291f518608367ab4a7a0dd026 (diff) |
video: remove unnecessary platform_set_drvdata()
The driver core clears the driver data to NULL after device_release
or on probe failure, since commit 0998d0631001288a5974afc0b2a5f568bcdecb4d
(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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/video/au1100fb.c | 1 | ||||
-rw-r--r-- | drivers/video/bf54x-lq043fb.c | 1 | ||||
-rw-r--r-- | drivers/video/bfin-lq035q1-fb.c | 2 | ||||
-rw-r--r-- | drivers/video/bfin-t350mcqb-fb.c | 2 | ||||
-rw-r--r-- | drivers/video/ep93xx-fb.c | 2 | ||||
-rw-r--r-- | drivers/video/imxfb.c | 3 | ||||
-rw-r--r-- | drivers/video/jz4740_fb.c | 2 | ||||
-rw-r--r-- | drivers/video/mmp/fb/mmpfb.c | 1 | ||||
-rw-r--r-- | drivers/video/mmp/hw/mmp_ctrl.c | 1 | ||||
-rw-r--r-- | drivers/video/mxsfb.c | 2 | ||||
-rw-r--r-- | drivers/video/nuc900fb.c | 1 | ||||
-rw-r--r-- | drivers/video/pxa3xx-gcu.c | 2 | ||||
-rw-r--r-- | drivers/video/pxafb.c | 1 | ||||
-rw-r--r-- | drivers/video/s3c2410fb.c | 2 | ||||
-rw-r--r-- | drivers/video/sa1100fb.c | 1 | ||||
-rw-r--r-- | drivers/video/sh7760fb.c | 1 | ||||
-rw-r--r-- | drivers/video/sh_mipi_dsi.c | 1 | ||||
-rw-r--r-- | drivers/video/tmiofb.c | 3 | ||||
-rw-r--r-- | drivers/video/vga16fb.c | 1 | ||||
-rw-r--r-- | drivers/video/vt8500lcdfb.c | 1 |
20 files changed, 0 insertions, 31 deletions
diff --git a/drivers/video/au1100fb.c b/drivers/video/au1100fb.c index 700cac067b46..606a3babe792 100644 --- a/drivers/video/au1100fb.c +++ b/drivers/video/au1100fb.c | |||
@@ -579,7 +579,6 @@ failed: | |||
579 | if (fbdev->info.cmap.len != 0) { | 579 | if (fbdev->info.cmap.len != 0) { |
580 | fb_dealloc_cmap(&fbdev->info.cmap); | 580 | fb_dealloc_cmap(&fbdev->info.cmap); |
581 | } | 581 | } |
582 | platform_set_drvdata(dev, NULL); | ||
583 | 582 | ||
584 | return -ENODEV; | 583 | return -ENODEV; |
585 | } | 584 | } |
diff --git a/drivers/video/bf54x-lq043fb.c b/drivers/video/bf54x-lq043fb.c index 2726a5b66741..87f288bfc58c 100644 --- a/drivers/video/bf54x-lq043fb.c +++ b/drivers/video/bf54x-lq043fb.c | |||
@@ -681,7 +681,6 @@ out3: | |||
681 | out2: | 681 | out2: |
682 | free_dma(CH_EPPI0); | 682 | free_dma(CH_EPPI0); |
683 | out1: | 683 | out1: |
684 | platform_set_drvdata(pdev, NULL); | ||
685 | 684 | ||
686 | return ret; | 685 | return ret; |
687 | } | 686 | } |
diff --git a/drivers/video/bfin-lq035q1-fb.c b/drivers/video/bfin-lq035q1-fb.c index 29d8c0443a1f..be65baec7889 100644 --- a/drivers/video/bfin-lq035q1-fb.c +++ b/drivers/video/bfin-lq035q1-fb.c | |||
@@ -759,7 +759,6 @@ static int bfin_lq035q1_probe(struct platform_device *pdev) | |||
759 | out2: | 759 | out2: |
760 | free_dma(CH_PPI); | 760 | free_dma(CH_PPI); |
761 | out1: | 761 | out1: |
762 | platform_set_drvdata(pdev, NULL); | ||
763 | 762 | ||
764 | return ret; | 763 | return ret; |
765 | } | 764 | } |
@@ -788,7 +787,6 @@ static int bfin_lq035q1_remove(struct platform_device *pdev) | |||
788 | bfin_lq035q1_free_ports(info->disp_info->ppi_mode == | 787 | bfin_lq035q1_free_ports(info->disp_info->ppi_mode == |
789 | USE_RGB565_16_BIT_PPI); | 788 | USE_RGB565_16_BIT_PPI); |
790 | 789 | ||
791 | platform_set_drvdata(pdev, NULL); | ||
792 | framebuffer_release(fbinfo); | 790 | framebuffer_release(fbinfo); |
793 | 791 | ||
794 | dev_info(&pdev->dev, "unregistered LCD driver\n"); | 792 | dev_info(&pdev->dev, "unregistered LCD driver\n"); |
diff --git a/drivers/video/bfin-t350mcqb-fb.c b/drivers/video/bfin-t350mcqb-fb.c index d46da01c31ae..48c0c4e38a62 100644 --- a/drivers/video/bfin-t350mcqb-fb.c +++ b/drivers/video/bfin-t350mcqb-fb.c | |||
@@ -578,7 +578,6 @@ out3: | |||
578 | out2: | 578 | out2: |
579 | free_dma(CH_PPI); | 579 | free_dma(CH_PPI); |
580 | out1: | 580 | out1: |
581 | platform_set_drvdata(pdev, NULL); | ||
582 | 581 | ||
583 | return ret; | 582 | return ret; |
584 | } | 583 | } |
@@ -608,7 +607,6 @@ static int bfin_t350mcqb_remove(struct platform_device *pdev) | |||
608 | 607 | ||
609 | bfin_t350mcqb_request_ports(0); | 608 | bfin_t350mcqb_request_ports(0); |
610 | 609 | ||
611 | platform_set_drvdata(pdev, NULL); | ||
612 | framebuffer_release(fbinfo); | 610 | framebuffer_release(fbinfo); |
613 | 611 | ||
614 | printk(KERN_INFO DRIVER_NAME ": Unregister LCD driver.\n"); | 612 | printk(KERN_INFO DRIVER_NAME ": Unregister LCD driver.\n"); |
diff --git a/drivers/video/ep93xx-fb.c b/drivers/video/ep93xx-fb.c index ee1ee5401544..28a837dfddd1 100644 --- a/drivers/video/ep93xx-fb.c +++ b/drivers/video/ep93xx-fb.c | |||
@@ -595,7 +595,6 @@ failed_videomem: | |||
595 | fb_dealloc_cmap(&info->cmap); | 595 | fb_dealloc_cmap(&info->cmap); |
596 | failed_cmap: | 596 | failed_cmap: |
597 | kfree(info); | 597 | kfree(info); |
598 | platform_set_drvdata(pdev, NULL); | ||
599 | 598 | ||
600 | return err; | 599 | return err; |
601 | } | 600 | } |
@@ -614,7 +613,6 @@ static int ep93xxfb_remove(struct platform_device *pdev) | |||
614 | fbi->mach_info->teardown(pdev); | 613 | fbi->mach_info->teardown(pdev); |
615 | 614 | ||
616 | kfree(info); | 615 | kfree(info); |
617 | platform_set_drvdata(pdev, NULL); | ||
618 | 616 | ||
619 | return 0; | 617 | return 0; |
620 | } | 618 | } |
diff --git a/drivers/video/imxfb.c b/drivers/video/imxfb.c index 0abf2bf20836..c1945b3590e5 100644 --- a/drivers/video/imxfb.c +++ b/drivers/video/imxfb.c | |||
@@ -923,7 +923,6 @@ failed_getclock: | |||
923 | failed_req: | 923 | failed_req: |
924 | kfree(info->pseudo_palette); | 924 | kfree(info->pseudo_palette); |
925 | failed_init: | 925 | failed_init: |
926 | platform_set_drvdata(pdev, NULL); | ||
927 | framebuffer_release(info); | 926 | framebuffer_release(info); |
928 | return ret; | 927 | return ret; |
929 | } | 928 | } |
@@ -955,8 +954,6 @@ static int imxfb_remove(struct platform_device *pdev) | |||
955 | iounmap(fbi->regs); | 954 | iounmap(fbi->regs); |
956 | release_mem_region(res->start, resource_size(res)); | 955 | release_mem_region(res->start, resource_size(res)); |
957 | 956 | ||
958 | platform_set_drvdata(pdev, NULL); | ||
959 | |||
960 | return 0; | 957 | return 0; |
961 | } | 958 | } |
962 | 959 | ||
diff --git a/drivers/video/jz4740_fb.c b/drivers/video/jz4740_fb.c index 36979b4131ab..2c49112fdd6c 100644 --- a/drivers/video/jz4740_fb.c +++ b/drivers/video/jz4740_fb.c | |||
@@ -737,8 +737,6 @@ static int jzfb_remove(struct platform_device *pdev) | |||
737 | fb_dealloc_cmap(&jzfb->fb->cmap); | 737 | fb_dealloc_cmap(&jzfb->fb->cmap); |
738 | jzfb_free_devmem(jzfb); | 738 | jzfb_free_devmem(jzfb); |
739 | 739 | ||
740 | platform_set_drvdata(pdev, NULL); | ||
741 | |||
742 | framebuffer_release(jzfb->fb); | 740 | framebuffer_release(jzfb->fb); |
743 | 741 | ||
744 | return 0; | 742 | return 0; |
diff --git a/drivers/video/mmp/fb/mmpfb.c b/drivers/video/mmp/fb/mmpfb.c index 6d1fa96c5cc3..4ab95b8daed3 100644 --- a/drivers/video/mmp/fb/mmpfb.c +++ b/drivers/video/mmp/fb/mmpfb.c | |||
@@ -659,7 +659,6 @@ failed_destroy_mutex: | |||
659 | mutex_destroy(&fbi->access_ok); | 659 | mutex_destroy(&fbi->access_ok); |
660 | failed: | 660 | failed: |
661 | dev_err(fbi->dev, "mmp-fb: frame buffer device init failed\n"); | 661 | dev_err(fbi->dev, "mmp-fb: frame buffer device init failed\n"); |
662 | platform_set_drvdata(pdev, NULL); | ||
663 | 662 | ||
664 | framebuffer_release(info); | 663 | framebuffer_release(info); |
665 | 664 | ||
diff --git a/drivers/video/mmp/hw/mmp_ctrl.c b/drivers/video/mmp/hw/mmp_ctrl.c index 4bd31b2af398..c46bf5a93d38 100644 --- a/drivers/video/mmp/hw/mmp_ctrl.c +++ b/drivers/video/mmp/hw/mmp_ctrl.c | |||
@@ -566,7 +566,6 @@ failed: | |||
566 | devm_kfree(ctrl->dev, ctrl); | 566 | devm_kfree(ctrl->dev, ctrl); |
567 | } | 567 | } |
568 | 568 | ||
569 | platform_set_drvdata(pdev, NULL); | ||
570 | dev_err(&pdev->dev, "device init failed\n"); | 569 | dev_err(&pdev->dev, "device init failed\n"); |
571 | 570 | ||
572 | return ret; | 571 | return ret; |
diff --git a/drivers/video/mxsfb.c b/drivers/video/mxsfb.c index 251bbec06693..3ba37713b1f9 100644 --- a/drivers/video/mxsfb.c +++ b/drivers/video/mxsfb.c | |||
@@ -985,8 +985,6 @@ static int mxsfb_remove(struct platform_device *pdev) | |||
985 | 985 | ||
986 | framebuffer_release(fb_info); | 986 | framebuffer_release(fb_info); |
987 | 987 | ||
988 | platform_set_drvdata(pdev, NULL); | ||
989 | |||
990 | return 0; | 988 | return 0; |
991 | } | 989 | } |
992 | 990 | ||
diff --git a/drivers/video/nuc900fb.c b/drivers/video/nuc900fb.c index 32581c72ad09..8c527e5b293c 100644 --- a/drivers/video/nuc900fb.c +++ b/drivers/video/nuc900fb.c | |||
@@ -707,7 +707,6 @@ static int nuc900fb_remove(struct platform_device *pdev) | |||
707 | release_resource(fbi->mem); | 707 | release_resource(fbi->mem); |
708 | kfree(fbi->mem); | 708 | kfree(fbi->mem); |
709 | 709 | ||
710 | platform_set_drvdata(pdev, NULL); | ||
711 | framebuffer_release(fbinfo); | 710 | framebuffer_release(fbinfo); |
712 | 711 | ||
713 | return 0; | 712 | return 0; |
diff --git a/drivers/video/pxa3xx-gcu.c b/drivers/video/pxa3xx-gcu.c index 97563c55af63..95c3c4ae81cc 100644 --- a/drivers/video/pxa3xx-gcu.c +++ b/drivers/video/pxa3xx-gcu.c | |||
@@ -711,7 +711,6 @@ err_misc_deregister: | |||
711 | misc_deregister(&priv->misc_dev); | 711 | misc_deregister(&priv->misc_dev); |
712 | 712 | ||
713 | err_free_priv: | 713 | err_free_priv: |
714 | platform_set_drvdata(dev, NULL); | ||
715 | free_buffers(dev, priv); | 714 | free_buffers(dev, priv); |
716 | kfree(priv); | 715 | kfree(priv); |
717 | return ret; | 716 | return ret; |
@@ -729,7 +728,6 @@ static int pxa3xx_gcu_remove(struct platform_device *dev) | |||
729 | priv->shared, priv->shared_phys); | 728 | priv->shared, priv->shared_phys); |
730 | iounmap(priv->mmio_base); | 729 | iounmap(priv->mmio_base); |
731 | release_mem_region(r->start, resource_size(r)); | 730 | release_mem_region(r->start, resource_size(r)); |
732 | platform_set_drvdata(dev, NULL); | ||
733 | clk_disable(priv->clk); | 731 | clk_disable(priv->clk); |
734 | free_buffers(dev, priv); | 732 | free_buffers(dev, priv); |
735 | kfree(priv); | 733 | kfree(priv); |
diff --git a/drivers/video/pxafb.c b/drivers/video/pxafb.c index 580f80cc586f..eca2de45f7a6 100644 --- a/drivers/video/pxafb.c +++ b/drivers/video/pxafb.c | |||
@@ -2256,7 +2256,6 @@ failed_free_res: | |||
2256 | release_mem_region(r->start, resource_size(r)); | 2256 | release_mem_region(r->start, resource_size(r)); |
2257 | failed_fbi: | 2257 | failed_fbi: |
2258 | clk_put(fbi->clk); | 2258 | clk_put(fbi->clk); |
2259 | platform_set_drvdata(dev, NULL); | ||
2260 | kfree(fbi); | 2259 | kfree(fbi); |
2261 | failed: | 2260 | failed: |
2262 | return ret; | 2261 | return ret; |
diff --git a/drivers/video/s3c2410fb.c b/drivers/video/s3c2410fb.c index 76a0e7fbd692..21a32adbb8ea 100644 --- a/drivers/video/s3c2410fb.c +++ b/drivers/video/s3c2410fb.c | |||
@@ -1005,7 +1005,6 @@ release_regs: | |||
1005 | release_mem: | 1005 | release_mem: |
1006 | release_mem_region(res->start, size); | 1006 | release_mem_region(res->start, size); |
1007 | dealloc_fb: | 1007 | dealloc_fb: |
1008 | platform_set_drvdata(pdev, NULL); | ||
1009 | framebuffer_release(fbinfo); | 1008 | framebuffer_release(fbinfo); |
1010 | return ret; | 1009 | return ret; |
1011 | } | 1010 | } |
@@ -1051,7 +1050,6 @@ static int s3c2410fb_remove(struct platform_device *pdev) | |||
1051 | 1050 | ||
1052 | release_mem_region(info->mem->start, resource_size(info->mem)); | 1051 | release_mem_region(info->mem->start, resource_size(info->mem)); |
1053 | 1052 | ||
1054 | platform_set_drvdata(pdev, NULL); | ||
1055 | framebuffer_release(fbinfo); | 1053 | framebuffer_release(fbinfo); |
1056 | 1054 | ||
1057 | return 0; | 1055 | return 0; |
diff --git a/drivers/video/sa1100fb.c b/drivers/video/sa1100fb.c index f34c858642e8..de76da0c6429 100644 --- a/drivers/video/sa1100fb.c +++ b/drivers/video/sa1100fb.c | |||
@@ -1271,7 +1271,6 @@ static int sa1100fb_probe(struct platform_device *pdev) | |||
1271 | failed: | 1271 | failed: |
1272 | if (fbi) | 1272 | if (fbi) |
1273 | iounmap(fbi->base); | 1273 | iounmap(fbi->base); |
1274 | platform_set_drvdata(pdev, NULL); | ||
1275 | kfree(fbi); | 1274 | kfree(fbi); |
1276 | release_mem_region(res->start, resource_size(res)); | 1275 | release_mem_region(res->start, resource_size(res)); |
1277 | return ret; | 1276 | return ret; |
diff --git a/drivers/video/sh7760fb.c b/drivers/video/sh7760fb.c index 5fbb0c7ab0c8..a8c6c43a4658 100644 --- a/drivers/video/sh7760fb.c +++ b/drivers/video/sh7760fb.c | |||
@@ -571,7 +571,6 @@ static int sh7760fb_remove(struct platform_device *dev) | |||
571 | iounmap(par->base); | 571 | iounmap(par->base); |
572 | release_mem_region(par->ioarea->start, resource_size(par->ioarea)); | 572 | release_mem_region(par->ioarea->start, resource_size(par->ioarea)); |
573 | framebuffer_release(info); | 573 | framebuffer_release(info); |
574 | platform_set_drvdata(dev, NULL); | ||
575 | 574 | ||
576 | return 0; | 575 | return 0; |
577 | } | 576 | } |
diff --git a/drivers/video/sh_mipi_dsi.c b/drivers/video/sh_mipi_dsi.c index 6cad53075e99..8f6e8ff620d4 100644 --- a/drivers/video/sh_mipi_dsi.c +++ b/drivers/video/sh_mipi_dsi.c | |||
@@ -567,7 +567,6 @@ static int sh_mipi_remove(struct platform_device *pdev) | |||
567 | iounmap(mipi->base); | 567 | iounmap(mipi->base); |
568 | if (res) | 568 | if (res) |
569 | release_mem_region(res->start, resource_size(res)); | 569 | release_mem_region(res->start, resource_size(res)); |
570 | platform_set_drvdata(pdev, NULL); | ||
571 | kfree(mipi); | 570 | kfree(mipi); |
572 | 571 | ||
573 | return 0; | 572 | return 0; |
diff --git a/drivers/video/tmiofb.c b/drivers/video/tmiofb.c index dc4fb8620156..deb8733f3c70 100644 --- a/drivers/video/tmiofb.c +++ b/drivers/video/tmiofb.c | |||
@@ -794,7 +794,6 @@ err_hw_init: | |||
794 | cell->disable(dev); | 794 | cell->disable(dev); |
795 | err_enable: | 795 | err_enable: |
796 | err_find_mode: | 796 | err_find_mode: |
797 | platform_set_drvdata(dev, NULL); | ||
798 | free_irq(irq, info); | 797 | free_irq(irq, info); |
799 | err_request_irq: | 798 | err_request_irq: |
800 | iounmap(info->screen_base); | 799 | iounmap(info->screen_base); |
@@ -823,8 +822,6 @@ static int tmiofb_remove(struct platform_device *dev) | |||
823 | if (cell->disable) | 822 | if (cell->disable) |
824 | cell->disable(dev); | 823 | cell->disable(dev); |
825 | 824 | ||
826 | platform_set_drvdata(dev, NULL); | ||
827 | |||
828 | free_irq(irq, info); | 825 | free_irq(irq, info); |
829 | 826 | ||
830 | iounmap(info->screen_base); | 827 | iounmap(info->screen_base); |
diff --git a/drivers/video/vga16fb.c b/drivers/video/vga16fb.c index 545faeccdb44..830ded45fd47 100644 --- a/drivers/video/vga16fb.c +++ b/drivers/video/vga16fb.c | |||
@@ -1269,7 +1269,6 @@ static void vga16fb_destroy(struct fb_info *info) | |||
1269 | iounmap(info->screen_base); | 1269 | iounmap(info->screen_base); |
1270 | fb_dealloc_cmap(&info->cmap); | 1270 | fb_dealloc_cmap(&info->cmap); |
1271 | /* XXX unshare VGA regions */ | 1271 | /* XXX unshare VGA regions */ |
1272 | platform_set_drvdata(dev, NULL); | ||
1273 | framebuffer_release(info); | 1272 | framebuffer_release(info); |
1274 | } | 1273 | } |
1275 | 1274 | ||
diff --git a/drivers/video/vt8500lcdfb.c b/drivers/video/vt8500lcdfb.c index 9547e1831e03..897484903c30 100644 --- a/drivers/video/vt8500lcdfb.c +++ b/drivers/video/vt8500lcdfb.c | |||
@@ -448,7 +448,6 @@ failed_free_io: | |||
448 | failed_free_res: | 448 | failed_free_res: |
449 | release_mem_region(res->start, resource_size(res)); | 449 | release_mem_region(res->start, resource_size(res)); |
450 | failed_fbi: | 450 | failed_fbi: |
451 | platform_set_drvdata(pdev, NULL); | ||
452 | kfree(fbi); | 451 | kfree(fbi); |
453 | failed: | 452 | failed: |
454 | return ret; | 453 | return ret; |