Skip to content

Commit

Permalink
media: fix s3 issue patch 3
Browse files Browse the repository at this point in the history
Signed-off-by: jiabinhe <jiabin.he@intel.com>
  • Loading branch information
onceforall committed Nov 11, 2024
1 parent 983e2e0 commit 5fcf0c4
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion drivers/media/i2c/ti960-des.c
Original file line number Diff line number Diff line change
Expand Up @@ -904,7 +904,11 @@ static int ti960_registered(struct v4l2_subdev *subdev)
if (rval)
continue;

reset_sensor(va, &va->sub_devs[k], &va->subdev_pdata[k]);
rval = reset_sensor(va, &va->sub_devs[k], &va->subdev_pdata[k]);
if (rval) {
dev_err(va->sd.dev, "sensor failed to reset.\n");
return rval;
}

/* Map slave I2C address. */
rval = ti960_map_i2c_slave(va, &va->sub_devs[k],
Expand Down Expand Up @@ -1935,6 +1939,12 @@ static int ti960_resume(struct device *dev)
rval = ti960_config_ser(va, client, i, sensor_subdev, pdata);
if (rval)
dev_warn(va->sd.dev, "resume: failed config subdev");

rval = reset_sensor(va, &va->sub_devs[i], &va->subdev_pdata[i]);
if (rval) {
dev_err(va->sd.dev, "sensor failed to reset.\n");
return rval;
}
}

return 0;
Expand Down

0 comments on commit 5fcf0c4

Please sign in to comment.