Seth Jennings fa2be40fe7 drivers: base: use standard device online/offline for state change
There are two ways to set the online/offline state for a memory block:
echo 0|1 > online and echo online|online_kernel|online_movable|offline >
state.

The state attribute can online a memory block with extra data, the
"online type", where the online attribute uses a default online type of
ONLINE_KEEP, same as echo online > state.

Currently there is a state_mutex that provides consistency between the
memory block state and the underlying memory.

The problem is that this code does a lot of things that the common
device layer can do for us, such as the serialization of the
online/offline handlers using the device lock, setting the dev->offline
field, and calling kobject_uevent().

This patch refactors the online/offline code to allow the common
device_[online|offline] functions to be used.  The result is a simpler
and more common code path for the two state setting mechanisms.  It also
removes the state_mutex from the struct memory_block as the memory block
device lock provides the state consistency.

No functional change is intended by this patch.

Signed-off-by: Seth Jennings <sjenning@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-21 11:52:20 -07:00
..
2013-06-27 13:42:16 -04:00
2013-03-01 13:39:00 -08:00
2013-07-02 22:08:20 +01:00
2013-07-26 12:42:40 -07:00
2013-01-02 17:36:10 -08:00
2013-06-17 14:38:54 -04:00
2013-07-02 13:43:38 -07:00
2013-07-03 16:31:35 -07:00
2013-05-07 19:46:02 -07:00
2013-05-29 15:50:34 -04:00
2012-12-02 00:05:12 +00:00
2013-04-29 15:40:23 -04:00
2013-07-03 16:07:39 -07:00
2013-03-22 15:18:18 -07:00
2013-03-12 11:30:04 -07:00
2013-07-10 23:41:18 +01:00
2013-08-12 15:33:31 -07:00
2013-05-01 16:36:22 +05:30
2013-07-23 16:01:28 -07:00
2013-02-26 02:46:08 -05:00
2013-05-07 18:38:27 -07:00
2013-03-15 15:09:43 +10:30
2013-04-29 18:28:40 -07:00
2012-11-22 13:43:27 +09:00
2013-06-17 16:38:57 -07:00
2013-06-19 23:32:07 -04:00
2012-11-08 16:58:30 +01:00
2013-06-10 13:45:49 -07:00
2013-05-06 13:07:33 +02:00
2013-07-03 16:07:32 -07:00
2013-01-25 21:03:54 -08:00
2013-06-13 17:51:04 -07:00
2013-07-18 13:05:23 -07:00
2013-06-17 16:38:57 -07:00
2013-04-30 17:04:06 -07:00
2013-07-03 13:21:40 -07:00
2013-04-01 11:04:50 -07:00
2013-07-16 22:00:14 -07:00
2013-07-09 10:33:30 -07:00
2013-05-31 00:48:22 -07:00
2013-07-10 18:11:34 -07:00
2013-03-15 15:09:43 +10:30
2013-07-02 15:38:19 +09:30
2012-12-25 18:45:06 -05:00
2013-07-03 16:08:05 -07:00
2013-06-08 16:20:14 -04:00
2012-12-11 17:22:27 -08:00
2013-05-04 14:47:26 -04:00
2013-06-12 12:37:40 +01:00
2013-06-12 12:37:30 +01:00
2013-05-07 11:22:14 -07:00
2013-04-29 15:54:28 -07:00
2013-06-26 15:55:52 -06:00
2013-06-26 21:10:05 +02:00
2013-05-31 17:19:05 -07:00
2013-03-19 09:47:30 +01:00
2013-06-21 11:32:51 +02:00
2013-04-29 15:54:28 -07:00
2013-04-12 10:26:23 +02:00
2013-07-03 16:08:05 -07:00
2013-07-10 18:11:34 -07:00
2013-06-17 16:38:57 -07:00
2013-07-09 12:09:43 -07:00
2013-02-19 08:43:34 +01:00
2013-06-17 18:09:53 +09:00
2013-03-29 15:31:30 -04:00
2013-06-20 13:08:01 -07:00
2013-04-30 15:50:12 +05:30
2013-08-20 16:48:54 -07:00
2013-05-21 12:25:02 -05:00
2013-01-15 22:43:15 -08:00
2013-03-20 12:10:38 -04:00
2013-04-29 15:54:37 -07:00
2013-05-27 10:57:53 +09:00
2013-07-02 09:52:47 -07:00
2013-07-10 18:11:34 -07:00