From: Shuah Khan <shuah.kh@samsung.com>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: pavel@ucw.cz, len.brown@intel.com, gregkh@linuxfoundation.org,
linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
shuahkhan@gmail.com, Shuah Khan <shuah.kh@samsung.com>
Subject: Re: [PATCH] power: Add legacy pm ops usage warning
Date: Tue, 05 Nov 2013 11:41:10 -0700 [thread overview]
Message-ID: <52793BC6.1080208@samsung.com> (raw)
In-Reply-To: <7710681.pPuGuuagq2@vostro.rjw.lan>
On 11/01/2013 05:04 PM, Rafael J. Wysocki wrote:
> On Friday, November 01, 2013 09:07:04 AM Shuah Khan wrote:
>> Add legacy pm_ops usage checks to device_pm_add() when a device gets added
>> to PM core's list of active devices. If legacy pm_ops usage is found at its
>> class, bus, driver level, print warning message to indicate the driver code
>> needs updating to use dev pm ops interfaces. This will help serve as a way
>> to track drivers that still use legacy pm ops and fix them.
>
> I think it would be much better to do these checks during bus type, class or
> driver registration, because if you register a bus type with legacy PM, for
> example, the check in device_pm_add() will trigger for all devices with that
> bus type.
>
> Thanks!
Rafael,
Correct. device_pm_add() triggers for all devices that use the driver.
On the other hand, the check is done only when the device gets added to
the pm core. I do like that part.
I am testing with adding checks driver_register() to look for suspend at
bus level. I am not seeing the same set of drivers I saw with the check
in device_pm_add(), which is puzzling. I am working on testing still.
Keep you posted.
-- Shuah
--
Shuah Khan
Senior Linux Kernel Developer - Open Source Group
Samsung Research America(Silicon Valley)
shuah.kh@samsung.com | (970) 672-0658
prev parent reply other threads:[~2013-11-05 18:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-01 15:07 [PATCH] power: Add legacy pm ops usage warning Shuah Khan
2013-11-01 23:04 ` Rafael J. Wysocki
2013-11-05 18:41 ` Shuah Khan [this message]
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=52793BC6.1080208@samsung.com \
--to=shuah.kh@samsung.com \
--cc=gregkh@linuxfoundation.org \
--cc=len.brown@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=pavel@ucw.cz \
--cc=rjw@rjwysocki.net \
--cc=shuahkhan@gmail.com \
/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.