Commit 66ed61b9 authored by Laurent Pinchart's avatar Laurent Pinchart Committed by Hans Verkuil

staging: media: imx: Drop unused helper functions

The imx_media_find_subdev_by_fwnode(),
imx_media_find_subdev_by_devname(), imx_media_pipeline_csi2_channel()
and imx_media_pipeline_video_device() helper functions are not used.
Drop them.
Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: default avatarPaul Elder <paul.elder@ideasonboard.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
parent a11c03f0
...@@ -626,36 +626,6 @@ void imx_media_grp_id_to_sd_name(char *sd_name, int sz, u32 grp_id, int ipu_id) ...@@ -626,36 +626,6 @@ void imx_media_grp_id_to_sd_name(char *sd_name, int sz, u32 grp_id, int ipu_id)
} }
EXPORT_SYMBOL_GPL(imx_media_grp_id_to_sd_name); EXPORT_SYMBOL_GPL(imx_media_grp_id_to_sd_name);
struct v4l2_subdev *
imx_media_find_subdev_by_fwnode(struct imx_media_dev *imxmd,
struct fwnode_handle *fwnode)
{
struct v4l2_subdev *sd;
list_for_each_entry(sd, &imxmd->v4l2_dev.subdevs, list) {
if (sd->fwnode == fwnode)
return sd;
}
return NULL;
}
EXPORT_SYMBOL_GPL(imx_media_find_subdev_by_fwnode);
struct v4l2_subdev *
imx_media_find_subdev_by_devname(struct imx_media_dev *imxmd,
const char *devname)
{
struct v4l2_subdev *sd;
list_for_each_entry(sd, &imxmd->v4l2_dev.subdevs, list) {
if (!strcmp(devname, dev_name(sd->dev)))
return sd;
}
return NULL;
}
EXPORT_SYMBOL_GPL(imx_media_find_subdev_by_devname);
/* /*
* Adds a video device to the master video device list. This is called * Adds a video device to the master video device list. This is called
* when a video device is registered. * when a video device is registered.
...@@ -756,25 +726,6 @@ find_pipeline_entity(struct media_entity *start, u32 grp_id, ...@@ -756,25 +726,6 @@ find_pipeline_entity(struct media_entity *start, u32 grp_id,
return pad ? pad->entity : NULL; return pad ? pad->entity : NULL;
} }
/*
* Find the upstream mipi-csi2 virtual channel reached from the given
* start entity in the current pipeline.
* Must be called with mdev->graph_mutex held.
*/
int imx_media_pipeline_csi2_channel(struct media_entity *start_entity)
{
struct media_pad *pad;
int ret = -EPIPE;
pad = imx_media_pipeline_pad(start_entity, IMX_MEDIA_GRP_ID_CSI2,
0, true);
if (pad)
ret = pad->index - 1;
return ret;
}
EXPORT_SYMBOL_GPL(imx_media_pipeline_csi2_channel);
/* /*
* Find a subdev reached upstream from the given start entity in * Find a subdev reached upstream from the given start entity in
* the current pipeline. * the current pipeline.
...@@ -794,25 +745,6 @@ imx_media_pipeline_subdev(struct media_entity *start_entity, u32 grp_id, ...@@ -794,25 +745,6 @@ imx_media_pipeline_subdev(struct media_entity *start_entity, u32 grp_id,
} }
EXPORT_SYMBOL_GPL(imx_media_pipeline_subdev); EXPORT_SYMBOL_GPL(imx_media_pipeline_subdev);
/*
* Find a subdev reached upstream from the given start entity in
* the current pipeline.
* Must be called with mdev->graph_mutex held.
*/
struct video_device *
imx_media_pipeline_video_device(struct media_entity *start_entity,
enum v4l2_buf_type buftype, bool upstream)
{
struct media_entity *me;
me = find_pipeline_entity(start_entity, 0, buftype, upstream);
if (!me)
return ERR_PTR(-ENODEV);
return media_entity_to_video_device(me);
}
EXPORT_SYMBOL_GPL(imx_media_pipeline_video_device);
/* /*
* Turn current pipeline streaming on/off starting from entity. * Turn current pipeline streaming on/off starting from entity.
*/ */
......
...@@ -201,24 +201,14 @@ int imx_media_mbus_fmt_to_pix_fmt(struct v4l2_pix_format *pix, ...@@ -201,24 +201,14 @@ int imx_media_mbus_fmt_to_pix_fmt(struct v4l2_pix_format *pix,
const struct imx_media_pixfmt *cc); const struct imx_media_pixfmt *cc);
void imx_media_grp_id_to_sd_name(char *sd_name, int sz, void imx_media_grp_id_to_sd_name(char *sd_name, int sz,
u32 grp_id, int ipu_id); u32 grp_id, int ipu_id);
struct v4l2_subdev *
imx_media_find_subdev_by_fwnode(struct imx_media_dev *imxmd,
struct fwnode_handle *fwnode);
struct v4l2_subdev *
imx_media_find_subdev_by_devname(struct imx_media_dev *imxmd,
const char *devname);
void imx_media_add_video_device(struct imx_media_dev *imxmd, void imx_media_add_video_device(struct imx_media_dev *imxmd,
struct imx_media_video_dev *vdev); struct imx_media_video_dev *vdev);
int imx_media_pipeline_csi2_channel(struct media_entity *start_entity);
struct media_pad * struct media_pad *
imx_media_pipeline_pad(struct media_entity *start_entity, u32 grp_id, imx_media_pipeline_pad(struct media_entity *start_entity, u32 grp_id,
enum v4l2_buf_type buftype, bool upstream); enum v4l2_buf_type buftype, bool upstream);
struct v4l2_subdev * struct v4l2_subdev *
imx_media_pipeline_subdev(struct media_entity *start_entity, u32 grp_id, imx_media_pipeline_subdev(struct media_entity *start_entity, u32 grp_id,
bool upstream); bool upstream);
struct video_device *
imx_media_pipeline_video_device(struct media_entity *start_entity,
enum v4l2_buf_type buftype, bool upstream);
struct imx_media_dma_buf { struct imx_media_dma_buf {
void *virt; void *virt;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment