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 dde7c6a..4afc858 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;