public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
From: Albin Tonnerre <albin.tonnerre@free-electrons.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Frans Pop <elendil@planet.nl>,
	linux-kernel@vger.kernel.org,
	Linux PM List <linux-pm@lists.linux-foundation.org>
Subject: Re: [PATCH] Add SIMPLE_PM_OPS: make switching to dev_pm_ops less error-prone
Date: Wed, 5 Aug 2009 11:37:58 +0200	[thread overview]
Message-ID: <20090805093758.GE5854@laptop> (raw)
In-Reply-To: <20090805045533.C3574526EA5@mailhub.coreip.homeip.net>

On Tue, Aug 04, 2009 at 09:55:33PM -0700, Dmitry Torokhov wrote :
> On Tue, Aug 04, 2009 at 11:36:12AM +0200, Albin Tonnerre wrote:
> > In a number of cases, the .suspend, .freeze, .poweroff and .resume,
> > .thaw, .restore functions are identical. However, they all need to be
> > assigned to avoid regressionsm as the previous code called .suspend
> > resp. .resume in all those cases. SIMPLE_PM_OPS allows to deal with
> > this case.


> I'd much rather have conversions done with a bit more analysis now that
> our framework is more flexible and we can have specialized routines for
> hibernation and suspend.

I still think that even though they can, quite a number of drivers won't
/need/ to have different functions for this, but maybe I'm mistaken.

> Maybe we should try changing from run-time to build time warning so that
> users are not overly concerned with it?

I'm not sure that solves the problem. The fact is that even for developers, it's
easy to overlook that assiging only the .suspend and .resume fields is probably
a mistake.

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

  parent reply	other threads:[~2009-08-05  9:37 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20090803163304.GF5002@laptop>
2009-08-03 19:23 ` [PATCH V2] au1xmmc: dev_pm_ops conversion Rafael J. Wysocki
     [not found] ` <200908032123.17069.rjw@sisk.pl>
2009-08-04  9:36   ` [PATCH] Add SIMPLE_PM_OPS: make switching to dev_pm_ops less error-prone Albin Tonnerre
     [not found]   ` <20090804093542.GA5854@laptop>
2009-08-05  4:55     ` Dmitry Torokhov
     [not found]     ` <20090805045533.C3574526EA5@mailhub.coreip.homeip.net>
2009-08-05  9:37       ` Albin Tonnerre [this message]
2009-08-05 18:47         ` Rafael J. Wysocki
     [not found]         ` <200908052047.26293.rjw@sisk.pl>
2009-08-05 20:05           ` [PATCH] PM: Add convenience macro to " Rafael J. Wysocki
     [not found]           ` <200908052205.14222.rjw@sisk.pl>
2009-08-05 20:17             ` pHilipp Zabel
2009-08-05 20:22             ` Frans Pop
     [not found]             ` <200908052222.31707.elendil@planet.nl>
2009-08-05 21:30               ` Rafael J. Wysocki
     [not found]               ` <200908052330.08452.rjw@sisk.pl>
2009-08-06  8:51                 ` Daniel Mack
     [not found]                 ` <20090806085144.GS13236@buzzloop.caiaq.de>
2009-08-06 12:16                   ` Rafael J. Wysocki
     [not found]                   ` <200908061416.08564.rjw@sisk.pl>
2009-08-06 13:10                     ` Magnus Damm
2009-08-06 15:14                       ` 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=20090805093758.GE5854@laptop \
    --to=albin.tonnerre@free-electrons.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=elendil@planet.nl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@lists.linux-foundation.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