diff options
author | Guennadi Liakhovetski <g.liakhovetski@gmx.de> | 2012-12-21 08:11:48 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-01-05 01:38:02 -0200 |
commit | 25a348110078cefa99b0b079938dd930cfc3a0be (patch) | |
tree | f485653dd9a18cee7e9f037687e9b52354b58ea6 /include/media/soc_camera_platform.h | |
parent | dd669e907cbe1cf33f9cbbff79af2b5c271cdd89 (diff) |
[media] soc-camera: split struct soc_camera_link into host and subdevice parts
struct soc_camera_link currently contains fields, used both by sensor and
bridge drivers. To make subdevice driver re-use simpler, split it into a
host and a subdevice parts.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
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 | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/include/media/soc_camera_platform.h b/include/media/soc_camera_platform.h index 8aa4200a0b1..1e5065dab43 100644 --- a/include/media/soc_camera_platform.h +++ b/include/media/soc_camera_platform.h @@ -38,10 +38,12 @@ static inline int soc_camera_platform_add(struct soc_camera_device *icd, void (*release)(struct device *dev), int id) { - struct soc_camera_platform_info *info = plink->priv; + struct soc_camera_subdev_desc *ssdd = + (struct soc_camera_subdev_desc *)plink; + struct soc_camera_platform_info *info = ssdd->drv_priv; int ret; - if (icd->link != plink) + if (&icd->sdesc->subdev_desc != ssdd) return -ENODEV; if (*pdev) @@ -70,7 +72,9 @@ static inline void soc_camera_platform_del(const struct soc_camera_device *icd, struct platform_device *pdev, const struct soc_camera_link *plink) { - if (icd->link != plink || !pdev) + const struct soc_camera_subdev_desc *ssdd = + (const struct soc_camera_subdev_desc *)plink; + if (&icd->sdesc->subdev_desc != ssdd || !pdev) return; platform_device_unregister(pdev); |