From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934883AbcJ0Hnh (ORCPT ); Thu, 27 Oct 2016 03:43:37 -0400 Received: from mout.kundenserver.de ([212.227.126.133]:52006 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933572AbcJ0Hng (ORCPT ); Thu, 27 Oct 2016 03:43:36 -0400 From: Arnd Bergmann To: Sakari Ailus Cc: Mauro Carvalho Chehab , Sebastian Reichel , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org Subject: Re: [PATCH] [media] smiapp: make PM functions as __maybe_unused Date: Thu, 27 Oct 2016 09:43:16 +0200 Message-ID: <3736433.WSCIHGPKQU@wuerfel> User-Agent: KMail/5.1.3 (Linux/4.4.0-34-generic; KDE/5.18.0; x86_64; ; ) In-Reply-To: <20161027072818.GQ9460@valkosipuli.retiisi.org.uk> References: <20161026203814.1904690-1-arnd@arndb.de> <20161027072818.GQ9460@valkosipuli.retiisi.org.uk> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:t3TY6bTbwNjDBAev/X/yPjkuagJvlt76f03uxX/U2zcLC8OW/Qv HwraMnnYg0tlkCxf7myfZ/iEn20ly281mWHhPBEUt0POutHA2hvY5damKsSIaU3baPLuAOR Z+/EoQuJ3GucxDZZTsvaBDLiaPFgmjwGstWk8ZgrPbY+POBetBuv86OTA7NssBfaoAGJcdQ o2+4m25EP7QKXM+TUINnA== X-UI-Out-Filterresults: notjunk:1;V01:K0:7skxL9P2Urg=:u6SMCSbmjUnaXUQ7QMGrZ4 /n9We2z0gchtPAqELzBcDHEV+Hn15arILTftuzMUEaVOjTmCskMZDlU6hyHLby77DdTbteOPM byEdeJVfcEQuSSvSKnX5Hq0B29MI9a1lFk+R81VYZvw1uu0M+6ZfsN0nJy/BIks9txjps1Q99 F6Gwk7DHsY2xWQ52/I0G/7GQMFUpCawfJKjDe9HqKifpr02Y5U4VhRo84+NpQYj88EYtJ1cn2 HkEDlkrKHezV+9fRMXJmrLqAODUJmyrl7qLNeLsap1FODoBFhQGc8fC2/vSziLUxJTUVBOssW vyQA/XeDVzlFOaMRtWnh0CJ75Ra1lIqWKxsQr7j9jbORtoEPOTV9Q+Knyyj1tr43nCaF28kEu jZmDwNPLXfGKmjTnqsGJQnj0Qg8okpo8iJHteHICbuiRtBW77cEx3kyxH9oG5az/9C0aqPZly MU3q+dAhQlmiOoreg1YHZSxbBDRbQExNm0oQTr0EMKD7DDIZrf6aZE/l9STCA+1YBCSl3M/UN JywkwSGEXesIpiplOlUnMsHI40N/xgcGoffWhy0FmcQb/hB2tWSfR1CffVsMWekNv7n8Uhx5b byTCAYe5cSi2fDz6Ioix3ma8MuDpK49FnKwLe2gvJ35VqsiDgvyzQwmPco/i2Q1pfeEa7Uf1W AIw20/tG+l9HT3+Sk5Wrz15KrUrSrlZoUJFrPdeA+Mf4aEZHNu+ANQ+nOyMSWG0cRcMQHE+K7 nbZ6K3suQKMrxDfp Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thursday, October 27, 2016 10:28:18 AM CEST Sakari Ailus wrote: > > On Wed, Oct 26, 2016 at 10:38:01PM +0200, Arnd Bergmann wrote: > > 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 > > The power-on sequence is in fact mandatory as it involves writing the > initial configuration to the sensor as well. > > Instead, I believe the correct fix is to make the driver depend on > CONFIG_PM. (adding linux-pm list) That would be a rather unusual dependency, though it's possible that a lot of drivers in fact need it but never listed this explictly in Kconfig. What do other drivers do that need to have their runtime_resume function called at probe time when CONFIG_PM is disabled? Arnd