From patchwork Tue Feb 23 21:25:44 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Ricard X-Patchwork-Id: 8396351 Return-Path: X-Original-To: patchwork-tpmdd-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 7CE379FC33 for ; Tue, 23 Feb 2016 21:26:17 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8F2F220212 for ; Tue, 23 Feb 2016 21:26:16 +0000 (UTC) Received: from lists.sourceforge.net (lists.sourceforge.net [216.34.181.88]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 69E14202AE for ; Tue, 23 Feb 2016 21:26:15 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=sfs-ml-3.v29.ch3.sourceforge.com) by sfs-ml-3.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1aYKTF-0003ra-Vt; Tue, 23 Feb 2016 21:26:13 +0000 Received: from sog-mx-2.v43.ch3.sourceforge.com ([172.29.43.192] helo=mx.sourceforge.net) by sfs-ml-3.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1aYKTF-0003rS-5A for tpmdd-devel@lists.sourceforge.net; Tue, 23 Feb 2016 21:26:13 +0000 Received-SPF: pass (sog-mx-2.v43.ch3.sourceforge.com: domain of gmail.com designates 74.125.82.53 as permitted sender) client-ip=74.125.82.53; envelope-from=christophe.ricard@gmail.com; helo=mail-wm0-f53.google.com; Received: from mail-wm0-f53.google.com ([74.125.82.53]) by sog-mx-2.v43.ch3.sourceforge.com with esmtps (TLSv1:RC4-SHA:128) (Exim 4.76) id 1aYKTE-000523-Bk for tpmdd-devel@lists.sourceforge.net; Tue, 23 Feb 2016 21:26:13 +0000 Received: by mail-wm0-f53.google.com with SMTP id c200so241314817wme.0 for ; Tue, 23 Feb 2016 13:26:12 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=mNm1Wqz424IYQa5ouxZZWG8x5csFc6KfINLg4HuVVMY=; b=GVTrqm3f9VDFds0g+9HsBdewOcKWWcPjtSTbedI4/WhYorZx9S7APa4JXnWKRy/thK KjhuaT1QzZFZcxDM9vzCWbSvHrRb/mSKvpahiJX3rDwlgUZBqOHXyJL3U/R7xfwSqEQa 8UJCORlCNaGJHba/F8/KWfRrS/i53uh+iL2p5phiLYqR2hlAISlLxsuLqv7Rj9diGVZc K/0/hZgYmnoNRqgcir4yE0MhDjwslcc4mrO28RpnEhQTWAMDSB32s2UM/EnS0t/lSoiP lnlmR+p9DA2aOFXZ6l5NVvuwZ9WjgVu/MRs96+QLY5OuuzFUzvvesiSPO2iPYxdIOdnC h7nA== X-Gm-Message-State: AG10YORIdC+dYd+ipnZP6/1pENwf1DzD1nVfmZ4RaHSGHGSzMrNaN+8NeAtyWp8KbAWUSg== X-Received: by 10.194.209.204 with SMTP id mo12mr39446883wjc.69.1456262766379; Tue, 23 Feb 2016 13:26:06 -0800 (PST) Received: from localhost.localdomain (ax113-6-78-236-204-66.fbx.proxad.net. [78.236.204.66]) by smtp.gmail.com with ESMTPSA id v1sm31448264wjf.49.2016.02.23.13.26.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 23 Feb 2016 13:26:05 -0800 (PST) From: Christophe Ricard X-Google-Original-From: Christophe Ricard To: jarkko.sakkinen@linux.intel.com, peterhuewe@gmx.de Date: Tue, 23 Feb 2016 22:25:44 +0100 Message-Id: <1456262751-12096-6-git-send-email-christophe-h.ricard@st.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1456262751-12096-1-git-send-email-christophe-h.ricard@st.com> References: <1456262751-12096-1-git-send-email-christophe-h.ricard@st.com> X-Spam-Score: -1.6 (-) X-Headers-End: 1aYKTE-000523-Bk Cc: jean-luc.blanc@st.com, ashley@ashleylai.com, christophe.ricard@gmail.com, tpmdd-devel@lists.sourceforge.net, christophe-h.ricard@st.com, benoit.houyere@st.com Subject: [tpmdd-devel] [PATCH v3 05/12] tpm/st33zp24: Remove unneeded CONFIG_OF switches X-BeenThere: tpmdd-devel@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: Tpm Device Driver maintainance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: tpmdd-devel-bounces@lists.sourceforge.net X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,HK_RANDOM_ENVFROM,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP DT headers already define NOOP routines when CONFIG_OF is not defined. [jarkko.sakkinen@linux.intel.com: I tested that the driver compiles without warnings and errors with and without CONFIG_OF flag.] Reviewed-by: Jarkko Sakkinen Signed-off-by: Christophe Ricard Tested-by: Jarkko Sakkinen --- drivers/char/tpm/st33zp24/i2c.c | 9 --------- drivers/char/tpm/st33zp24/spi.c | 9 --------- 2 files changed, 18 deletions(-) diff --git a/drivers/char/tpm/st33zp24/i2c.c b/drivers/char/tpm/st33zp24/i2c.c index 309d276..a05fbd8 100644 --- a/drivers/char/tpm/st33zp24/i2c.c +++ b/drivers/char/tpm/st33zp24/i2c.c @@ -108,7 +108,6 @@ static const struct st33zp24_phy_ops i2c_phy_ops = { .recv = st33zp24_i2c_recv, }; -#ifdef CONFIG_OF static int st33zp24_i2c_of_request_resources(struct st33zp24_i2c_phy *phy) { struct device_node *pp; @@ -146,12 +145,6 @@ static int st33zp24_i2c_of_request_resources(struct st33zp24_i2c_phy *phy) return 0; } -#else -static int st33zp24_i2c_of_request_resources(struct st33zp24_i2c_phy *phy) -{ - return -ENODEV; -} -#endif static int st33zp24_i2c_request_resources(struct i2c_client *client, struct st33zp24_i2c_phy *phy) @@ -245,13 +238,11 @@ static const struct i2c_device_id st33zp24_i2c_id[] = { }; MODULE_DEVICE_TABLE(i2c, st33zp24_i2c_id); -#ifdef CONFIG_OF static const struct of_device_id of_st33zp24_i2c_match[] = { { .compatible = "st,st33zp24-i2c", }, {} }; MODULE_DEVICE_TABLE(of, of_st33zp24_i2c_match); -#endif static SIMPLE_DEV_PM_OPS(st33zp24_i2c_ops, st33zp24_pm_suspend, st33zp24_pm_resume); diff --git a/drivers/char/tpm/st33zp24/spi.c b/drivers/char/tpm/st33zp24/spi.c index f851053..08e6bf5 100644 --- a/drivers/char/tpm/st33zp24/spi.c +++ b/drivers/char/tpm/st33zp24/spi.c @@ -222,7 +222,6 @@ static const struct st33zp24_phy_ops spi_phy_ops = { .recv = st33zp24_spi_recv, }; -#ifdef CONFIG_OF static int st33zp24_spi_of_request_resources(struct st33zp24_spi_phy *phy) { struct device_node *pp; @@ -260,12 +259,6 @@ static int st33zp24_spi_of_request_resources(struct st33zp24_spi_phy *phy) return 0; } -#else -static int st33zp24_spi_of_request_resources(struct st33zp24_spi_phy *phy) -{ - return -ENODEV; -} -#endif static int st33zp24_spi_request_resources(struct spi_device *dev, struct st33zp24_spi_phy *phy) @@ -358,13 +351,11 @@ static const struct spi_device_id st33zp24_spi_id[] = { }; MODULE_DEVICE_TABLE(spi, st33zp24_spi_id); -#ifdef CONFIG_OF static const struct of_device_id of_st33zp24_spi_match[] = { { .compatible = "st,st33zp24-spi", }, {} }; MODULE_DEVICE_TABLE(of, of_st33zp24_spi_match); -#endif static SIMPLE_DEV_PM_OPS(st33zp24_spi_ops, st33zp24_pm_suspend, st33zp24_pm_resume);