From patchwork Tue Jan 22 15:12:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Slaby X-Patchwork-Id: 10775667 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0039D139A for ; Tue, 22 Jan 2019 15:12:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E1DC12AC63 for ; Tue, 22 Jan 2019 15:12:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DF5472AF76; Tue, 22 Jan 2019 15:12:13 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7F7FA2AF83 for ; Tue, 22 Jan 2019 15:12:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729076AbfAVPMH (ORCPT ); Tue, 22 Jan 2019 10:12:07 -0500 Received: from mx2.suse.de ([195.135.220.15]:58398 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728961AbfAVPMG (ORCPT ); Tue, 22 Jan 2019 10:12:06 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 621C1B04F; Tue, 22 Jan 2019 15:12:05 +0000 (UTC) From: Jiri Slaby To: thomas@winischhofer.net Cc: gregkh@linuxfoundation.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Jiri Slaby Subject: [PATCH 3/4] sisusb: let files build only when needed Date: Tue, 22 Jan 2019 16:12:01 +0100 Message-Id: <20190122151202.18152-3-jslaby@suse.cz> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190122151202.18152-1-jslaby@suse.cz> References: <20190122151202.18152-1-jslaby@suse.cz> MIME-Version: 1.0 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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 6ed3a638261a..6551bce68ac5 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 10c15723a7c5..8e6d1b02e7c2 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 0f7170f5b53f..66f6ab5acd97 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 */