Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 135611
b: refs/heads/master
c: e74fe0c
h: refs/heads/master
i:
  135609: db3336b
  135607: cd0e89c
v: v3
  • Loading branch information
Sebastian Ott authored and Martin Schwidefsky committed Mar 26, 2009
1 parent ee401a3 commit 1626b65
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c08f294a14cb4c2abbd1a9a619c2d8d07afd41e3
refs/heads/master: e74fe0cec92439115630b51195444b89b910800a
14 changes: 6 additions & 8 deletions trunk/drivers/s390/cio/device.c
Original file line number Diff line number Diff line change
Expand Up @@ -457,12 +457,13 @@ int ccw_device_set_online(struct ccw_device *cdev)
return (ret == 0) ? -ENODEV : ret;
}

static void online_store_handle_offline(struct ccw_device *cdev)
static int online_store_handle_offline(struct ccw_device *cdev)
{
if (cdev->private->state == DEV_STATE_DISCONNECTED)
ccw_device_remove_disconnected(cdev);
else if (cdev->drv && cdev->drv->set_offline)
ccw_device_set_offline(cdev);
else if (cdev->online && cdev->drv && cdev->drv->set_offline)
return ccw_device_set_offline(cdev);
return 0;
}

static int online_store_recog_and_online(struct ccw_device *cdev)
Expand Down Expand Up @@ -530,13 +531,10 @@ static ssize_t online_store (struct device *dev, struct device_attribute *attr,
goto out;
switch (i) {
case 0:
online_store_handle_offline(cdev);
ret = count;
ret = online_store_handle_offline(cdev);
break;
case 1:
ret = online_store_handle_online(cdev, force);
if (!ret)
ret = count;
break;
default:
ret = -EINVAL;
Expand All @@ -545,7 +543,7 @@ static ssize_t online_store (struct device *dev, struct device_attribute *attr,
if (cdev->drv)
module_put(cdev->drv->owner);
atomic_set(&cdev->private->onoff, 0);
return ret;
return (ret < 0) ? ret : count;
}

static ssize_t
Expand Down

0 comments on commit 1626b65

Please sign in to comment.