Initial Contribution
msm-2.6.38: tag AU_LINUX_ANDROID_GINGERBREAD.02.03.04.00.142 Signed-off-by: Bryan Huntsman <bryanh@codeaurora.org>
This commit is contained in:
@@ -562,6 +562,39 @@ out_unlock:
|
||||
raw_spin_unlock_irqrestore(&db->lock, flags);
|
||||
}
|
||||
|
||||
/**
|
||||
* debug_object_assert_init - debug checks when object should be init-ed
|
||||
* @addr: address of the object
|
||||
* @descr: pointer to an object specific debug description structure
|
||||
*/
|
||||
void debug_object_assert_init(void *addr, struct debug_obj_descr *descr)
|
||||
{
|
||||
struct debug_bucket *db;
|
||||
struct debug_obj *obj;
|
||||
unsigned long flags;
|
||||
|
||||
if (!debug_objects_enabled)
|
||||
return;
|
||||
|
||||
db = get_bucket((unsigned long) addr);
|
||||
|
||||
raw_spin_lock_irqsave(&db->lock, flags);
|
||||
|
||||
obj = lookup_object(addr, db);
|
||||
if (!obj) {
|
||||
raw_spin_unlock_irqrestore(&db->lock, flags);
|
||||
/*
|
||||
* Maybe the object is static. Let the type specific
|
||||
* code decide what to do.
|
||||
*/
|
||||
debug_object_fixup(descr->fixup_assert_init, addr,
|
||||
ODEBUG_STATE_NOTAVAILABLE);
|
||||
return;
|
||||
}
|
||||
|
||||
raw_spin_unlock_irqrestore(&db->lock, flags);
|
||||
}
|
||||
|
||||
/**
|
||||
* debug_object_active_state - debug checks object usage state machine
|
||||
* @addr: address of the object
|
||||
|
||||
Reference in New Issue
Block a user