From patchwork Thu Jul 6 09:05:45 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Arvind Yadav X-Patchwork-Id: 9827765 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 EC8B1602CA for ; Thu, 6 Jul 2017 09:06:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DE7CD2858E for ; Thu, 6 Jul 2017 09:06:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D1FCD28600; Thu, 6 Jul 2017 09:06:08 +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 6D9072858E for ; Thu, 6 Jul 2017 09:06:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751070AbdGFJGH (ORCPT ); Thu, 6 Jul 2017 05:06:07 -0400 Received: from mail-pg0-f65.google.com ([74.125.83.65]:35642 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750970AbdGFJGF (ORCPT ); Thu, 6 Jul 2017 05:06:05 -0400 Received: by mail-pg0-f65.google.com with SMTP id d193so2095108pgc.2; Thu, 06 Jul 2017 02:06:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=62AiUST6g6bqqR/GpvjXsEntOjU3RubDYLkRJjX1xo8=; b=irOJIhnrkFr6zxD9K7RbQIVBUmUztv+YqvwUeTw4Nu7IRY9lZQerIT0aGHx5kHcELo WVVHpHV1oCID7ehc+kgrZn7maTQXSauHxMlGiM6upwUa4gN2x1LwoY7Wi5VatNAylhGD 17agj8WQ8jJXFyEVrIaGhjeu82PpNrI0/3gQlllfSG2hZFXQJ5tC2r+K6JoH4hr1Zjno 4rz6GnPLoPLcnSffrTZ3DwqkX1CSpSnYyHw4yQOd825VtXQ9o6yCXRCFznSDh/bSDWJc bc7wvHhwttSuMfMJQgtaPeycbgu+DnzzYBinfTefss+9cUqB6JSzFe6MW0GGqXXHmsI6 EY7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=62AiUST6g6bqqR/GpvjXsEntOjU3RubDYLkRJjX1xo8=; b=UHUeF9xNsj9B4vC/1CkSBCfTUS5MR0CEF0UT3bOmT/HHmK8L1DpRLdqsL0c+5v7Pv9 8KlGJIKihIbnTQ4PLH/13gafdVgLPhzP7QOv9dpMm+3HxW1JYsL5/B85xf15gSP3dvaQ pFoMOz9sTaHIEzwUUIz206y5KXwlPKQfZwo8C5f0VEx2Kcnt9F172DP9uk0ED1hZjc5+ EC/dvc7oaVMFN1tJVMCG2j2ksjCXrt3kx8+J32VK+7x0Xo9pzv8108IqgwemNLzsup8C m09rPAxWfqb4UDwpROMxfC4dc7lJ4dQDUfl7KzbtJkokX45PKmIyxBlqqDEh4mtcP5ac fnBw== X-Gm-Message-State: AIVw112Z/NrNabYwpCBfHT67UUUb8Co6Bg6DsYqYws1LzsEmPvhDrWPF ay8LkpHV3kUxAw== X-Received: by 10.98.15.71 with SMTP id x68mr12688534pfi.176.1499331964984; Thu, 06 Jul 2017 02:06:04 -0700 (PDT) Received: from symbol-HP-Z420-Workstation.zebra.lan ([223.31.70.102]) by smtp.googlemail.com with ESMTPSA id d185sm2340940pgc.39.2017.07.06.02.06.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 06 Jul 2017 02:06:04 -0700 (PDT) From: Arvind Yadav To: dmitry.torokhov@gmail.com, benjamin.tissoires@redhat.com Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] input: rmi4: Fix redefinition error on compilation. Date: Thu, 6 Jul 2017 14:35:45 +0530 Message-Id: X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 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 If CONFIG_RMI4_F34 is disable, it'll through compilation error. drivers/input/rmi4/rmi_f34.c:594:5: error: redefinition of ‘rmi_f34_create_sysfs’ int rmi_f34_create_sysfs(struct rmi_device *rmi_dev) ^ In file included from drivers/input/rmi4/rmi_f34.c:17:0: drivers/input/rmi4/rmi_driver.h:127:19: note: previous definition of ‘rmi_f34_create_sysfs’ was here static inline int rmi_f34_create_sysfs(struct rmi_device *rmi_dev) ^ drivers/input/rmi4/rmi_f34.c:599:6: error: redefinition of ‘rmi_f34_remove_sysfs’ void rmi_f34_remove_sysfs(struct rmi_device *rmi_dev) ^ In file included from drivers/input/rmi4/rmi_f34.c:17:0: drivers/input/rmi4/rmi_driver.h:132:20: note: previous definition of ‘rmi_f34_remove_sysfs’ was here static inline void rmi_f34_remove_sysfs(struct rmi_device *rmi_dev) Signed-off-by: Arvind Yadav --- drivers/input/rmi4/rmi_f34.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/input/rmi4/rmi_f34.c b/drivers/input/rmi4/rmi_f34.c index 4cfe970..0f9b905 100644 --- a/drivers/input/rmi4/rmi_f34.c +++ b/drivers/input/rmi4/rmi_f34.c @@ -590,7 +590,7 @@ static int rmi_f34_probe(struct rmi_function *fn) return 0; } - +#ifdef CONFIG_RMI4_F34 int rmi_f34_create_sysfs(struct rmi_device *rmi_dev) { return sysfs_create_group(&rmi_dev->dev.kobj, &rmi_firmware_attr_group); @@ -600,7 +600,7 @@ void rmi_f34_remove_sysfs(struct rmi_device *rmi_dev) { sysfs_remove_group(&rmi_dev->dev.kobj, &rmi_firmware_attr_group); } - +#endif struct rmi_function_handler rmi_f34_handler = { .driver = { .name = "rmi4_f34",