Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1334314

[PATCH] iio: health/afe4404: mark suspend/resume functions __maybe_unused

Path csiph.com!news.mixmin.net!aioe.org!gothmog.csi.it!bofh.it!news.nic.it!robomod
From Arnd Bergmann <arnd@arndb.de>
Newsgroups linux.kernel
Subject [PATCH] iio: health/afe4404: mark suspend/resume functions __maybe_unused
Date Mon, 15 Feb 2016 10:30:02 +0100
Message-ID <r2nDI-7od-25@gated-at.bofh.it> (permalink)
X-Mailer git-send-email 2.7.0
X-Provags-ID V03:K0:xNyHzPo0aggfxEXtyYKnagSm419XravZTsGLThsxp8vdDIro1FG W+bbDJ7Gs0NJujSO0N7gHXTvfu/uOFwkazZpsvmEYwuIzeCvSvGlvCc/JtQPM5267PBjdLR mPohzOvSj+ExTggBu9hIgk6X8Hulu9xrdqYkMzWdBTEVlWtwBtShIevqRXTnMXrFsqkBMw0 vXi26CZE5mXkJcpSIlSZg==
X-Ui-Out-Filterresults notjunk:1;V01:K0:DY5UtTuffHA=:Cg2piyfSax8ykzkGUr/QoY AZmHVMLNHekX/T4NKEsEEgpBAk20gb/gBR/vj4Yco80D8uTt5zIjpYkVakZU+FILsBKof7LZT EeG1j+lR3zKvTmXyXM2r/zgQOmYxmBG3HV7pzQ6bMm7PDhB4TwniKFD6HpzNpL+KD9M/IFMmQ 6vRwVKTM3bsERzb69bstOk/QfiUItyvjTgpMiEsjfi9515HB+pUKnxzPPCbTuZaP5MWWGWq1g PvsLMyDdzFIX0J6bXRHSqdJooB0IhChbqklzWqBcM7tIx/j0ilCuKopBt1/B+u8NBj7FscdUs m9XqTkY2bwRlbi05mmyuFJjMgKGT1EVE4brUFyiJUA1ESqvg4+BaNcCuN9bo8svDNzD02oOXN gmznW2VundZd+ptgAypvBDUnNBUgMwsQhQk5ZRn8pKtdm/I5NrEaV+Xg0EDk2HC4kqt07uCwO UyAtkPIpASDkUmSBvUuEwYVaQLQYBu/sdMF+4O3hsQGggkFV8KDIuD/CPWUshrElt9boxIUUE lLOcCtVWp7TC2ur9bjYuePHe1Xm3xhZnmMCb+kYGrfQjmEDHjL9sFSuUWV3FpgUEtJtVAI1jw Jsf6l0upwz9Edn0wvEuOOTHyrt0ySESbqodrD5kzTIAMK2Ihx1I+AfqSapKSJi1pu1P7DdBx0 I/OWdQirDaBeDzFdvEavZrpHuvzmXDM52hcbLJqeOEN4goBAY143eJEAse1WLbEECs8E=
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 40
Organization linux.* mail to news gateway
X-Original-Cc linux-arm-kernel@lists.infradead.org, Arnd Bergmann <arnd@arndb.de>, "Andrew F . Davis" <afd@ti.com>, Hartmut Knaack <knaack.h@gmx.de>, Lars-Peter Clausen <lars@metafoo.de>, Peter Meerwald <pmeerw@pmeerw.net>, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
X-Original-Date Mon, 15 Feb 2016 10:19:04 +0100
X-Original-Message-ID <1455527958-2647084-1-git-send-email-arnd@arndb.de>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1334314

Show key headers only | View raw


The newly added afe4404 driver implements suspend/resume using the
SIMPLE_DEV_PM_OPS() macro, which leaves out references to the actual
functions when CONFIG_PM is disabled, causing a harmless warning:

health/afe4404.c:509:12: error: 'afe4404_suspend' defined but not used
health/afe4404.c:530:12: error: 'afe4404_resume' defined but not used

This marks the functions as __maybe_unused so we don't get those
warnings.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 87aec56e27ef ("iio: health: Add driver for the TI AFE4404 heart monitor")
---
 drivers/iio/health/afe4404.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/iio/health/afe4404.c b/drivers/iio/health/afe4404.c
index 0759268f37e0..5096a4643784 100644
--- a/drivers/iio/health/afe4404.c
+++ b/drivers/iio/health/afe4404.c
@@ -477,7 +477,7 @@ static const struct of_device_id afe4404_of_match[] = {
 MODULE_DEVICE_TABLE(of, afe4404_of_match);
 #endif
 
-static int afe4404_suspend(struct device *dev)
+static int __maybe_unused afe4404_suspend(struct device *dev)
 {
 	struct iio_dev *indio_dev = dev_to_iio_dev(dev);
 	struct afe4404_data *afe = iio_priv(indio_dev);
@@ -498,7 +498,7 @@ static int afe4404_suspend(struct device *dev)
 	return 0;
 }
 
-static int afe4404_resume(struct device *dev)
+static int __maybe_unused afe4404_resume(struct device *dev)
 {
 	struct iio_dev *indio_dev = dev_to_iio_dev(dev);
 	struct afe4404_data *afe = iio_priv(indio_dev);
-- 
2.7.0

Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

[PATCH] iio: health/afe4404: mark suspend/resume functions __maybe_unused Arnd Bergmann <arnd@arndb.de> - 2016-02-15 10:30 +0100
  Re: [PATCH] iio: health/afe4404: mark suspend/resume functions  __maybe_unused Jonathan Cameron <jic23@kernel.org> - 2016-02-17 20:40 +0100

csiph-web