Fix a bug callback is triggered wrongly when different storage's state is changed.
Change-Id: Ia929a9d4cc7eee7990f79b73a8fe42cd7fca939b
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
return ret;
}
- SYS_G_LIST_FOREACH(cb_list[STORAGE_CALLBACK_ID], elem, cb_info)
+ SYS_G_LIST_FOREACH(cb_list[STORAGE_CALLBACK_ID], elem, cb_info) {
+ if (dev->storage_id != cb_info->id)
+ continue;
+
cb_info->state_cb(cb_info->id, state, cb_info->user_data);
+ }
return 0;
}