diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2016-11-22 16:06:00 -0500 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2016-12-02 01:36:22 -0500 |
commit | 3e488c95c72ba8cbe8ab3a5c1c61f058f9e30aed (patch) | |
tree | f8568941baed28ebdaeb171e75e0c3d910ac63c2 | |
parent | 9f88eb4df728aebcd2ddd154d99f1d75b428b897 (diff) |
s390/zcrypt: Convert to PM ops
Switch the zcrypt bus from legacy suspend/resume callbacks to dev_pm_ops.
The conversion is straight forward with the help of SIMPLE_DEV_PM_OPS().
The new dev_pm_ops based version is functionally equivalent to the legacy
callbacks version.
This will allow to eventually remove support for legacy suspend/resume
callbacks from the kernel altogether.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Harald Freudenberger <freude@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
-rw-r--r-- | drivers/s390/crypto/ap_bus.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/s390/crypto/ap_bus.c b/drivers/s390/crypto/ap_bus.c index ed92fb09fc8e..f407b4f9d0ba 100644 --- a/drivers/s390/crypto/ap_bus.c +++ b/drivers/s390/crypto/ap_bus.c | |||
@@ -1273,7 +1273,7 @@ static int ap_uevent (struct device *dev, struct kobj_uevent_env *env) | |||
1273 | return retval; | 1273 | return retval; |
1274 | } | 1274 | } |
1275 | 1275 | ||
1276 | static int ap_dev_suspend(struct device *dev, pm_message_t state) | 1276 | static int ap_dev_suspend(struct device *dev) |
1277 | { | 1277 | { |
1278 | struct ap_device *ap_dev = to_ap_dev(dev); | 1278 | struct ap_device *ap_dev = to_ap_dev(dev); |
1279 | 1279 | ||
@@ -1287,11 +1287,6 @@ static int ap_dev_suspend(struct device *dev, pm_message_t state) | |||
1287 | return 0; | 1287 | return 0; |
1288 | } | 1288 | } |
1289 | 1289 | ||
1290 | static int ap_dev_resume(struct device *dev) | ||
1291 | { | ||
1292 | return 0; | ||
1293 | } | ||
1294 | |||
1295 | static void ap_bus_suspend(void) | 1290 | static void ap_bus_suspend(void) |
1296 | { | 1291 | { |
1297 | ap_suspend_flag = 1; | 1292 | ap_suspend_flag = 1; |
@@ -1356,12 +1351,13 @@ static struct notifier_block ap_power_notifier = { | |||
1356 | .notifier_call = ap_power_event, | 1351 | .notifier_call = ap_power_event, |
1357 | }; | 1352 | }; |
1358 | 1353 | ||
1354 | static SIMPLE_DEV_PM_OPS(ap_bus_pm_ops, ap_dev_suspend, NULL); | ||
1355 | |||
1359 | static struct bus_type ap_bus_type = { | 1356 | static struct bus_type ap_bus_type = { |
1360 | .name = "ap", | 1357 | .name = "ap", |
1361 | .match = &ap_bus_match, | 1358 | .match = &ap_bus_match, |
1362 | .uevent = &ap_uevent, | 1359 | .uevent = &ap_uevent, |
1363 | .suspend = ap_dev_suspend, | 1360 | .pm = &ap_bus_pm_ops, |
1364 | .resume = ap_dev_resume, | ||
1365 | }; | 1361 | }; |
1366 | 1362 | ||
1367 | void ap_device_init_reply(struct ap_device *ap_dev, | 1363 | void ap_device_init_reply(struct ap_device *ap_dev, |