Files
android_kernel_xiaomi_sm8450/drivers
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-07-26 08:57:56 -04:00
2013-06-27 13:42:16 -04:00
2013-07-25 13:50:30 -07:00
2013-07-23 16:01:28 -07:00
2013-07-29 12:30:13 -07:00
2013-07-29 12:30:13 -07:00
2013-06-28 13:01:40 +02:00
2013-07-22 09:34:46 +08:00