From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Guenter Roeck <linux@roeck-us.net>
Cc: Len Brown <len.brown@intel.com>, Pavel Machek <pavel@ucw.cz>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: Calling device_init_wakeup() on driver removal
Date: Sun, 15 Jan 2017 15:49:44 +0100 [thread overview]
Message-ID: <3852101.qr97BxrLhj@aspire.rjw.lan> (raw)
In-Reply-To: <b4f92201-77f6-4a15-81cf-8f2f384d0c1f@roeck-us.net>
On Saturday, January 14, 2017 08:46:05 PM Guenter Roeck wrote:
> Hi folks,
Hi,
> while looking through driver initialization and removal functions, I noticed that many drivers
> call device_init_wakeup(dev, false) in the removal function. Given that the driver is about
> to be removed, that doesn't make much sense to me, especially since device_wakeup_disable()
> is called from device_pm_remove() anyway.
>
> Is it safe to assume that all those calls can be removed, or is there a possible reason for
> keeping them around ?
Removing them automatically might break things, because device_init_wakeup(dev, false)
also clears the power.can_wakeup flag and removes the "wakeup" attribute from sysfs.
I guess they could be removed safely in the majority of cases, though.
Thanks,
Rafael
next prev parent reply other threads:[~2017-01-15 14:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-15 4:46 Guenter Roeck
2017-01-15 14:49 ` Rafael J. Wysocki [this message]
2017-01-15 15:23 ` Guenter Roeck
2017-01-16 21:50 ` Rafael J. Wysocki
2017-01-17 4:37 ` Guenter Roeck
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=3852101.qr97BxrLhj@aspire.rjw.lan \
--to=rjw@rjwysocki.net \
--cc=gregkh@linuxfoundation.org \
--cc=len.brown@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=pavel@ucw.cz \
/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
all inboxes | Powered by JetHome®