diff options
author | Guennadi Liakhovetski <g.liakhovetski@gmx.de> | 2011-07-15 19:03:38 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-07-27 16:56:08 -0400 |
commit | 7dfff95366f48bf66f77c17cdc9ebd8be696ac5d (patch) | |
tree | c4cb975f5b8b8c3008921d38fa6e4deed9c8dbc9 /include/media/soc_camera_platform.h | |
parent | d33b290a149dafe2e3cc2901ec726bea09a2c0f4 (diff) |
[media] V4L: soc-camera: remove soc-camera bus and devices on it
Now that v4l2 subdevices have got their own device objects, having
one more device in soc-camera clients became redundant and confusing.
This patch removes those devices and the soc-camera bus, they used to
reside on.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'include/media/soc_camera_platform.h')
-rw-r--r-- | include/media/soc_camera_platform.h | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/include/media/soc_camera_platform.h b/include/media/soc_camera_platform.h index 6d7a4fd00fc0..74f0fa15ca47 100644 --- a/include/media/soc_camera_platform.h +++ b/include/media/soc_camera_platform.h | |||
@@ -21,7 +21,7 @@ struct soc_camera_platform_info { | |||
21 | unsigned long format_depth; | 21 | unsigned long format_depth; |
22 | struct v4l2_mbus_framefmt format; | 22 | struct v4l2_mbus_framefmt format; |
23 | unsigned long bus_param; | 23 | unsigned long bus_param; |
24 | struct device *dev; | 24 | struct soc_camera_device *icd; |
25 | int (*set_capture)(struct soc_camera_platform_info *info, int enable); | 25 | int (*set_capture)(struct soc_camera_platform_info *info, int enable); |
26 | }; | 26 | }; |
27 | 27 | ||
@@ -30,8 +30,7 @@ static inline void soc_camera_platform_release(struct platform_device **pdev) | |||
30 | *pdev = NULL; | 30 | *pdev = NULL; |
31 | } | 31 | } |
32 | 32 | ||
33 | static inline int soc_camera_platform_add(const struct soc_camera_link *icl, | 33 | static inline int soc_camera_platform_add(struct soc_camera_device *icd, |
34 | struct device *dev, | ||
35 | struct platform_device **pdev, | 34 | struct platform_device **pdev, |
36 | struct soc_camera_link *plink, | 35 | struct soc_camera_link *plink, |
37 | void (*release)(struct device *dev), | 36 | void (*release)(struct device *dev), |
@@ -40,7 +39,7 @@ static inline int soc_camera_platform_add(const struct soc_camera_link *icl, | |||
40 | struct soc_camera_platform_info *info = plink->priv; | 39 | struct soc_camera_platform_info *info = plink->priv; |
41 | int ret; | 40 | int ret; |
42 | 41 | ||
43 | if (icl != plink) | 42 | if (icd->link != plink) |
44 | return -ENODEV; | 43 | return -ENODEV; |
45 | 44 | ||
46 | if (*pdev) | 45 | if (*pdev) |
@@ -50,7 +49,7 @@ static inline int soc_camera_platform_add(const struct soc_camera_link *icl, | |||
50 | if (!*pdev) | 49 | if (!*pdev) |
51 | return -ENOMEM; | 50 | return -ENOMEM; |
52 | 51 | ||
53 | info->dev = dev; | 52 | info->icd = icd; |
54 | 53 | ||
55 | (*pdev)->dev.platform_data = info; | 54 | (*pdev)->dev.platform_data = info; |
56 | (*pdev)->dev.release = release; | 55 | (*pdev)->dev.release = release; |
@@ -59,17 +58,17 @@ static inline int soc_camera_platform_add(const struct soc_camera_link *icl, | |||
59 | if (ret < 0) { | 58 | if (ret < 0) { |
60 | platform_device_put(*pdev); | 59 | platform_device_put(*pdev); |
61 | *pdev = NULL; | 60 | *pdev = NULL; |
62 | info->dev = NULL; | 61 | info->icd = NULL; |
63 | } | 62 | } |
64 | 63 | ||
65 | return ret; | 64 | return ret; |
66 | } | 65 | } |
67 | 66 | ||
68 | static inline void soc_camera_platform_del(const struct soc_camera_link *icl, | 67 | static inline void soc_camera_platform_del(const struct soc_camera_device *icd, |
69 | struct platform_device *pdev, | 68 | struct platform_device *pdev, |
70 | const struct soc_camera_link *plink) | 69 | const struct soc_camera_link *plink) |
71 | { | 70 | { |
72 | if (icl != plink || !pdev) | 71 | if (icd->link != plink || !pdev) |
73 | return; | 72 | return; |
74 | 73 | ||
75 | platform_device_unregister(pdev); | 74 | platform_device_unregister(pdev); |