Commit 1b47b1aa authored by Ye Li's avatar Ye Li Committed by Jason Liu

MLK-16289 pca953x_gpio: Fix build warning

Fix uild warning below introduced by
commit: cb20ff23c83b80b4115c8a44ea436cb6b40429f1

drivers/gpio/pca953x_gpio.c: In function ‘pca953x_probe’:
drivers/gpio/pca953x_gpio.c:325:48: warning: passing argument 3 of
‘pca953x_write_regs’ from incompatible pointer type [-Wincompatible-pointer-types]
  ret = pca953x_write_regs(dev, PCA953X_INVERT, &val);
                                                ^
drivers/gpio/pca953x_gpio.c:135:12: note: expected ‘u8 * {aka unsigned char *}’
but argument is of type ‘u8 (*)[5] {aka unsigned char (*)[5]}’
 static int pca953x_write_regs(struct udevice *dev, int reg, u8 *val)
Signed-off-by: 's avatarYe Li <ye.li@nxp.com>
Reviewed-by: 's avatarPeng Fan <peng.fan@nxp.com>
parent 7cf2e553
......@@ -322,7 +322,7 @@ static int pca953x_probe(struct udevice *dev)
/* Clear the polarity registers to no invert */
memset(val, 0, MAX_BANK);
ret = pca953x_write_regs(dev, PCA953X_INVERT, &val);
ret = pca953x_write_regs(dev, PCA953X_INVERT, val);
if (ret) {
dev_err(dev, "Error writing invert register\n");
return ret;
......
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