Skip to content

Commit

Permalink
gpio: wcove: Allow return negative error code from to_reg()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Andy Shevchenko committed Feb 8, 2019
1 parent fcce88d commit 282db90
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpio/gpio-wcove.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 282db90

Please sign in to comment.