From aa00a46cb9f59d2db507ece82e2a5a402c2775d1 Mon Sep 17 00:00:00 2001 From: Jack Pham Date: Thu, 25 Feb 2016 18:53:05 -0800 Subject: usb: diag: Fix build error if CONFIG_USB_F_DIAG=m Instead of #ifdef, use the IS_ENABLED() macro which correctly handles if the Kconfig symbol is built-in (=y) or a module (=m). Also add missing MODULE_LICENSE and MODULE_DESCRIPTION to f_diag.c to allow building as a module. Signed-off-by: Jack Pham --- include/linux/usb/usbdiag.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/linux') diff --git a/include/linux/usb/usbdiag.h b/include/linux/usb/usbdiag.h index 1e9fa761579a..f66762800368 100644 --- a/include/linux/usb/usbdiag.h +++ b/include/linux/usb/usbdiag.h @@ -49,7 +49,7 @@ struct usb_diag_ch { void *priv_usb; }; -#ifdef CONFIG_USB_F_DIAG +#if IS_ENABLED(CONFIG_USB_F_DIAG) int usb_diag_request_size(struct usb_diag_ch *ch); struct usb_diag_ch *usb_diag_open(const char *name, void *priv, void (*notify)(void *, unsigned, struct diag_request *)); @@ -81,5 +81,5 @@ int usb_diag_write(struct usb_diag_ch *ch, struct diag_request *d_req) { return -ENODEV; } -#endif /* CONFIG_USB_G_ANDROID */ +#endif /* CONFIG_USB_F_DIAG */ #endif /* _DRIVERS_USB_DIAG_H_ */ -- cgit v1.2.3