From: Javier Martinez Canillas <javier@osg.samsung.com>
To: linux-kernel@vger.kernel.org
Cc: Hans Verkuil <hans.verkuil@cisco.com>,
Javier Martinez Canillas <javier@osg.samsung.com>,
Sakari Ailus <sakari.ailus@iki.fi>,
Mauro Carvalho Chehab <mchehab@osg.samsung.com>,
linux-media@vger.kernel.org
Subject: [PATCH 5/5] [media] smiapp: create pad links after subdev registration
Date: Thu, 3 Sep 2015 18:00:36 +0200 [thread overview]
Message-ID: <1441296036-20727-6-git-send-email-javier@osg.samsung.com> (raw)
In-Reply-To: <1441296036-20727-1-git-send-email-javier@osg.samsung.com>
The smiapp driver creates the pads links before the media entity is
registered with the media device. This doesn't work now that object
IDs are used to create links so the media_device has to be set.
Move entity registration logic before pads links creation.
Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
---
drivers/media/i2c/smiapp/smiapp-core.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/drivers/media/i2c/smiapp/smiapp-core.c b/drivers/media/i2c/smiapp/smiapp-core.c
index 5aa49eb393a9..938201789ebc 100644
--- a/drivers/media/i2c/smiapp/smiapp-core.c
+++ b/drivers/media/i2c/smiapp/smiapp-core.c
@@ -2495,23 +2495,23 @@ static int smiapp_register_subdevs(struct smiapp_sensor *sensor)
return rval;
}
- 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);
+ rval = v4l2_device_register_subdev(sensor->src->sd.v4l2_dev,
+ &this->sd);
if (rval) {
dev_err(&client->dev,
- "media_create_pad_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;
}
}
--
2.4.3
next prev parent reply other threads:[~2015-09-03 16:01 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-03 16:00 [PATCH 0/5] [media] Create pads links after entities registration Javier Martinez Canillas
2015-09-03 16:00 ` [PATCH 1/5] [media] staging: omap4iss: separate links creation from entities init Javier Martinez Canillas
2015-12-06 3:10 ` Laurent Pinchart
2015-12-07 15:19 ` Javier Martinez Canillas
2015-09-03 16:00 ` [PATCH 2/5] [media] v4l: vsp1: create pad links after subdev registration Javier Martinez Canillas
2015-12-06 2:46 ` Laurent Pinchart
2015-09-03 16:00 ` [PATCH 3/5] [media] v4l: vsp1: separate links creation from entities init Javier Martinez Canillas
2015-12-06 2:51 ` Laurent Pinchart
2015-12-07 15:08 ` Javier Martinez Canillas
2015-09-03 16:00 ` [PATCH 4/5] [media] uvcvideo: create pad links after subdev registration Javier Martinez Canillas
2015-09-07 14:10 ` Javier Martinez Canillas
2015-12-06 2:44 ` Laurent Pinchart
2015-12-07 15:04 ` Javier Martinez Canillas
2015-09-03 16:00 ` Javier Martinez Canillas [this message]
2015-12-06 2:33 ` [PATCH 5/5] [media] smiapp: " Laurent Pinchart
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1441296036-20727-6-git-send-email-javier@osg.samsung.com \
--to=javier@osg.samsung.com \
--cc=hans.verkuil@cisco.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@osg.samsung.com \
--cc=sakari.ailus@iki.fi \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®