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: 9398263 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 01B09600BA for ; Wed, 26 Oct 2016 20:39:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CFB1429E08 for ; Wed, 26 Oct 2016 20:39:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C43DE29E0A; Wed, 26 Oct 2016 20:39:29 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 37BB929E08 for ; Wed, 26 Oct 2016 20:39:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933158AbcJZUjJ (ORCPT ); Wed, 26 Oct 2016 16:39:09 -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-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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(-) 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;