lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAH3Oq6Sua5vmOioOQHZd6BYRvVGfeTrNCgCHpyhZAv2_HhhcZg@mail.gmail.com>
Date:	Wed, 13 Jun 2012 15:33:48 +0800
From:	Ning Jiang <ning.n.jiang@...il.com>
To:	rjw@...k.pl
Cc:	linux-kernel@...r.kernel.org
Subject: Deprecate suspend/resume in device_driver

The suspend/resume will not be called if they are defined in
device_driver directly,
PM core will only use suspend/resume function in dev_pm_ops. Thus we shall
mark the old suspend/resume deprecated and make them scheduled for removal.


>From efee1b349a8abcb4702d93c1c12e7f27c96fbcfc Mon Sep 17 00:00:00 2001
From: Ning Jiang <ning.n.jiang@...il.com>
Date: Wed, 13 Jun 2012 15:00:33 +0800
Subject: [PATCH] PM: Deprecate suspend/resume in device_driver

Make suspend/resume callbacks in device_driver deprecated and scheduled
for removal since they are not used in PM core anymore.

Legacy drivers who still use them need to move suspend/resume callbacks
to dev_pm_ops.

Signed-off-by: Ning Jiang <ning.n.jiang@...il.com>
---
 include/linux/device.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/linux/device.h b/include/linux/device.h
index e04f577..884d9a6 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -226,8 +226,8 @@ struct device_driver {
 	int (*probe) (struct device *dev);
 	int (*remove) (struct device *dev);
 	void (*shutdown) (struct device *dev);
-	int (*suspend) (struct device *dev, pm_message_t state);
-	int (*resume) (struct device *dev);
+	int (*suspend) (struct device *dev, pm_message_t state) __deprecated;
+	int (*resume) (struct device *dev) __deprecated;
 	const struct attribute_group **groups;

 	const struct dev_pm_ops *pm;
-- 
1.7.1

Download attachment "0001-PM-Deprecate-suspend-resume-in-device_driver.patch" of type "application/octet-stream" (1187 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ