From 0277531df26ff75f010882ad820ca83e35935a2f Mon Sep 17 00:00:00 2001 From: Jiri Slaby Date: Tue, 22 Jan 2019 16:12:01 +0100 Subject: [PATCH] usb: sisusb: let files build only when needed After the previous patch we see, that whole files are ifdeffed depending on CONFIG options. So do not build the files at all if the CONFIG is not enabled. (I.e. move the check from .c to Makefile.) Signed-off-by: Jiri Slaby Signed-off-by: Greg Kroah-Hartman --- drivers/usb/misc/sisusbvga/Makefile | 3 ++- drivers/usb/misc/sisusbvga/sisusb_con.c | 7 ------- drivers/usb/misc/sisusbvga/sisusb_init.c | 5 ----- 3 files changed, 2 insertions(+), 13 deletions(-) diff --git a/drivers/usb/misc/sisusbvga/Makefile b/drivers/usb/misc/sisusbvga/Makefile index 6ed3a63..6551bce 100644 --- a/drivers/usb/misc/sisusbvga/Makefile +++ b/drivers/usb/misc/sisusbvga/Makefile @@ -5,4 +5,5 @@ obj-$(CONFIG_USB_SISUSBVGA) += sisusbvga.o -sisusbvga-y := sisusb.o sisusb_init.o sisusb_con.o +sisusbvga-y := sisusb.o +sisusbvga-$(CONFIG_USB_SISUSBVGA_CON) += sisusb_con.o sisusb_init.o diff --git a/drivers/usb/misc/sisusbvga/sisusb_con.c b/drivers/usb/misc/sisusbvga/sisusb_con.c index 10c1572..8e6d1b0 100644 --- a/drivers/usb/misc/sisusbvga/sisusb_con.c +++ b/drivers/usb/misc/sisusbvga/sisusb_con.c @@ -70,8 +70,6 @@ #include "sisusb.h" #include "sisusb_init.h" -#ifdef CONFIG_USB_SISUSBVGA_CON - #define sisusbcon_writew(val, addr) (*(addr) = (val)) #define sisusbcon_readw(addr) (*(addr)) #define sisusbcon_memmovew(d, s, c) memmove(d, s, c) @@ -1534,8 +1532,3 @@ void __init sisusb_init_concode(void) for (i = 0; i < MAX_NR_CONSOLES; i++) mysisusbs[i] = NULL; } - -#endif /* INCL_CON */ - - - diff --git a/drivers/usb/misc/sisusbvga/sisusb_init.c b/drivers/usb/misc/sisusbvga/sisusb_init.c index 0f7170f..66f6ab5 100644 --- a/drivers/usb/misc/sisusbvga/sisusb_init.c +++ b/drivers/usb/misc/sisusbvga/sisusb_init.c @@ -44,9 +44,6 @@ #include #include "sisusb.h" - -#ifdef CONFIG_USB_SISUSBVGA_CON - #include "sisusb_init.h" /*********************************************/ @@ -955,5 +952,3 @@ int SiSUSBSetVESAMode(struct SiS_Private *SiS_Pr, unsigned short VModeNo) return SiSUSBSetMode(SiS_Pr, ModeNo); } - -#endif /* CONFIG_USB_SISUSBVGA_CON */ -- 2.7.4