summaryrefslogtreecommitdiffstats
path: root/drivers/media/i2c
diff options
context:
space:
mode:
authorSakari Ailus <sakari.ailus@iki.fi>2015-01-27 07:18:49 -0300
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-01-29 17:59:22 -0200
commitcb88d7384e5e05f90c1daa7750bdb467fd026261 (patch)
tree22bf48a86ede61538e5a58d32333313027305451 /drivers/media/i2c
parent8d44aeefcd79e9be3b6db4f37efc7544995b619e (diff)
downloadlinux-cb88d7384e5e05f90c1daa7750bdb467fd026261.tar.gz
linux-cb88d7384e5e05f90c1daa7750bdb467fd026261.tar.bz2
linux-cb88d7384e5e05f90c1daa7750bdb467fd026261.zip
[media] smiapp: Don't compile of_read_number() if CONFIG_OF isn't defined
of_read_number() is defined in of.h but does not return an error code, so that non-of implementation could simply return an error. Temporarily work around this until of_read_number() can be replaced by of_property_read_u64_array(). Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/i2c')
-rw-r--r--drivers/media/i2c/smiapp/smiapp-core.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/media/i2c/smiapp/smiapp-core.c b/drivers/media/i2c/smiapp/smiapp-core.c
index b3c81257e08d..d47eff5d3101 100644
--- a/drivers/media/i2c/smiapp/smiapp-core.c
+++ b/drivers/media/i2c/smiapp/smiapp-core.c
@@ -2980,7 +2980,9 @@ static struct smiapp_platform_data *smiapp_get_pdata(struct device *dev)
struct property *prop;
__be32 *val;
uint32_t asize;
+#ifdef CONFIG_OF
unsigned int i;
+#endif
int rval;
if (!dev->of_node)
@@ -3057,8 +3059,10 @@ static struct smiapp_platform_data *smiapp_get_pdata(struct device *dev)
if (IS_ERR(val))
goto out_err;
+#ifdef CONFIG_OF
for (i = 0; i < asize; i++)
pdata->op_sys_clock[i] = of_read_number(val + i * 2, 2);
+#endif
for (; asize > 0; asize--)
dev_dbg(dev, "freq %d: %lld\n", asize - 1,