From: Arnd Bergmann <arnd@arndb.de>
To: Sakari Ailus <sakari.ailus@iki.fi>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>,
Sebastian Reichel <sre@kernel.org>,
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 [thread overview]
Message-ID: <3736433.WSCIHGPKQU@wuerfel> (raw)
In-Reply-To: <20161027072818.GQ9460@valkosipuli.retiisi.org.uk>
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 <arnd@arndb.de>
>
> 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
next prev parent reply other threads:[~2016-10-27 7:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-26 20:38 [PATCH] [media] smiapp: make PM functions as __maybe_unused Arnd Bergmann
2016-10-27 7:28 ` Sakari Ailus
2016-10-27 7:43 ` Arnd Bergmann [this message]
2016-10-27 8:08 ` Sakari Ailus
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3736433.WSCIHGPKQU@wuerfel \
--to=arnd@arndb.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=sakari.ailus@iki.fi \
--cc=sre@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox