static int dm_test_devm_regmap(struct unit_test_state *uts)
{
int i = 0;
- u16 val;
- void *valp = &val;
+ uint val;
u16 pattern[REGMAP_TEST_BUF_SZ];
u16 *buffer;
struct udevice *dev;
ut_assertok(regmap_write(priv->cfg_regmap, i, pattern[i]));
}
for (i = 0; i < REGMAP_TEST_BUF_SZ; i++) {
- ut_assertok(regmap_read(priv->cfg_regmap, i, valp));
+ ut_assertok(regmap_read(priv->cfg_regmap, i, &val));
ut_asserteq(val, buffer[i]);
ut_asserteq(val, pattern[i]);
}
ut_asserteq(-ERANGE, regmap_write(priv->cfg_regmap, REGMAP_TEST_BUF_SZ,
val));
ut_asserteq(-ERANGE, regmap_read(priv->cfg_regmap, REGMAP_TEST_BUF_SZ,
- valp));
+ &val));
ut_asserteq(-ERANGE, regmap_write(priv->cfg_regmap, -1, val));
- ut_asserteq(-ERANGE, regmap_read(priv->cfg_regmap, -1, valp));
+ ut_asserteq(-ERANGE, regmap_read(priv->cfg_regmap, -1, &val));
return 0;
}