diff options
author | Julia Lawall <Julia.Lawall@inria.fr> | 2021-02-10 00:13:33 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2021-03-11 13:59:42 +0300 |
commit | 18490a1ad8ea624820c2b86d05edc9b7bd456e9b (patch) | |
tree | 621343a4fdcb847b1aa4d6725d2c72b3b39dbd39 /drivers | |
parent | 21ea3defde62fb9441049d1cea282807b7d773d4 (diff) | |
download | linux-18490a1ad8ea624820c2b86d05edc9b7bd456e9b.tar.xz |
media: use getter/setter functions
Use getter and setter functions, for a variety of data types.
Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/pci/ivtv/ivtv-driver.c | 2 | ||||
-rw-r--r-- | drivers/media/platform/fsl-viu.c | 6 | ||||
-rw-r--r-- | drivers/media/platform/pxa_camera.c | 4 | ||||
-rw-r--r-- | drivers/media/radio/radio-maxiradio.c | 2 | ||||
-rw-r--r-- | drivers/media/spi/cxd2880-spi.c | 4 |
5 files changed, 9 insertions, 9 deletions
diff --git a/drivers/media/pci/ivtv/ivtv-driver.c b/drivers/media/pci/ivtv/ivtv-driver.c index 6e448cb3b51c..c4a069b3b9d1 100644 --- a/drivers/media/pci/ivtv/ivtv-driver.c +++ b/drivers/media/pci/ivtv/ivtv-driver.c @@ -1393,7 +1393,7 @@ int ivtv_init_on_first_open(struct ivtv *itv) static void ivtv_remove(struct pci_dev *pdev) { - struct v4l2_device *v4l2_dev = dev_get_drvdata(&pdev->dev); + struct v4l2_device *v4l2_dev = pci_get_drvdata(pdev); struct ivtv *itv = to_ivtv(v4l2_dev); int i; diff --git a/drivers/media/platform/fsl-viu.c b/drivers/media/platform/fsl-viu.c index 1f1042d5c865..a4bfa70b49b2 100644 --- a/drivers/media/platform/fsl-viu.c +++ b/drivers/media/platform/fsl-viu.c @@ -1529,7 +1529,7 @@ err_irq: static int viu_of_remove(struct platform_device *op) { - struct v4l2_device *v4l2_dev = dev_get_drvdata(&op->dev); + struct v4l2_device *v4l2_dev = platform_get_drvdata(op); struct viu_dev *dev = container_of(v4l2_dev, struct viu_dev, v4l2_dev); struct v4l2_subdev *sdev = list_entry(v4l2_dev->subdevs.next, struct v4l2_subdev, list); @@ -1550,7 +1550,7 @@ static int viu_of_remove(struct platform_device *op) #ifdef CONFIG_PM static int viu_suspend(struct platform_device *op, pm_message_t state) { - struct v4l2_device *v4l2_dev = dev_get_drvdata(&op->dev); + struct v4l2_device *v4l2_dev = platform_get_drvdata(op); struct viu_dev *dev = container_of(v4l2_dev, struct viu_dev, v4l2_dev); clk_disable(dev->clk); @@ -1559,7 +1559,7 @@ static int viu_suspend(struct platform_device *op, pm_message_t state) static int viu_resume(struct platform_device *op) { - struct v4l2_device *v4l2_dev = dev_get_drvdata(&op->dev); + struct v4l2_device *v4l2_dev = platform_get_drvdata(op); struct viu_dev *dev = container_of(v4l2_dev, struct viu_dev, v4l2_dev); clk_enable(dev->clk); diff --git a/drivers/media/platform/pxa_camera.c b/drivers/media/platform/pxa_camera.c index 14077797f5e1..dd510ee9b58a 100644 --- a/drivers/media/platform/pxa_camera.c +++ b/drivers/media/platform/pxa_camera.c @@ -2389,7 +2389,7 @@ static int pxa_camera_probe(struct platform_device *pdev) pxa_camera_activate(pcdev); - dev_set_drvdata(&pdev->dev, pcdev); + platform_set_drvdata(pdev, pcdev); err = v4l2_device_register(&pdev->dev, &pcdev->v4l2_dev); if (err) goto exit_deactivate; @@ -2421,7 +2421,7 @@ exit_free_dma_y: static int pxa_camera_remove(struct platform_device *pdev) { - struct pxa_camera_dev *pcdev = dev_get_drvdata(&pdev->dev); + struct pxa_camera_dev *pcdev = platform_get_drvdata(pdev); pxa_camera_deactivate(pcdev); tasklet_kill(&pcdev->task_eof); diff --git a/drivers/media/radio/radio-maxiradio.c b/drivers/media/radio/radio-maxiradio.c index ad488ecbd16c..de107e2cbcd6 100644 --- a/drivers/media/radio/radio-maxiradio.c +++ b/drivers/media/radio/radio-maxiradio.c @@ -176,7 +176,7 @@ errfr: static void maxiradio_remove(struct pci_dev *pdev) { - struct v4l2_device *v4l2_dev = dev_get_drvdata(&pdev->dev); + struct v4l2_device *v4l2_dev = pci_get_drvdata(pdev); struct maxiradio *dev = to_maxiradio(v4l2_dev); snd_tea575x_exit(&dev->tea); diff --git a/drivers/media/spi/cxd2880-spi.c b/drivers/media/spi/cxd2880-spi.c index 4077217777f9..931ec0727cd3 100644 --- a/drivers/media/spi/cxd2880-spi.c +++ b/drivers/media/spi/cxd2880-spi.c @@ -535,7 +535,7 @@ cxd2880_spi_probe(struct spi_device *spi) dvb_spi->spi = spi; mutex_init(&dvb_spi->spi_mutex); - dev_set_drvdata(&spi->dev, dvb_spi); + spi_set_drvdata(spi, dvb_spi); config.spi = spi; config.spi_mutex = &dvb_spi->spi_mutex; @@ -632,7 +632,7 @@ cxd2880_spi_remove(struct spi_device *spi) return -EINVAL; } - dvb_spi = dev_get_drvdata(&spi->dev); + dvb_spi = spi_get_drvdata(spi); if (!dvb_spi) { pr_err("failed\n"); |