From patchwork Mon May 14 09:33:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Anders Roxell X-Patchwork-Id: 135700 Delivered-To: patch@linaro.org Received: by 2002:a2e:9706:0:0:0:0:0 with SMTP id r6-v6csp1518308lji; Mon, 14 May 2018 02:33:36 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrDZiNXEVVL2mmwoMXIXZMl5oUQ41sWtFOx7xHw48qHz233vgeoHj9gR2fpN4pZb2LtDzf8 X-Received: by 2002:a17:902:5952:: with SMTP id e18-v6mr9231689plj.351.1526290415871; Mon, 14 May 2018 02:33:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526290415; cv=none; d=google.com; s=arc-20160816; b=SMg4NAU+WwyVu7s0clMWFt+lsYhcbz8pPoiOIb3OLuLz3QFXfelDQpoHNCuJMAJ/Rd Ig0FU4z5n4n9TIYWGxIVaoWQ+YZSWadSd8VWnTzp4YhJ+IEAiJwd0+6EuTJehO14YAa1 clHldf360c+6KKL6vl3bwD7lNTAgy7OSlHDc7WX7v1SvFdFMxNMyKFdP+SbKjall5c2m qtX0tiTtwDPzkunQOnlsS5KRWLq9Vn7HB+tKHKRlfqQz+g3BWLHMbd1DOwoTkW3kLXUf ObAoDlKYeKcrUxCUtblMFSXpBUcYRxT9iyLi2nRcRKnasdZEEBG+ytJOvN+bSpQpUK6w OHnw== 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=mGfP2E2nMLLzrUS3qj9D75eHsA1f+U0Ip+qPW/mbzS7rCG1n/Rrq/mgULrKOB020JF EVB1negDXhM49aZgdu4CitFrjpL2xeQOt6dN1mMQPt20fFHWqz/4V+C2aUavQeoDlmUR SfZU8HpieGkq42ThWasc6KIZvx5d2ra5PsASNkq3rMuObDmoWO5+gr4Y745exR0Zqrop 4LU5g7nFnJZact4bIzyrA7rprOdzwxzW262SNaQLVXFcQhj8oC4UsDj36UY1udk8QUXF ZvM2W3/q9l1GlMw46AnrUwipvyhDmjxs5f5H8fILr4DHy6s2BViQppedjTDqtR0tl5qu 3QDg== 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-i2c-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-i2c-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 o19-v6si9125688pll.447.2018.05.14.02.33.35; Mon, 14 May 2018 02:33:35 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-i2c-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-i2c-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-i2c-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 S1751617AbeENJde (ORCPT + 2 others); Mon, 14 May 2018 05:33:34 -0400 Received: from mail-lf0-f68.google.com ([209.85.215.68]:42221 "EHLO mail-lf0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751198AbeENJdd (ORCPT ); Mon, 14 May 2018 05:33:33 -0400 Received: by mail-lf0-f68.google.com with SMTP id b18-v6so16204355lfa.9 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=Pjp0N0yE1OugDPbwTK30QOQl3CvJPpsrfOII81pTSygdkMzCc0KqG8mkUQR+I3j3oK NaLrTYTyjtk7MwBYzo+VEnPuWy7ynlcWKky12FNK2R5+pF7RYQSNdswngNXmXv+odrr4 Je0Fyl40M6gVfQJ6Yq+Tjy1rxkULg4dEJ40PzwKAc2j1SH5fXQbsdVy+Fkh8aZbe5e5j htIVUcnIFZNvPAR+O3VQi6t7/xXkJRVjJ6ExPrSTcyhi0bpqa5jEzNPVkFBVNDeVUP+s lZTY9cO0L8wFZKzFWbsXWfoLAHZl0cqT7jHrzy9rxFmFOUdSQVbMm8Cb0gRMaRvOUoLK SE5Q== X-Gm-Message-State: ALKqPwcJqNCa5yNozkyCAEN+bms8Qg/ZtfqWcj97aIGrpytfeqEM09Ex xExOCUb/bH1dMV/gzqn4/cfhKQ== 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 Sender: linux-i2c-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-i2c@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(-) -- 2.17.0 Reviewed-by: Jean Delvare 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);