Commit 06f024fd authored by Martin Schwidefsky's avatar Martin Schwidefsky Committed by Linus Torvalds

[PATCH] s390: online attribute.

Fix online attribute. "echo 1 > online" should enable a device and
"echo 0 > online" should disable a device, not the other way round.
parent 2e5003f2
/* /*
* drivers/s390/cio/device.c * drivers/s390/cio/device.c
* bus driver for ccw devices * bus driver for ccw devices
* $Revision: 1.57 $ * $Revision: 1.58 $
* *
* Copyright (C) 2002 IBM Deutschland Entwicklung GmbH, * Copyright (C) 2002 IBM Deutschland Entwicklung GmbH,
* IBM Corporation * IBM Corporation
...@@ -305,9 +305,9 @@ online_store (struct device *dev, const char *buf, size_t count) ...@@ -305,9 +305,9 @@ online_store (struct device *dev, const char *buf, size_t count)
return count; return count;
i = simple_strtoul(buf, &tmp, 16); i = simple_strtoul(buf, &tmp, 16);
if (i == 0 && cdev->drv->set_online) if (i == 1 && cdev->drv->set_online)
ccw_device_set_online(cdev); ccw_device_set_online(cdev);
else if (i == 1 && cdev->drv->set_offline) else if (i == 0 && cdev->drv->set_offline)
ccw_device_set_offline(cdev); ccw_device_set_offline(cdev);
else else
return -EINVAL; return -EINVAL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment