Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp4101661imm; Mon, 14 May 2018 02:35:07 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpI0o+PGWrY9913KCR4udAO9hTq/v7uOARx/nAA7cm9vN6pvXMpyg4SGseV4jOZnBVYEwpa X-Received: by 2002:a63:798e:: with SMTP id u136-v6mr357417pgc.91.1526290507176; Mon, 14 May 2018 02:35:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526290507; cv=none; d=google.com; s=arc-20160816; b=nS4TirkDF8cgDZeqySljAlTV02kSl6K6buT3TVLaJ/f5K5uwUgtExfEGh51TwZHYxq Q8bX+3KvGctaqXlvmqbX6GiIBcCPZtLCAfDpXJkaXQNvJoj8sp1VAVjjApIIheP4bi6u yJn5ldE1QG3fLt8EVdTkFEMUPRXQ5wzMKNcar7sTF72CtG4xXM6FCFty9/AcLkAUjK/Z 0n15r+uAQo1nW3B7WHT4UEsciDhXCXypcc/5nFlVX2YhpHqnOeccRhsLUxa0MFIG7kuv 8VzrqjlgwiBdKQFBgktObVrC9G4pqijQVT3mwUq19YNh2S2EW65zffok7q9IhwnivTCI ae2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=IQK0EE3+g5VL0dnuXDpDxkUHpYbpgcYNbWgaH7+sRHQ=; b=HeoW1IcYUJNezOtWHc3H+LSh5TO1HzMNsaiSPw7YO0TWbnsSHtkU20BgyLUobAKwAI uz95yRBSl25E6Nkmt4GM22vKzvvOTxHKZxmFg4402YdPqUWwB2vmj3/wt3IepeFaOxO2 yXsK0sttGNNZXrPGEI213kBGh9H8V7FyVOhgc39DrwZdnlD+8JPIERgMKYxhrVR/erhV ehlleIoPuCeNPJperiADFcPu/COBE0676boBzyTvV2eE0vREdiFtCc1c9/Y/2GkptaY0 0xWrdNkt0FU9kNYHx17XHyzmcmc7w81gmoBs+3D8N9fdJOVyl7qYP/8mSPK3QWbSI1A8 Alug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XG1jEFx7; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 87-v6si9498345pfo.137.2018.05.14.02.34.52; Mon, 14 May 2018 02:35:07 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XG1jEFx7; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752285AbeENJdf (ORCPT + 99 others); Mon, 14 May 2018 05:33:35 -0400 Received: from mail-lf0-f67.google.com ([209.85.215.67]:37336 "EHLO mail-lf0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751449AbeENJdd (ORCPT ); Mon, 14 May 2018 05:33:33 -0400 Received: by mail-lf0-f67.google.com with SMTP id r2-v6so16928829lff.4 for ; Mon, 14 May 2018 02:33:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=IQK0EE3+g5VL0dnuXDpDxkUHpYbpgcYNbWgaH7+sRHQ=; b=XG1jEFx7YtjhJlP66ZHvtECuAYwfUk6KJTmr5lcfCn9ez3dTVCx0Luf6TjE39/3eT9 cgkc/QuKgWFM75NHW2972a8WOHm/hujEH6igK6p+Gj6Y9WlRjfueaUy5YrfKOplKG4ao g8UlhVx6AlAXkt4cxhN99wP6hsfhijnKmWb1Y= 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=IQK0EE3+g5VL0dnuXDpDxkUHpYbpgcYNbWgaH7+sRHQ=; b=Ig0vmcPbqgUn5Zrm3KKfgHl/SoBlNOHlVaqhX1r8Hu0lPPbS614tnk/lQm7QP5jApb aBRTmJCE7u3nZhaCdymUH+qI3cdMBuSJBuKBYTme4YcxVOLdArRrxuX8jsUpXJcdHDo1 SFe59UpnRzVWORDyStwWv6sKw2EQWaJaM68VaZ6hk1X9b7gf/0PAj3XNX7DJV60zv0bR SytXnItRv1qkj1gz4iiIaVfQlX01uXGNAzHGN3zLtCtO+ESkB9Nw0wICpkQzC41+BTCY TpGeqN+VNSK0e/3SHrVXmL6RXJwRt32diCxBfUK+X5aLlGcE/7bgPw7VZs0IZzDXMDWA LDGg== X-Gm-Message-State: ALKqPwcNLghD2ia31XwJSECCJo8oDCD7Dnp9DHEjwxjYFOlR2jzSYPuc d2dAROwQvwUrF9Y3QOibUI0u0+mWrTc= X-Received: by 2002:a19:1303:: with SMTP id j3-v6mr7684312lfi.107.1526290411918; Mon, 14 May 2018 02:33:31 -0700 (PDT) Received: from localhost (c-2c3d70d5.07-21-73746f28.cust.bredbandsbolaget.se. [213.112.61.44]) by smtp.gmail.com with ESMTPSA id k139-v6sm2301803lfg.76.2018.05.14.02.33.30 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 14 May 2018 02:33:31 -0700 (PDT) From: Anders Roxell To: jdelvare@suse.com Cc: linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, Anders Roxell Subject: [PATCH v2] i2c: i801: fix unused-function warning Date: Mon, 14 May 2018 11:33:26 +0200 Message-Id: <20180514093326.30314-1-anders.roxell@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180510152719.6e37b10e@endymion> References: <20180510152719.6e37b10e@endymion> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org With CONFIG_PM, we get a harmless build warning: drivers/i2c/busses/i2c-i801.c:1723:12: warning: ‘i801_resume’ defined but not used [-Wunused-function] static int i801_resume(struct device *dev) ^~~~~~~~~~~ drivers/i2c/busses/i2c-i801.c:1714:12: warning: ‘i801_suspend’ defined but not used [-Wunused-function] static int i801_suspend(struct device *dev) ^~~~~~~~~~~~ Follow design pattern from other drivers like i2c-brcmstb, i2c-mpc, i2c-ocores, i2c-pnx, i2c-puv3, i2c-st, i2c-stu300 and i2c-mux-pca954x and changing the ifdef CONFIG_PM to CONFIG_PM_SLEEP. Fixes: a9c8088c7988 ("i2c: i801: Don't restore config registers on runtime PM") Signed-off-by: Anders Roxell --- drivers/i2c/busses/i2c-i801.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c index ed07f9002710..954fb3f3b7fc 100644 --- a/drivers/i2c/busses/i2c-i801.c +++ b/drivers/i2c/busses/i2c-i801.c @@ -1710,7 +1710,7 @@ static void i801_shutdown(struct pci_dev *dev) pci_write_config_byte(dev, SMBHSTCFG, priv->original_hstcfg); } -#ifdef CONFIG_PM +#ifdef CONFIG_PM_SLEEP static int i801_suspend(struct device *dev) { struct pci_dev *pci_dev = to_pci_dev(dev); -- 2.17.0