[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>
This commit is contained in:

committed by
Mauro Carvalho Chehab

parent
d33b290a14
commit
7dfff95366
@@ -21,7 +21,7 @@ struct soc_camera_platform_info {
|
||||
unsigned long format_depth;
|
||||
struct v4l2_mbus_framefmt format;
|
||||
unsigned long bus_param;
|
||||
struct device *dev;
|
||||
struct soc_camera_device *icd;
|
||||
int (*set_capture)(struct soc_camera_platform_info *info, int enable);
|
||||
};
|
||||
|
||||
@@ -30,8 +30,7 @@ static inline void soc_camera_platform_release(struct platform_device **pdev)
|
||||
*pdev = NULL;
|
||||
}
|
||||
|
||||
static inline int soc_camera_platform_add(const struct soc_camera_link *icl,
|
||||
struct device *dev,
|
||||
static inline int soc_camera_platform_add(struct soc_camera_device *icd,
|
||||
struct platform_device **pdev,
|
||||
struct soc_camera_link *plink,
|
||||
void (*release)(struct device *dev),
|
||||
@@ -40,7 +39,7 @@ static inline int soc_camera_platform_add(const struct soc_camera_link *icl,
|
||||
struct soc_camera_platform_info *info = plink->priv;
|
||||
int ret;
|
||||
|
||||
if (icl != plink)
|
||||
if (icd->link != plink)
|
||||
return -ENODEV;
|
||||
|
||||
if (*pdev)
|
||||
@@ -50,7 +49,7 @@ static inline int soc_camera_platform_add(const struct soc_camera_link *icl,
|
||||
if (!*pdev)
|
||||
return -ENOMEM;
|
||||
|
||||
info->dev = dev;
|
||||
info->icd = icd;
|
||||
|
||||
(*pdev)->dev.platform_data = info;
|
||||
(*pdev)->dev.release = release;
|
||||
@@ -59,17 +58,17 @@ static inline int soc_camera_platform_add(const struct soc_camera_link *icl,
|
||||
if (ret < 0) {
|
||||
platform_device_put(*pdev);
|
||||
*pdev = NULL;
|
||||
info->dev = NULL;
|
||||
info->icd = NULL;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static inline void soc_camera_platform_del(const struct soc_camera_link *icl,
|
||||
static inline void soc_camera_platform_del(const struct soc_camera_device *icd,
|
||||
struct platform_device *pdev,
|
||||
const struct soc_camera_link *plink)
|
||||
{
|
||||
if (icl != plink || !pdev)
|
||||
if (icd->link != plink || !pdev)
|
||||
return;
|
||||
|
||||
platform_device_unregister(pdev);
|
||||
|
Reference in New Issue
Block a user