diff --git a/drivers/media/platform/msm/camera/cam_sensor_module/cam_cci/cci_intf.c b/drivers/media/platform/msm/camera/cam_sensor_module/cam_cci/cci_intf.c index b0de5aa683e7..dcda77c41688 100644 --- a/drivers/media/platform/msm/camera/cam_sensor_module/cam_cci/cci_intf.c +++ b/drivers/media/platform/msm/camera/cam_sensor_module/cam_cci/cci_intf.c @@ -46,7 +46,11 @@ static int32_t cci_intf_xfer( __func__, cmd, xfer->cci_bus, xfer->slave_addr, xfer->reg.width, xfer->reg.addr, xfer->data.count); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,19,0) if (xfer->cci_device > 1 || xfer->cci_bus > 1 || xfer->slave_addr > 0x7F || +#else + if (xfer->cci_bus > 1 || xfer->slave_addr > 0x7F || +#endif xfer->reg.width < 1 || xfer->reg.width > 2 || xfer->reg.addr > ((1<<(8*xfer->reg.width))-1) || xfer->data.count < 1 ||