summaryrefslogtreecommitdiffstats
path: root/include/media/soc_camera_platform.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/media/soc_camera_platform.h')
-rw-r--r--include/media/soc_camera_platform.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/include/media/soc_camera_platform.h b/include/media/soc_camera_platform.h
index 8aa4200a0b1d..1e5065dab430 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);