From patchwork Tue Dec 27 19:34:56 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Torokhov X-Patchwork-Id: 9489835 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 4AAB362AAF for ; Tue, 27 Dec 2016 19:35:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2C71C201BC for ; Tue, 27 Dec 2016 19:35:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1A7372094F; Tue, 27 Dec 2016 19:35:03 +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=-6.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID 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 8E523201BC for ; Tue, 27 Dec 2016 19:35:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932218AbcL0TfB (ORCPT ); Tue, 27 Dec 2016 14:35:01 -0500 Received: from mail-pg0-f67.google.com ([74.125.83.67]:35327 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932211AbcL0TfA (ORCPT ); Tue, 27 Dec 2016 14:35:00 -0500 Received: by mail-pg0-f67.google.com with SMTP id i5so13250305pgh.2; Tue, 27 Dec 2016 11:34:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :user-agent; bh=uu1sJhDTZ+Ro+UPWkxOXscBJD3mMdqHkHJmX8ytdSbo=; b=BB4ekcCu5Z4Ux93sujlgpxGXYJ9tbXnR3IpnYlNQIMRcromsEKf3+9Oa38T+edHAUT gKdEI5l/ELhR2RdpIqSNZ5IB10o/Y4AWv7kBm/2ljE1unYYO5L6LQ3vpvAjIcamfxS+V dXqNvjP0/VqHXx42cVGd/8Ab/zMSJmtxjWb1PJU4eI3WVI1oTAYM9zycWYf3ZT4Vg1zE inbIdFQ4N02SbSiyYW5Tu1MpCuS+YAEa4aNoRdBi/c0GvcHUtLAQId2c0FIlTOtUwDL7 Lj2F9sQgtlFgA82Hpo9zci/Cj2snghue830du5mft3erRe0ReLh8AU2VeOrrWUT/8Wz+ 3+Ew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=uu1sJhDTZ+Ro+UPWkxOXscBJD3mMdqHkHJmX8ytdSbo=; b=gaKyrCsak3q5NYyGPfk+780qbMJf4RbcnHG8qWlkWdGUCtlhmhjn5Javp2oDWjirtL 8qJM/fNg8kNGpgvZdl6RoEYNyZd585dcQTodJabye4oLEUuV/NObO4K+94YIr8IItT1E kP43+/EJEaFCxeIlITkiMAlycg+Dqkfa8PrklqvD4ndTsJ6p43vKQLJlV2uQMSPBDehW AQggpKSrCCfk/vRAvZS57Zk+HeVuGtpQCSUSf8rkhReH1+tqHT/+J2NRTIfkzBrXwBUR 7AuD7nl4pTKYmmvAGFF0nSB8rVZv9yb0W9yldCgNpBWcWIQObEFURUzOmeUbGRGMMNeu UmDw== X-Gm-Message-State: AIkVDXIHVpr6uhi+AEw0Bioct+UISwd3UHowGuEmWK/vtQl0lk86G5P/a/V/546+RqCmVQ== X-Received: by 10.98.217.153 with SMTP id b25mr31387673pfl.77.1482867299500; Tue, 27 Dec 2016 11:34:59 -0800 (PST) Received: from dtor-ws ([2620:0:1000:1311:463:7a72:f2fa:4f4e]) by smtp.gmail.com with ESMTPSA id q27sm91433803pfd.49.2016.12.27.11.34.58 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Tue, 27 Dec 2016 11:34:58 -0800 (PST) Date: Tue, 27 Dec 2016 11:34:56 -0800 From: Dmitry Torokhov To: linux-input@vger.kernel.org Cc: Andrew Duggan , Christopher Heiny , Benjamin Tissoires , Nick Dyer , Guenter Roeck , Lyude Paul , Randy Dunlap , Stephen Rothwell , linux-kernel@vger.kernel.org Subject: [PATCH] Input: synaptics-rmi4 - fix F03 build error when serio is module Message-ID: <20161227193456.GA36223@dtor-ws> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Since F03 is a boolean, "depends" on symbols that can be modules do not work quite right. We can enable F03 if SERIO is built-in or if both RMI core and SERIO core are modules. If SERIO core is module, but RMI is built-in, we'll get: drivers/built-in.o: In function `rmi_f03_attention': rmi_f03.c:(.text+0xf8ef8): undefined reference to `serio_interrupt' rmi_f03.c:(.text+0xf8fbd): undefined reference to `serio_interrupt' drivers/built-in.o: In function `rmi_f03_remove': rmi_f03.c:(.text+0xf9082): undefined reference to `serio_unregister_port' drivers/built-in.o: In function `rmi_f03_probe': rmi_f03.c:(.text+0xf9260): undefined reference to `__serio_register_port' Reported-by: Randy Dunlap Signed-off-by: Dmitry Torokhov Reviewed-by: Guenter Roeck --- drivers/input/rmi4/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/input/rmi4/Kconfig b/drivers/input/rmi4/Kconfig index 30cc627..8993983 100644 --- a/drivers/input/rmi4/Kconfig +++ b/drivers/input/rmi4/Kconfig @@ -41,7 +41,8 @@ config RMI4_SMB config RMI4_F03 bool "RMI4 Function 03 (PS2 Guest)" - depends on RMI4_CORE && SERIO + depends on RMI4_CORE + depends on SERIO=y || RMI4_CORE=SERIO help Say Y here if you want to add support for RMI4 function 03.