These changes are the raw update to linux-4.4.6-rt14. Kernel sources
[kvmfornfv.git] / kernel / include / linux / livepatch.h
index ee6dbb3..31db7a0 100644 (file)
@@ -99,7 +99,7 @@ struct klp_object {
        struct klp_func *funcs;
 
        /* internal */
-       struct kobject *kobj;
+       struct kobject kobj;
        struct module *mod;
        enum klp_state state;
 };
@@ -123,6 +123,12 @@ struct klp_patch {
        enum klp_state state;
 };
 
+#define klp_for_each_object(patch, obj) \
+       for (obj = patch->objs; obj->funcs; obj++)
+
+#define klp_for_each_func(obj, func) \
+       for (func = obj->funcs; func->old_name; func++)
+
 int klp_register_patch(struct klp_patch *);
 int klp_unregister_patch(struct klp_patch *);
 int klp_enable_patch(struct klp_patch *);