From 03dd4cb26d967f9588437b0fc9cc0e8353322bb7 Mon Sep 17 00:00:00 2001 From: André Fabian Silva Delgado Date: Fri, 25 Mar 2016 03:53:42 -0300 Subject: Linux-libre 4.5-gnu --- drivers/media/i2c/smiapp/smiapp-core.c | 32 ++++++++++++++++---------------- drivers/media/i2c/smiapp/smiapp.h | 2 +- 2 files changed, 17 insertions(+), 17 deletions(-) (limited to 'drivers/media/i2c/smiapp') diff --git a/drivers/media/i2c/smiapp/smiapp-core.c b/drivers/media/i2c/smiapp/smiapp-core.c index fb39dfd55..a215efe7a 100644 --- a/drivers/media/i2c/smiapp/smiapp-core.c +++ b/drivers/media/i2c/smiapp/smiapp-core.c @@ -2487,31 +2487,31 @@ static int smiapp_register_subdevs(struct smiapp_sensor *sensor) if (!last) continue; - rval = media_entity_init(&this->sd.entity, - this->npads, this->pads, 0); + rval = media_entity_pads_init(&this->sd.entity, + this->npads, this->pads); if (rval) { dev_err(&client->dev, - "media_entity_init failed\n"); + "media_entity_pads_init failed\n"); return rval; } - rval = media_entity_create_link(&this->sd.entity, - this->source_pad, - &last->sd.entity, - last->sink_pad, - MEDIA_LNK_FL_ENABLED | - MEDIA_LNK_FL_IMMUTABLE); + rval = v4l2_device_register_subdev(sensor->src->sd.v4l2_dev, + &this->sd); if (rval) { dev_err(&client->dev, - "media_entity_create_link failed\n"); + "v4l2_device_register_subdev failed\n"); return rval; } - rval = v4l2_device_register_subdev(sensor->src->sd.v4l2_dev, - &this->sd); + rval = media_create_pad_link(&this->sd.entity, + this->source_pad, + &last->sd.entity, + last->sink_pad, + MEDIA_LNK_FL_ENABLED | + MEDIA_LNK_FL_IMMUTABLE); if (rval) { dev_err(&client->dev, - "v4l2_device_register_subdev failed\n"); + "media_create_pad_link failed\n"); return rval; } } @@ -2763,7 +2763,7 @@ static int smiapp_init(struct smiapp_sensor *sensor) dev_dbg(&client->dev, "profile %d\n", sensor->minfo.smiapp_profile); - sensor->pixel_array->sd.entity.type = MEDIA_ENT_T_V4L2_SUBDEV_SENSOR; + sensor->pixel_array->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR; /* final steps */ smiapp_read_frame_fmt(sensor); @@ -3077,8 +3077,8 @@ static int smiapp_probe(struct i2c_client *client, sensor->src->sensor = sensor; sensor->src->pads[0].flags = MEDIA_PAD_FL_SOURCE; - rval = media_entity_init(&sensor->src->sd.entity, 2, - sensor->src->pads, 0); + rval = media_entity_pads_init(&sensor->src->sd.entity, 2, + sensor->src->pads); if (rval < 0) return rval; diff --git a/drivers/media/i2c/smiapp/smiapp.h b/drivers/media/i2c/smiapp/smiapp.h index ed010a8a4..f6af0cc4a 100644 --- a/drivers/media/i2c/smiapp/smiapp.h +++ b/drivers/media/i2c/smiapp/smiapp.h @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include "smiapp-pll.h" #include "smiapp-reg.h" -- cgit v1.2.3-54-g00ecf