]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
gpio: wcove: Allow return negative error code from to_reg()
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Tue, 29 Jan 2019 18:37:28 +0000 (20:37 +0200)
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Fri, 8 Feb 2019 13:55:38 +0000 (15:55 +0200)
The type of to_reg() is unsigned int while it might return
a negative error code. Callers are also expecting a signed type.

For sake of type consistency replace unsigned int with plain int.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
drivers/gpio/gpio-wcove.c

index dde7c6aecbb5e564e4975b9044abab785145013c..4afc8580ecd7a23b3c08f522055b2c1ebccbe2ee 100644 (file)
@@ -105,7 +105,7 @@ struct wcove_gpio {
        bool set_irq_mask;
 };
 
-static inline unsigned int to_reg(int gpio, enum ctrl_register reg_type)
+static inline int to_reg(int gpio, enum ctrl_register reg_type)
 {
        unsigned int reg;