From patchwork Wed Oct 26 20:38:01 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 101591 Delivered-To: patch@linaro.org Received: by 10.140.97.247 with SMTP id m110csp266863qge; Wed, 26 Oct 2016 13:39:15 -0700 (PDT) X-Received: by 10.98.138.219 with SMTP id o88mr7687315pfk.52.1477514355186; Wed, 26 Oct 2016 13:39:15 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o2si4573083pfk.55.2016.10.26.13.39.14; Wed, 26 Oct 2016 13:39:15 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932609AbcJZUjL (ORCPT + 27 others); Wed, 26 Oct 2016 16:39:11 -0400 Received: from mout.kundenserver.de ([217.72.192.74]:51086 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753446AbcJZUjG (ORCPT ); Wed, 26 Oct 2016 16:39:06 -0400 Received: from wuerfel.lan. ([78.43.20.153]) by mrelayeu.kundenserver.de (mreue104) with ESMTPA (Nemesis) id 0M580s-1cpwQA3tny-00zD5i; Wed, 26 Oct 2016 22:38:17 +0200 From: Arnd Bergmann To: Sakari Ailus , Mauro Carvalho Chehab Cc: Arnd Bergmann , Sebastian Reichel , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] [media] smiapp: make PM functions as __maybe_unused Date: Wed, 26 Oct 2016 22:38:01 +0200 Message-Id: <20161026203814.1904690-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:g3SAqql7lhqv/c9m1MhPbk7SGQ06xAMtYuwLR+dqXfeSYMFCnHC SSWQ7u4UilcM5eZx/a1qMwQN0gc5qDd+vSpgTf+QCa7nPuwHZuVviIYmnE/C9EyxfTtpmMI w3ZRh0Swtcg9IhOVf/NZ1d28bik6WJEhEWRmx8rQNUpvOC+ynoXhsXHDnSR9tvtjJtDU7ks SRaA5OX/ws6GyMeEEZagw== X-UI-Out-Filterresults: notjunk:1; V01:K0:Wk38fzxvZoQ=:ai/d+qDw4jE7sakC7WigTB e1LWwGiTP/544ZLQ04vRt4tideoSYE4s2SW03ya/Khz00I6ldqP4W4zkPwOJp1aBVvqNyWydC p62ncSzaFlznGRkdKOSDM/bRzXQcZAx/fWw3gbKMS2CV8A6Xy/OCpDP1LzUpHIUBelxA/RRQw BAUH+6rJgu3upatmC+uDeFsD8eBKGUWtB6zBdiR3Cu758S6gGo82gMnlNqVytRsvwG+g9LzCz zANeGpbxe/dBQWxgOr7qIxH2O5N+Uu9+GvnYivwN0AE0wusG4USZwccvGfPU5TCfXfzMccvP4 nE0iI788MmKe1DHHnLipUtxDToXqFVqcL0pJEU3jIkMTEyboKoD3P4IiOOcuqIcjGBTU2ty1l D62mefc2irqeJiI3gptiYNGspdaAEpS9MzBVe83JYgC0gNQLJD/1Tw0QUDj2/uU/4Eyp3QK8p DmTgElXI0ZtiLpBqy+cA/YCOdBYruy1x/keJaotn0Nrej2rXdd0wNFtvhiIdOF7Qm+kHsX+kp REIL1iZq4rsBuh6RovvZgtCv6EzP+u/bCtS3sBo43304JxCNp0DQbYMNjBVAjfSh1QNucFWQy 5ZCN6wV9NLvcI2maEQb4px/zsfUP7rKx0+thAxcrmF91P3ZRXG043UwKTvvlv/7qfCueZeP2R CKZS8m4OL9/qNFi89fM0JhSOI9xDHDqc1joqCEQj1/ke7ydtIWpGU1GYLN9KzLw5VQHI= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The rework of the PM support has caused two functions to be orphaned when CONFIG_PM is disabled: media/i2c/smiapp/smiapp-core.c:1352:12: error: 'smiapp_power_off' defined but not used [-Werror=unused-function] media/i2c/smiapp/smiapp-core.c:1206:12: error: 'smiapp_power_on' defined but not used [-Werror=unused-function] This changes all four PM entry points to __maybe_unused and removes the #ifdef markers for consistency. This avoids the warnings even when something changes again. Fixes: cbba45d43631 ("[media] smiapp: Use runtime PM") Signed-off-by: Arnd Bergmann --- drivers/media/i2c/smiapp/smiapp-core.c | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) -- 2.9.0 diff --git a/drivers/media/i2c/smiapp/smiapp-core.c b/drivers/media/i2c/smiapp/smiapp-core.c index 59872b31f832..fc0142838834 100644 --- a/drivers/media/i2c/smiapp/smiapp-core.c +++ b/drivers/media/i2c/smiapp/smiapp-core.c @@ -1203,7 +1203,7 @@ static int smiapp_setup_flash_strobe(struct smiapp_sensor *sensor) * Power management */ -static int smiapp_power_on(struct device *dev) +static int __maybe_unused smiapp_power_on(struct device *dev) { struct i2c_client *client = to_i2c_client(dev); struct v4l2_subdev *subdev = i2c_get_clientdata(client); @@ -1349,7 +1349,7 @@ static int smiapp_power_on(struct device *dev) return rval; } -static int smiapp_power_off(struct device *dev) +static int __maybe_unused smiapp_power_off(struct device *dev) { struct i2c_client *client = to_i2c_client(dev); struct v4l2_subdev *subdev = i2c_get_clientdata(client); @@ -2741,9 +2741,7 @@ static const struct v4l2_subdev_internal_ops smiapp_internal_ops = { * I2C Driver */ -#ifdef CONFIG_PM - -static int smiapp_suspend(struct device *dev) +static int __maybe_unused smiapp_suspend(struct device *dev) { struct i2c_client *client = to_i2c_client(dev); struct v4l2_subdev *subdev = i2c_get_clientdata(client); @@ -2768,7 +2766,7 @@ static int smiapp_suspend(struct device *dev) return 0; } -static int smiapp_resume(struct device *dev) +static int __maybe_unused smiapp_resume(struct device *dev) { struct i2c_client *client = to_i2c_client(dev); struct v4l2_subdev *subdev = i2c_get_clientdata(client); @@ -2783,13 +2781,6 @@ static int smiapp_resume(struct device *dev) return rval; } -#else - -#define smiapp_suspend NULL -#define smiapp_resume NULL - -#endif /* CONFIG_PM */ - static struct smiapp_hwconfig *smiapp_get_hwconfig(struct device *dev) { struct smiapp_hwconfig *hwcfg;