Commit cb88d738 authored by Sakari Ailus's avatar Sakari Ailus Committed by Mauro Carvalho Chehab

[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: default avatarSakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent 8d44aeef
...@@ -2980,7 +2980,9 @@ static struct smiapp_platform_data *smiapp_get_pdata(struct device *dev) ...@@ -2980,7 +2980,9 @@ static struct smiapp_platform_data *smiapp_get_pdata(struct device *dev)
struct property *prop; struct property *prop;
__be32 *val; __be32 *val;
uint32_t asize; uint32_t asize;
#ifdef CONFIG_OF
unsigned int i; unsigned int i;
#endif
int rval; int rval;
if (!dev->of_node) if (!dev->of_node)
...@@ -3057,8 +3059,10 @@ static struct smiapp_platform_data *smiapp_get_pdata(struct device *dev) ...@@ -3057,8 +3059,10 @@ static struct smiapp_platform_data *smiapp_get_pdata(struct device *dev)
if (IS_ERR(val)) if (IS_ERR(val))
goto out_err; goto out_err;
#ifdef CONFIG_OF
for (i = 0; i < asize; i++) for (i = 0; i < asize; i++)
pdata->op_sys_clock[i] = of_read_number(val + i * 2, 2); pdata->op_sys_clock[i] = of_read_number(val + i * 2, 2);
#endif
for (; asize > 0; asize--) for (; asize > 0; asize--)
dev_dbg(dev, "freq %d: %lld\n", asize - 1, dev_dbg(dev, "freq %d: %lld\n", asize - 1,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment