Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

backlight/video: Use Platform getter/setter functions

Use getter and setter functions, for platform_device structures and a
spi_device structure.

Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Lee Jones <lee.jones@linaro.org>

authored by

Julia Lawall and committed by
Lee Jones
0b5e0f45 57e0d7b7

+16 -16
+1 -1
drivers/video/backlight/qcom-wled.c
··· 1692 1692 1693 1693 static int wled_remove(struct platform_device *pdev) 1694 1694 { 1695 - struct wled *wled = dev_get_drvdata(&pdev->dev); 1695 + struct wled *wled = platform_get_drvdata(pdev); 1696 1696 1697 1697 mutex_destroy(&wled->lock); 1698 1698 cancel_delayed_work_sync(&wled->ovp_work);
+2 -2
drivers/video/fbdev/amifb.c
··· 3736 3736 if (err) 3737 3737 goto free_irq; 3738 3738 3739 - dev_set_drvdata(&pdev->dev, info); 3739 + platform_set_drvdata(pdev, info); 3740 3740 3741 3741 err = register_framebuffer(info); 3742 3742 if (err) ··· 3764 3764 3765 3765 static int __exit amifb_remove(struct platform_device *pdev) 3766 3766 { 3767 - struct fb_info *info = dev_get_drvdata(&pdev->dev); 3767 + struct fb_info *info = platform_get_drvdata(pdev); 3768 3768 3769 3769 unregister_framebuffer(info); 3770 3770 fb_dealloc_cmap(&info->cmap);
+2 -2
drivers/video/fbdev/da8xx-fb.c
··· 1066 1066 1067 1067 static int fb_remove(struct platform_device *dev) 1068 1068 { 1069 - struct fb_info *info = dev_get_drvdata(&dev->dev); 1069 + struct fb_info *info = platform_get_drvdata(dev); 1070 1070 struct da8xx_fb_par *par = info->par; 1071 1071 int ret; 1072 1072 ··· 1482 1482 da8xx_fb_var.activate = FB_ACTIVATE_FORCE; 1483 1483 fb_set_var(da8xx_fb_info, &da8xx_fb_var); 1484 1484 1485 - dev_set_drvdata(&device->dev, da8xx_fb_info); 1485 + platform_set_drvdata(device, da8xx_fb_info); 1486 1486 1487 1487 /* initialize the vsync wait queue */ 1488 1488 init_waitqueue_head(&par->vsync_wait);
+1 -1
drivers/video/fbdev/imxfb.c
··· 657 657 static int imxfb_init_fbinfo(struct platform_device *pdev) 658 658 { 659 659 struct imx_fb_platform_data *pdata = dev_get_platdata(&pdev->dev); 660 - struct fb_info *info = dev_get_drvdata(&pdev->dev); 660 + struct fb_info *info = platform_get_drvdata(pdev); 661 661 struct imxfb_info *fbi = info->par; 662 662 struct device_node *np; 663 663
+3 -3
drivers/video/fbdev/omap2/omapfb/displays/panel-lgphilips-lb035q02.c
··· 239 239 static int lb035q02_probe_of(struct spi_device *spi) 240 240 { 241 241 struct device_node *node = spi->dev.of_node; 242 - struct panel_drv_data *ddata = dev_get_drvdata(&spi->dev); 242 + struct panel_drv_data *ddata = spi_get_drvdata(spi); 243 243 struct omap_dss_device *in; 244 244 struct gpio_desc *gpio; 245 245 ··· 277 277 if (ddata == NULL) 278 278 return -ENOMEM; 279 279 280 - dev_set_drvdata(&spi->dev, ddata); 280 + spi_set_drvdata(spi, ddata); 281 281 282 282 ddata->spi = spi; 283 283 ··· 318 318 319 319 static int lb035q02_panel_spi_remove(struct spi_device *spi) 320 320 { 321 - struct panel_drv_data *ddata = dev_get_drvdata(&spi->dev); 321 + struct panel_drv_data *ddata = spi_get_drvdata(spi); 322 322 struct omap_dss_device *dssdev = &ddata->dssdev; 323 323 struct omap_dss_device *in = ddata->in; 324 324
+2 -2
drivers/video/fbdev/omap2/omapfb/dss/dpi.c
··· 55 55 /* only used in non-DT mode */ 56 56 static struct dpi_data *dpi_get_data_from_pdev(struct platform_device *pdev) 57 57 { 58 - return dev_get_drvdata(&pdev->dev); 58 + return platform_get_drvdata(pdev); 59 59 } 60 60 61 61 static struct dss_pll *dpi_get_pll(enum omap_channel channel) ··· 784 784 785 785 dpi->pdev = pdev; 786 786 787 - dev_set_drvdata(&pdev->dev, dpi); 787 + platform_set_drvdata(pdev, dpi); 788 788 789 789 mutex_init(&dpi->lock); 790 790
+2 -2
drivers/video/fbdev/omap2/omapfb/dss/dsi.c
··· 399 399 400 400 static inline struct dsi_data *dsi_get_dsidrv_data(struct platform_device *dsidev) 401 401 { 402 - return dev_get_drvdata(&dsidev->dev); 402 + return platform_get_drvdata(dsidev); 403 403 } 404 404 405 405 static inline struct platform_device *dsi_get_dsidev_from_dssdev(struct omap_dss_device *dssdev) ··· 5272 5272 return -ENOMEM; 5273 5273 5274 5274 dsi->pdev = dsidev; 5275 - dev_set_drvdata(&dsidev->dev, dsi); 5275 + platform_set_drvdata(dsidev, dsi); 5276 5276 5277 5277 spin_lock_init(&dsi->irq_lock); 5278 5278 spin_lock_init(&dsi->errors_lock);
+1 -1
drivers/video/fbdev/omap2/omapfb/dss/hdmi4.c
··· 672 672 int irq; 673 673 674 674 hdmi.pdev = pdev; 675 - dev_set_drvdata(&pdev->dev, &hdmi); 675 + platform_set_drvdata(pdev, &hdmi); 676 676 677 677 mutex_init(&hdmi.lock); 678 678 spin_lock_init(&hdmi.audio_playing_lock);
+1 -1
drivers/video/fbdev/omap2/omapfb/dss/hdmi5.c
··· 713 713 int irq; 714 714 715 715 hdmi.pdev = pdev; 716 - dev_set_drvdata(&pdev->dev, &hdmi); 716 + platform_set_drvdata(pdev, &hdmi); 717 717 718 718 mutex_init(&hdmi.lock); 719 719 spin_lock_init(&hdmi.audio_playing_lock);
+1 -1
drivers/video/fbdev/xilinxfb.c
··· 472 472 if (of_find_property(pdev->dev.of_node, "rotate-display", NULL)) 473 473 pdata.rotate_screen = 1; 474 474 475 - dev_set_drvdata(&pdev->dev, drvdata); 475 + platform_set_drvdata(pdev, drvdata); 476 476 return xilinxfb_assign(pdev, drvdata, &pdata); 477 477 } 478 478