diff options
author | Guennadi Liakhovetski <g.liakhovetski@gmx.de> | 2009-04-24 11:55:18 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-06-16 17:20:43 -0400 |
commit | eb6c8558f7658b7f31ee022c7bea1d840eda33dc (patch) | |
tree | cd04ace1cfe7c03329d0e610b296c3d4250544f2 /drivers/media/video/sh_mobile_ceu_camera.c | |
parent | 594bb46dbc63934bc65fa95743f83204bd26a641 (diff) |
V4L/DVB (11608): soc-camera: host-driver cleanup
Embed struct soc_camera_host in platform-specific per host instance objects
instead of allocating them statically in drivers, use platform_[gs]et_drvdata
consistently, use resource_size().
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/sh_mobile_ceu_camera.c')
-rw-r--r-- | drivers/media/video/sh_mobile_ceu_camera.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/media/video/sh_mobile_ceu_camera.c b/drivers/media/video/sh_mobile_ceu_camera.c index b5e37a530c62..8e4a8fca976c 100644 --- a/drivers/media/video/sh_mobile_ceu_camera.c +++ b/drivers/media/video/sh_mobile_ceu_camera.c | |||
@@ -840,7 +840,7 @@ static int sh_mobile_ceu_probe(struct platform_device *pdev) | |||
840 | goto exit_kfree; | 840 | goto exit_kfree; |
841 | } | 841 | } |
842 | 842 | ||
843 | base = ioremap_nocache(res->start, res->end - res->start + 1); | 843 | base = ioremap_nocache(res->start, resource_size(res)); |
844 | if (!base) { | 844 | if (!base) { |
845 | err = -ENXIO; | 845 | err = -ENXIO; |
846 | dev_err(&pdev->dev, "Unable to ioremap CEU registers.\n"); | 846 | dev_err(&pdev->dev, "Unable to ioremap CEU registers.\n"); |
@@ -856,7 +856,7 @@ static int sh_mobile_ceu_probe(struct platform_device *pdev) | |||
856 | if (res) { | 856 | if (res) { |
857 | err = dma_declare_coherent_memory(&pdev->dev, res->start, | 857 | err = dma_declare_coherent_memory(&pdev->dev, res->start, |
858 | res->start, | 858 | res->start, |
859 | (res->end - res->start) + 1, | 859 | resource_size(res), |
860 | DMA_MEMORY_MAP | | 860 | DMA_MEMORY_MAP | |
861 | DMA_MEMORY_EXCLUSIVE); | 861 | DMA_MEMORY_EXCLUSIVE); |
862 | if (!err) { | 862 | if (!err) { |
@@ -865,7 +865,7 @@ static int sh_mobile_ceu_probe(struct platform_device *pdev) | |||
865 | goto exit_iounmap; | 865 | goto exit_iounmap; |
866 | } | 866 | } |
867 | 867 | ||
868 | pcdev->video_limit = (res->end - res->start) + 1; | 868 | pcdev->video_limit = resource_size(res); |
869 | } | 869 | } |
870 | 870 | ||
871 | /* request irq */ | 871 | /* request irq */ |