Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Michael Grzeschik and committed by
Greg Kroah-Hartman
0349fdab 430d57f5

+1 -4
+1 -4
drivers/usb/gadget/udc/at91_udc.c
··· 1628 1628 1629 1629 static void at91rm9200_udc_pullup(struct at91_udc *udc, int is_on) 1630 1630 { 1631 - if (is_on) 1632 - gpiod_set_value(udc->board.pullup_pin, 1); 1633 - else 1634 - gpiod_set_value(udc->board.pullup_pin, 0); 1631 + gpiod_set_value(udc->board.pullup_pin, is_on); 1635 1632 } 1636 1633 1637 1634 static const struct at91_udc_caps at91rm9200_udc_caps = {