summaryrefslogtreecommitdiff
path: root/drivers/media
diff options
context:
space:
mode:
authorSakari Ailus <sakari.ailus@linux.intel.com>2023-04-06 19:41:03 +0300
committerHans Verkuil <hverkuil-cisco@xs4all.nl>2023-04-11 18:54:02 +0200
commitc31d11e3878e1437a33dae18f31b0ed0dca6a477 (patch)
tree141da75d62393a9bb9343bba7ff0ed4afccdc819 /drivers/media
parent2bef63370bbad0b356d346aad19981e08d2b7776 (diff)
media: ccs: Apply module manufacturer hack on non-CCS devices only
Some modules don't have any model identification information in the register address space. The driver as a SMIA++ driver attempted to use sensor information in this case. This workaround is definitely not for CCS devices. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/i2c/ccs/ccs-core.c25
1 files changed, 12 insertions, 13 deletions
diff --git a/drivers/media/i2c/ccs/ccs-core.c b/drivers/media/i2c/ccs/ccs-core.c
index 4adb2da34066..20c3974f5ac7 100644
--- a/drivers/media/i2c/ccs/ccs-core.c
+++ b/drivers/media/i2c/ccs/ccs-core.c
@@ -2894,19 +2894,18 @@ static int ccs_identify_module(struct ccs_sensor *sensor)
"smia version %2.2d smiapp version %2.2d\n",
minfo->smia_version, minfo->smiapp_version);
minfo->name = SMIAPP_NAME;
- }
-
- /*
- * Some modules have bad data in the lvalues below. Hope the
- * rvalues have better stuff. The lvalues are module
- * parameters whereas the rvalues are sensor parameters.
- */
- if (minfo->sensor_smia_manufacturer_id &&
- !minfo->smia_manufacturer_id && !minfo->model_id) {
- minfo->smia_manufacturer_id =
- minfo->sensor_smia_manufacturer_id;
- minfo->model_id = minfo->sensor_model_id;
- minfo->revision_number = minfo->sensor_revision_number;
+ /*
+ * Some modules have bad data in the lvalues below. Hope the
+ * rvalues have better stuff. The lvalues are module
+ * parameters whereas the rvalues are sensor parameters.
+ */
+ if (minfo->sensor_smia_manufacturer_id &&
+ !minfo->smia_manufacturer_id && !minfo->model_id) {
+ minfo->smia_manufacturer_id =
+ minfo->sensor_smia_manufacturer_id;
+ minfo->model_id = minfo->sensor_model_id;
+ minfo->revision_number = minfo->sensor_revision_number;
+ }
}
for (i = 0; i < ARRAY_SIZE(ccs_module_idents); i++) {