All of lore.kernel.org
 help / color / mirror / Atom feed
From: Albin Tonnerre <albin.tonnerre@free-electrons.com>
To: Frans Pop <elendil@planet.nl>, "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: linux-kernel@vger.kernel.org,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>
Subject: Re: [PATCH V2] au1xmmc: dev_pm_ops conversion
Date: Mon, 3 Aug 2009 18:33:04 +0200	[thread overview]
Message-ID: <20090803163304.GF5002@laptop> (raw)

On Sat, Jul 25, 2009, Frans Pop wrote:
> Yes, I see that in drivers/base/platform.c (legacy) .suspend resp. .resume
> also got called for those cases?
> Ouch :-(

This really looks like it's error-prone (I made this mistake for atmel_serial
and wouldn't have noticed if Frans hadn't told me), and AFAICS, for a number of
drivers we'll have suspend = freeze = poweroff and resume = thaw = restore.
Maybe putting something like this in pm.h would help ?

#define PM_OPS(name, suspend, resume) \
struct dev_pm_ops name = { \
	.suspend = suspend, \
	.resume = resume, \
	.freeze = suspend, \
	.thaw = resume, \
	.poweroff = suspend, \
	.restore = resume, \
};

Cheers,
-- 
Albin Tonnerre, Free Electrons
Kernel, drivers and embedded Linux development,
consulting, training and support.
http://free-electrons.com

             reply	other threads:[~2009-08-03 16:33 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-03 16:33 Albin Tonnerre [this message]
2009-08-03 19:23 ` [PATCH V2] au1xmmc: dev_pm_ops conversion Rafael J. Wysocki
2009-08-04  9:36   ` [PATCH] Add SIMPLE_PM_OPS: make switching to dev_pm_ops less error-prone Albin Tonnerre
2009-08-04  9:36   ` Albin Tonnerre
2009-08-05  4:55     ` Dmitry Torokhov
2009-08-05  9:37       ` Albin Tonnerre
2009-08-05  9:37         ` Albin Tonnerre
2009-08-05 18:47         ` Rafael J. Wysocki
2009-08-05 20:05           ` [PATCH] PM: Add convenience macro to " Rafael J. Wysocki
2009-08-05 20:17             ` pHilipp Zabel
2009-08-05 20:17             ` pHilipp Zabel
2009-08-05 20:22             ` Frans Pop
2009-08-05 20:22             ` Frans Pop
2009-08-05 21:30               ` Rafael J. Wysocki
2009-08-05 21:30               ` Rafael J. Wysocki
2009-08-06  8:51                 ` Daniel Mack
2009-08-06  8:51                 ` Daniel Mack
2009-08-06 12:16                   ` Rafael J. Wysocki
2009-08-06 13:10                     ` Magnus Damm
2009-08-06 13:10                       ` Magnus Damm
2009-08-06 15:14                       ` Rafael J. Wysocki
2009-08-06 15:14                       ` Rafael J. Wysocki
2009-08-06 12:16                   ` Rafael J. Wysocki
2009-08-05 20:05           ` Rafael J. Wysocki
2009-08-05 18:47         ` [PATCH] Add SIMPLE_PM_OPS: " Rafael J. Wysocki
2009-08-05  4:55     ` Dmitry Torokhov
2009-08-03 19:23 ` [PATCH V2] au1xmmc: dev_pm_ops conversion Rafael J. Wysocki
  -- strict thread matches above, loose matches on Subject: below --
2009-07-22 15:18 Manuel Lauss
2009-07-25 17:44 ` Dmitry Torokhov
2009-07-25 18:15   ` Manuel Lauss
2009-07-25 18:18   ` Frans Pop
2009-07-25 19:10     ` Dmitry Torokhov
2009-07-25 19:39       ` Rafael J. Wysocki
2009-07-25 20:21         ` Frans Pop
2009-07-25 20:38           ` Frans Pop
2009-07-25 21:06             ` Rafael J. Wysocki
2009-07-25 21:30               ` Frans Pop
2009-07-25 21:41           ` Dmitry Torokhov
2009-07-26 15:08         ` Mark Brown
2009-07-26 19:38           ` Rafael J. Wysocki

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=20090803163304.GF5002@laptop \
    --to=albin.tonnerre@free-electrons.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=elendil@planet.nl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rjw@sisk.pl \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.