Skip to content

Commit

Permalink
usb: gadget: use IS_ENABLED() instead of checking for built-in or module
Browse files Browse the repository at this point in the history
The IS_ENABLED() macro checks if a Kconfig symbol has been enabled either
built-in or as a module, use that macro instead of open coding the same.

Using the macro makes the code more readable by helping abstract away some
of the Kconfig built-in and module enable details.

Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Acked-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Javier Martinez Canillas authored and Greg Kroah-Hartman committed Sep 2, 2016
1 parent f7b7f37 commit 3112fdd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/usb/gadget/udc/omap_udc.c
Original file line number Diff line number Diff line change
Expand Up @@ -2875,7 +2875,7 @@ static int omap_udc_probe(struct platform_device *pdev)
xceiv = NULL;
/* "udc" is now valid */
pullup_disable(udc);
#if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE)
#if IS_ENABLED(CONFIG_USB_OHCI_HCD)
udc->gadget.is_otg = (config->otg != 0);
#endif

Expand Down

0 comments on commit 3112fdd

Please sign in to comment.