Skip to content

Commit

Permalink
[media] v4l: tvp5150: Compile tvp5150_link_setup out if !CONFIG_MEDIA…
Browse files Browse the repository at this point in the history
…_CONTROLLER

The function is only referenced as a handler in the tvp5150_sd_media_ops
structure, which is only used when CONFIG_MEDIA_CONTROLLER is set. Don't
define the function and the structure when the configuration option is
unset to avoid an unused function warning.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
  • Loading branch information
Laurent Pinchart authored and Mauro Carvalho Chehab committed Dec 12, 2016
1 parent c6d4813 commit 406ff67
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/media/i2c/tvp5150.c
Original file line number Diff line number Diff line change
Expand Up @@ -1013,11 +1013,11 @@ static int tvp5150_enum_frame_size(struct v4l2_subdev *sd,
Media entity ops
****************************************************************************/

#ifdef CONFIG_MEDIA_CONTROLLER
static int tvp5150_link_setup(struct media_entity *entity,
const struct media_pad *local,
const struct media_pad *remote, u32 flags)
{
#ifdef CONFIG_MEDIA_CONTROLLER
struct v4l2_subdev *sd = media_entity_to_v4l2_subdev(entity);
struct tvp5150 *decoder = to_tvp5150(sd);
int i;
Expand All @@ -1034,14 +1034,14 @@ static int tvp5150_link_setup(struct media_entity *entity,
decoder->input = i;

tvp5150_selmux(sd);
#endif

return 0;
}

static const struct media_entity_operations tvp5150_sd_media_ops = {
.link_setup = tvp5150_link_setup,
};
#endif

/****************************************************************************
I2C Command
Expand Down

0 comments on commit 406ff67

Please sign in to comment.