• Andy Shevchenko's avatar
    gpio: pca953x: enfore type for i2c_smbus_write_word_data() · c4d1cbd7
    Andy Shevchenko authored
    The commit 9b8e3ec3 ("gpio: pca953x: Use correct u16 value for register
    word write") fixed regression in pca953x_write_regs(). At the same time the
    solution introduced a sparse warning:
    
    drivers/gpio/gpio-pca953x.c:168:39: warning: incorrect type in argument 3 (different base types)
    drivers/gpio/gpio-pca953x.c:168:39:    expected unsigned short [unsigned] [usertype] value
    drivers/gpio/gpio-pca953x.c:168:39:    got restricted __le16 [usertype] <noident>
    
    Fix the code by enforcing the type of i2c_smbus_write_word_data() parameter.
    
    Cc: Yong Li <sdliyong@gmail.com>
    Cc: Phil Reid <preid@electromag.com.au>
    Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
    Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
    c4d1cbd7
gpio-pca953x.c 22.2 KB