Driver core: Add section count to memory_block struct

Add a section count property to the memory_block struct to track the number
of memory sections that have been added/removed from a memory block. This
allows us to know when the last memory section of a memory block has been
removed so we can remove the memory block.

Signed-off-by: Nathan Fontenot <nfont@austin.ibm.com>
Reviewed-by: Robin Holt <holt@sgi.com>
Reviewed-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Nathan Fontenot
2010-10-19 12:46:19 -05:00
committed by Greg Kroah-Hartman
parent 2938ffbd46
commit 0768121597
2 changed files with 13 additions and 6 deletions

View File

@ -23,6 +23,8 @@
struct memory_block {
unsigned long phys_index;
unsigned long state;
int section_count;
/*
* This serializes all state change requests. It isn't
* held during creation because the control files are