diff options
author | Sakari Ailus | 2017-08-15 12:14:23 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab | 2017-08-20 14:18:38 +0200 |
commit | 02b1ce92301378ea40568ebff9f26036f6331137 (patch) | |
tree | fa4631af021ab04166f6203a2e27985272eaf85f /drivers/media/platform/omap3isp/ispcsiphy.c | |
parent | media: omap3isp: csiphy: Don't assume the CSI receiver is a CSI2 module (diff) | |
download | kernel-qcow2-linux-02b1ce92301378ea40568ebff9f26036f6331137.tar.gz kernel-qcow2-linux-02b1ce92301378ea40568ebff9f26036f6331137.tar.xz kernel-qcow2-linux-02b1ce92301378ea40568ebff9f26036f6331137.zip |
media: omap3isp: Quit using struct v4l2_subdev.host_priv field
struct v4l2_subdev.host_priv is intended to be used by another driver. This
is hardly good design but back in the days of platform data was a quick
hack to get things done.
As the sub-device specific bus information can be stored to the ISP driver
specific struct allocated along with v4l2_async_subdev, keep the
information there and only there.
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Tested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/platform/omap3isp/ispcsiphy.c')
-rw-r--r-- | drivers/media/platform/omap3isp/ispcsiphy.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/media/platform/omap3isp/ispcsiphy.c b/drivers/media/platform/omap3isp/ispcsiphy.c index ed1eb9907ae0..a28fb79abaac 100644 --- a/drivers/media/platform/omap3isp/ispcsiphy.c +++ b/drivers/media/platform/omap3isp/ispcsiphy.c @@ -165,10 +165,7 @@ static int csiphy_set_power(struct isp_csiphy *phy, u32 power) static int omap3isp_csiphy_config(struct isp_csiphy *phy) { struct isp_pipeline *pipe = to_isp_pipeline(phy->entity); - struct isp_async_subdev *isd = - container_of(pipe->external->asd, struct isp_async_subdev, asd); - struct isp_bus_cfg *buscfg = pipe->external->host_priv ? - pipe->external->host_priv : &isd->bus; + struct isp_bus_cfg *buscfg = v4l2_subdev_to_bus_cfg(pipe->external); struct isp_csiphy_lanes_cfg *lanes; int csi2_ddrclk_khz; unsigned int num_data_lanes, used_lanes = 0; @@ -311,7 +308,8 @@ void omap3isp_csiphy_release(struct isp_csiphy *phy) mutex_lock(&phy->mutex); if (phy->entity) { struct isp_pipeline *pipe = to_isp_pipeline(phy->entity); - struct isp_bus_cfg *buscfg = pipe->external->host_priv; + struct isp_bus_cfg *buscfg = + v4l2_subdev_to_bus_cfg(pipe->external); csiphy_routing_cfg(phy, buscfg->interface, false, buscfg->bus.ccp2.phy_layer); |