Browse Source

MLK-16289 pca953x_gpio: Fix build warning

Fix uild warning below introduced by
commit: cb20ff23c8

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: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit b857d65ddd)
Ye Li 3 years ago
parent
commit
a93e41b73a
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      drivers/gpio/pca953x_gpio.c

+ 1
- 1
drivers/gpio/pca953x_gpio.c View File

@ -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;


Loading…
Cancel
Save