LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Kim Kyuwon <q1.kim@samsung.com>, Kim Kyuwon <chammoru@gmail.com>,
	Richard Purdie <rpurdie@rpsys.net>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] leds: Convert bd2802 driver to dev_pm_ops
Date: Thu, 20 Jan 2011 23:24:09 +0000	[thread overview]
Message-ID: <20110120232409.GA23862@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <20110120151201.8dca7a7e.akpm@linux-foundation.org>

On Thu, Jan 20, 2011 at 03:12:01PM -0800, Andrew Morton wrote:

> CONFIG_PM=n:

To be honest I've been forming the opinion that this is just cruft these
days - it's hard to see a modern Linux system where you're sufficiently
space constrained to want to turn it off without also being sufficiently
power constrained to want to turn it on and it's hassle to maintain it.
That said...

> It would be nice to fix all this via automagic within the
> SIMPLE_DEV_PM_OPS() implementation but I can't see a way of doing that :(

...the problem here is that the macro is doing roughly the right magic
but the original driver wasn't ifdefing the suspend and resume stuff at
all.  If the were only defining the suspend and resume functions under
CONFIG_PM_SLEEP it should build cleanly.  Since the original driver
didn't have the ifdefs I didn't add or update them.

This means the pm_ops can be unconditionally defined which seems to be
the preferred idiom for this stuff.  If SIMPLE_DEV_PM_OPS() didn't do
the stuff it's doing then the warnings would vanish in the same way they
did originally, by virtue of the functions being unconditionally
referenced from the vtable.

  reply	other threads:[~2011-01-20 23:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-20 21:36 Mark Brown
2011-01-20 23:12 ` Andrew Morton
2011-01-20 23:24   ` Mark Brown [this message]
2011-01-20 23:35     ` Andrew Morton
2011-01-21 12:13       ` Mark Brown

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=20110120232409.GA23862@opensource.wolfsonmicro.com \
    --to=broonie@opensource.wolfsonmicro.com \
    --cc=akpm@linux-foundation.org \
    --cc=chammoru@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=q1.kim@samsung.com \
    --cc=rpurdie@rpsys.net \
    --subject='Re: [PATCH] leds: Convert bd2802 driver to dev_pm_ops' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).