mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
media: rockchip: isp1: add check for get_remote_sensor
Change-Id: Ic09b394daa96aa8227b327f1e59713a359be8c18 Signed-off-by: Cai YiWei <cyw@rock-chips.com>
This commit is contained in:
@@ -83,11 +83,17 @@ static inline struct rkisp1_device *sd_to_isp_dev(struct v4l2_subdev *sd)
|
||||
/* Get sensor by enabled media link */
|
||||
static struct v4l2_subdev *get_remote_sensor(struct v4l2_subdev *sd)
|
||||
{
|
||||
struct media_pad *local;
|
||||
struct media_pad *local, *remote;
|
||||
struct media_entity *sensor_me;
|
||||
|
||||
local = &sd->entity.pads[RKISP1_ISP_PAD_SINK];
|
||||
sensor_me = media_entity_remote_pad(local)->entity;
|
||||
if (!local)
|
||||
return NULL;
|
||||
remote = media_entity_remote_pad(local);
|
||||
if (!remote)
|
||||
return NULL;
|
||||
|
||||
sensor_me = remote->entity;
|
||||
|
||||
return media_entity_to_v4l2_subdev(sensor_me);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user