diff options
author | Michael Grzeschik <m.grzeschik@pengutronix.de> | 2022-11-04 22:55:13 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-11-09 11:43:11 +0100 |
commit | 0349fdab2ff0673cc3c3f300316522d4f2bb1af9 (patch) | |
tree | c725309578c88385e959fad1846e58aea250021c /drivers/usb | |
parent | usb: core: stop USB enumeration if too many retries (diff) | |
download | linux-0349fdab2ff0673cc3c3f300316522d4f2bb1af9.tar.xz linux-0349fdab2ff0673cc3c3f300316522d4f2bb1af9.zip |
usb: gadget: at91-udc: simplify at91rm9200_udc_pullup callback
Just simplify the use of is_on and get rid of superfluous condition.
Cc: gregkh@linuxfoundation.org
Cc: nicolas.ferre@microchip.com
Cc: alexandre.belloni@bootlin.com
Cc: linux-usb@vger.kernel.org
Cc: kernel@pengutronix.de
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Link: https://lore.kernel.org/r/20221104215516.2874922-2-m.grzeschik@pengutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/gadget/udc/at91_udc.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/usb/gadget/udc/at91_udc.c b/drivers/usb/gadget/udc/at91_udc.c index a9a7b3fc60ec..922b4187004b 100644 --- a/drivers/usb/gadget/udc/at91_udc.c +++ b/drivers/usb/gadget/udc/at91_udc.c @@ -1628,10 +1628,7 @@ static int at91rm9200_udc_init(struct at91_udc *udc) static void at91rm9200_udc_pullup(struct at91_udc *udc, int is_on) { - if (is_on) - gpiod_set_value(udc->board.pullup_pin, 1); - else - gpiod_set_value(udc->board.pullup_pin, 0); + gpiod_set_value(udc->board.pullup_pin, is_on); } static const struct at91_udc_caps at91rm9200_udc_caps = { |