Skip to content

Commit cb88d73

Browse files
Sakari Ailusmchehab
Sakari Ailus
authored andcommitted
[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 <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
1 parent 8d44aee commit cb88d73

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/media/i2c/smiapp/smiapp-core.c

+4
Original file line numberDiff line numberDiff line change
@@ -2980,7 +2980,9 @@ static struct smiapp_platform_data *smiapp_get_pdata(struct device *dev)
29802980
struct property *prop;
29812981
__be32 *val;
29822982
uint32_t asize;
2983+
#ifdef CONFIG_OF
29832984
unsigned int i;
2985+
#endif
29842986
int rval;
29852987

29862988
if (!dev->of_node)
@@ -3057,8 +3059,10 @@ static struct smiapp_platform_data *smiapp_get_pdata(struct device *dev)
30573059
if (IS_ERR(val))
30583060
goto out_err;
30593061

3062+
#ifdef CONFIG_OF
30603063
for (i = 0; i < asize; i++)
30613064
pdata->op_sys_clock[i] = of_read_number(val + i * 2, 2);
3065+
#endif
30623066

30633067
for (; asize > 0; asize--)
30643068
dev_dbg(dev, "freq %d: %lld\n", asize - 1,

0 commit comments

Comments
 (0)