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>
struct property *prop;
__be32 *val;
uint32_t asize;
+#ifdef CONFIG_OF
unsigned int i;
+#endif
int rval;
if (!dev->of_node)
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,