Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 284423
b: refs/heads/master
c: f5138e4
h: refs/heads/master
i:
  284421: 316af87
  284419: c03b9e3
  284415: c7a42c4
v: v3
  • Loading branch information
Michael Holzheu authored and Linus Torvalds committed Jan 13, 2012
1 parent 83f707c commit 5a60ece
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 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: 1f536b9e9f85456df93614b3c2f6a1a2b7d7cb9b
refs/heads/master: f5138e42211d4e8bfbd6ac5b3816348da1533433
17 changes: 14 additions & 3 deletions trunk/drivers/base/memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -295,11 +295,22 @@ static int memory_block_change_state(struct memory_block *mem,

ret = memory_block_action(mem->start_section_nr, to_state);

if (ret)
if (ret) {
mem->state = from_state_req;
else
mem->state = to_state;
goto out;
}

mem->state = to_state;
switch (mem->state) {
case MEM_OFFLINE:
kobject_uevent(&mem->dev.kobj, KOBJ_OFFLINE);
break;
case MEM_ONLINE:
kobject_uevent(&mem->dev.kobj, KOBJ_ONLINE);
break;
default:
break;
}
out:
mutex_unlock(&mem->state_mutex);
return ret;
Expand Down

0 comments on commit 5a60ece

Please sign in to comment.