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

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 <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Jiri Slaby and committed by
Greg Kroah-Hartman
0277531d 022e468e

+2 -13
+2 -1
drivers/usb/misc/sisusbvga/Makefile
··· 5 5 6 6 obj-$(CONFIG_USB_SISUSBVGA) += sisusbvga.o 7 7 8 - sisusbvga-y := sisusb.o sisusb_init.o sisusb_con.o 8 + sisusbvga-y := sisusb.o 9 + sisusbvga-$(CONFIG_USB_SISUSBVGA_CON) += sisusb_con.o sisusb_init.o
-7
drivers/usb/misc/sisusbvga/sisusb_con.c
··· 70 70 #include "sisusb.h" 71 71 #include "sisusb_init.h" 72 72 73 - #ifdef CONFIG_USB_SISUSBVGA_CON 74 - 75 73 #define sisusbcon_writew(val, addr) (*(addr) = (val)) 76 74 #define sisusbcon_readw(addr) (*(addr)) 77 75 #define sisusbcon_memmovew(d, s, c) memmove(d, s, c) ··· 1532 1534 for (i = 0; i < MAX_NR_CONSOLES; i++) 1533 1535 mysisusbs[i] = NULL; 1534 1536 } 1535 - 1536 - #endif /* INCL_CON */ 1537 - 1538 - 1539 -
-5
drivers/usb/misc/sisusbvga/sisusb_init.c
··· 44 44 #include <linux/spinlock.h> 45 45 46 46 #include "sisusb.h" 47 - 48 - #ifdef CONFIG_USB_SISUSBVGA_CON 49 - 50 47 #include "sisusb_init.h" 51 48 52 49 /*********************************************/ ··· 952 955 953 956 return SiSUSBSetMode(SiS_Pr, ModeNo); 954 957 } 955 - 956 - #endif /* CONFIG_USB_SISUSBVGA_CON */