mirror of https://gitee.com/openkylin/linux.git
media: Revert "media: staging/imx: add media device to capture register"
The imx6-specific subdevs that register a capture device will no
longer hold a reference to the media device, so this commit must be
reverted.
This reverts commit 16204b8a1c
.
Signed-off-by: Steve Longerbeam <slongerbeam@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
This commit is contained in:
parent
9bec226d8c
commit
411c59881c
|
@ -1266,7 +1266,7 @@ static int prp_registered(struct v4l2_subdev *sd)
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
ret = imx_media_capture_device_register(priv->md, priv->vdev);
|
ret = imx_media_capture_device_register(priv->vdev);
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
|
|
|
@ -700,8 +700,7 @@ void imx_media_capture_device_error(struct imx_media_video_dev *vdev)
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(imx_media_capture_device_error);
|
EXPORT_SYMBOL_GPL(imx_media_capture_device_error);
|
||||||
|
|
||||||
int imx_media_capture_device_register(struct imx_media_dev *md,
|
int imx_media_capture_device_register(struct imx_media_video_dev *vdev)
|
||||||
struct imx_media_video_dev *vdev)
|
|
||||||
{
|
{
|
||||||
struct capture_priv *priv = to_capture_priv(vdev);
|
struct capture_priv *priv = to_capture_priv(vdev);
|
||||||
struct v4l2_subdev *sd = priv->src_sd;
|
struct v4l2_subdev *sd = priv->src_sd;
|
||||||
|
@ -710,7 +709,8 @@ int imx_media_capture_device_register(struct imx_media_dev *md,
|
||||||
struct v4l2_subdev_format fmt_src;
|
struct v4l2_subdev_format fmt_src;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
priv->md = md;
|
/* get media device */
|
||||||
|
priv->md = dev_get_drvdata(sd->v4l2_dev->dev);
|
||||||
|
|
||||||
vfd->v4l2_dev = sd->v4l2_dev;
|
vfd->v4l2_dev = sd->v4l2_dev;
|
||||||
|
|
||||||
|
|
|
@ -1812,7 +1812,7 @@ static int csi_registered(struct v4l2_subdev *sd)
|
||||||
if (ret)
|
if (ret)
|
||||||
goto free_fim;
|
goto free_fim;
|
||||||
|
|
||||||
ret = imx_media_capture_device_register(priv->md, priv->vdev);
|
ret = imx_media_capture_device_register(priv->vdev);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto free_fim;
|
goto free_fim;
|
||||||
|
|
||||||
|
|
|
@ -268,8 +268,7 @@ int imx_media_of_add_csi(struct imx_media_dev *imxmd,
|
||||||
struct imx_media_video_dev *
|
struct imx_media_video_dev *
|
||||||
imx_media_capture_device_init(struct v4l2_subdev *src_sd, int pad);
|
imx_media_capture_device_init(struct v4l2_subdev *src_sd, int pad);
|
||||||
void imx_media_capture_device_remove(struct imx_media_video_dev *vdev);
|
void imx_media_capture_device_remove(struct imx_media_video_dev *vdev);
|
||||||
int imx_media_capture_device_register(struct imx_media_dev *md,
|
int imx_media_capture_device_register(struct imx_media_video_dev *vdev);
|
||||||
struct imx_media_video_dev *vdev);
|
|
||||||
void imx_media_capture_device_unregister(struct imx_media_video_dev *vdev);
|
void imx_media_capture_device_unregister(struct imx_media_video_dev *vdev);
|
||||||
struct imx_media_buffer *
|
struct imx_media_buffer *
|
||||||
imx_media_capture_device_next_buf(struct imx_media_video_dev *vdev);
|
imx_media_capture_device_next_buf(struct imx_media_video_dev *vdev);
|
||||||
|
|
|
@ -1126,7 +1126,7 @@ static int imx7_csi_registered(struct v4l2_subdev *sd)
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
ret = imx_media_capture_device_register(csi->imxmd, csi->vdev);
|
ret = imx_media_capture_device_register(csi->vdev);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue