summaryrefslogtreecommitdiff
path: root/drivers/media/i2c/smiapp
diff options
context:
space:
mode:
authorSakari Ailus <sakari.ailus@linux.intel.com>2017-08-29 09:41:25 -0300
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2017-10-04 17:25:26 -0300
commitccec44cc910d1fa94690e0b9f07194be3421cb1a (patch)
treef9c5486a56866de795121e0acb659531310f6d5a /drivers/media/i2c/smiapp
parentde10c1619c489d1ecaf6b478ef9f5057d946a710 (diff)
[media] smiapp: Make clock control optional
The clock control is not explicitly controlled by the driver in two cases: ACPI based systems and when the clock is part of the power sequence of the camera module. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/i2c/smiapp')
-rw-r--r--drivers/media/i2c/smiapp/smiapp-core.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/media/i2c/smiapp/smiapp-core.c b/drivers/media/i2c/smiapp/smiapp-core.c
index 009b5e26204b..fbd851be51d2 100644
--- a/drivers/media/i2c/smiapp/smiapp-core.c
+++ b/drivers/media/i2c/smiapp/smiapp-core.c
@@ -2892,7 +2892,10 @@ static int smiapp_probe(struct i2c_client *client,
}
sensor->ext_clk = devm_clk_get(&client->dev, NULL);
- if (IS_ERR(sensor->ext_clk)) {
+ if (PTR_ERR(sensor->ext_clk) == -ENOENT) {
+ dev_info(&client->dev, "no clock defined, continuing...\n");
+ sensor->ext_clk = NULL;
+ } else if (IS_ERR(sensor->ext_clk)) {
dev_err(&client->dev, "could not get clock (%ld)\n",
PTR_ERR(sensor->ext_clk));
return -EPROBE_DEFER;