diff options
author | Helen Koike <helen.koike@collabora.com> | 2019-08-07 18:19:57 -0300 |
---|---|---|
committer | Helen Koike <helen.koike@collabora.com> | 2019-08-08 17:56:37 -0300 |
commit | d231b10df4a6aafcbcafbe4192e277f92da718b1 (patch) | |
tree | ca6ee6c536c78101b1592e9fe09a4a17c59de5b0 | |
parent | a08cfd5524324c5b6e98f76dfccd32b0e8cec8c5 (diff) |
tmp: fixes
-rw-r--r-- | drivers/media/platform/rockchip/isp1/dev.c | 9 | ||||
-rw-r--r-- | drivers/media/platform/rockchip/isp1/dev.h | 2 |
2 files changed, 6 insertions, 5 deletions
diff --git a/drivers/media/platform/rockchip/isp1/dev.c b/drivers/media/platform/rockchip/isp1/dev.c index 231178909574..a3c64968e3cf 100644 --- a/drivers/media/platform/rockchip/isp1/dev.c +++ b/drivers/media/platform/rockchip/isp1/dev.c @@ -199,8 +199,7 @@ static int rkisp1_create_links(struct rkisp1_device *dev) /* sensor links */ list_for_each_entry(sd, &dev->v4l2_dev.subdevs, list) { - ret = media_entity_get_fwnode_pad(&sd->entity, - sd->asd->match.fwnode, + ret = media_entity_get_fwnode_pad(&sd->entity, sd->fwnode, MEDIA_PAD_FL_SOURCE); if (ret < 0) { dev_err(sd->dev, "failed to find src pad for %s\n", @@ -260,7 +259,8 @@ static int subdev_notifier_bound(struct v4l2_async_notifier *notifier, struct rkisp1_device *isp_dev = container_of(notifier, struct rkisp1_device, notifier); - struct sensor_async_subdev *s_asd = sd_to_sensor(sd); + struct sensor_async_subdev *s_asd = container_of(asd, + struct sensor_async_subdev, asd); s_asd->dphy = devm_phy_get(isp_dev->dev, "dphy"); if (IS_ERR(s_asd->dphy)) { @@ -278,7 +278,8 @@ static void subdev_notifier_unbind(struct v4l2_async_notifier *notifier, struct v4l2_subdev *sd, struct v4l2_async_subdev *asd) { - struct sensor_async_subdev *s_asd = sd_to_sensor(sd); + struct sensor_async_subdev *s_asd = container_of(asd, + struct sensor_async_subdev, asd); phy_exit(s_asd->dphy); } diff --git a/drivers/media/platform/rockchip/isp1/dev.h b/drivers/media/platform/rockchip/isp1/dev.h index 9ad3c48d1da2..a9074f3b5977 100644 --- a/drivers/media/platform/rockchip/isp1/dev.h +++ b/drivers/media/platform/rockchip/isp1/dev.h @@ -63,7 +63,7 @@ struct sensor_async_subdev { struct phy *dphy; }; -static struct sensor_async_subdev *sd_to_sensor(struct v4l2_subdev *sd) +static inline struct sensor_async_subdev *sd_to_sensor(struct v4l2_subdev *sd) { return container_of(sd->asd, struct sensor_async_subdev, asd); } |