diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-05-23 10:41:50 +0200 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-06-01 21:37:10 +0200 |
commit | ea50be59345a2b714fd3ed43e1bba89906c177c3 (patch) | |
tree | c0c4b5def84b9b03143cdd2bd28e15b7632038b9 /drivers/base/memory.c | |
parent | be547436c22c3b7d934d9afd841cfd7a6807f7ab (diff) | |
download | op-kernel-dev-ea50be59345a2b714fd3ed43e1bba89906c177c3.zip op-kernel-dev-ea50be59345a2b714fd3ed43e1bba89906c177c3.tar.gz |
Driver core / MM: Drop offline_memory_block()
Since offline_memory_block(mem) is functionally equivalent to
device_offline(&mem->dev), make the only caller of the former use
the latter instead and drop offline_memory_block() entirely.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Toshi Kani <toshi.kani@hp.com>
Diffstat (limited to 'drivers/base/memory.c')
-rw-r--r-- | drivers/base/memory.c | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/drivers/base/memory.c b/drivers/base/memory.c index c7092bc..4ebf97f 100644 --- a/drivers/base/memory.c +++ b/drivers/base/memory.c @@ -728,27 +728,6 @@ int unregister_memory_section(struct mem_section *section) } #endif /* CONFIG_MEMORY_HOTREMOVE */ -/* - * offline one memory block. If the memory block has been offlined, do nothing. - * - * Call under device_hotplug_lock. - */ -int offline_memory_block(struct memory_block *mem) -{ - int ret = 0; - - mutex_lock(&mem->state_mutex); - if (mem->state != MEM_OFFLINE) { - ret = __memory_block_change_state_uevent(mem, MEM_OFFLINE, - MEM_ONLINE, -1); - if (!ret) - mem->dev.offline = true; - } - mutex_unlock(&mem->state_mutex); - - return ret; -} - /* return true if the memory block is offlined, otherwise, return false */ bool is_memblock_offlined(struct memory_block *mem) { |