Skip to content

Commit

Permalink
USB: serial: cp210x: use bool for registered flag
Browse files Browse the repository at this point in the history
Use bool rather than u8 for the gpio-chip-registered flag.

Signed-off-by: Johan Hovold <johan@kernel.org>
  • Loading branch information
Johan Hovold committed Oct 24, 2016
1 parent cf5276c commit 6b7271d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/usb/serial/cp210x.c
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ struct cp210x_serial_private {
struct gpio_chip gc;
u8 config;
u8 gpio_mode;
u8 gpio_registered;
bool gpio_registered;
#endif
u8 partnum;
};
Expand Down Expand Up @@ -1407,7 +1407,7 @@ static int cp2105_shared_gpio_init(struct usb_serial *serial)

result = gpiochip_add_data(&priv->gc, serial);
if (!result)
priv->gpio_registered = 1;
priv->gpio_registered = true;

return result;
}
Expand All @@ -1418,7 +1418,7 @@ static void cp210x_gpio_remove(struct usb_serial *serial)

if (priv->gpio_registered) {
gpiochip_remove(&priv->gc);
priv->gpio_registered = 0;
priv->gpio_registered = false;
}
}

Expand Down

0 comments on commit 6b7271d

Please sign in to comment.