Lines Matching refs:p
70 static void __get_ref(struct api_info *p) in __get_ref() argument
72 p->refcnt++; in __get_ref()
75 static void __put_ref(struct api_info *p) in __put_ref() argument
77 if (--p->refcnt == 0) { in __put_ref()
80 sun4v_set_version(p->group, 0, 0, &ignore); in __put_ref()
81 p->major = p->minor = 0; in __put_ref()
99 struct api_info *p; in sun4v_hvapi_register() local
104 p = __get_info(group); in sun4v_hvapi_register()
106 if (p) { in sun4v_hvapi_register()
107 if (p->refcnt) { in sun4v_hvapi_register()
109 if (p->major == major) { in sun4v_hvapi_register()
110 *minor = p->minor; in sun4v_hvapi_register()
122 p->major = major; in sun4v_hvapi_register()
123 p->minor = actual_minor; in sun4v_hvapi_register()
127 if (p->flags & FLAG_PRE_API) { in sun4v_hvapi_register()
129 p->major = 1; in sun4v_hvapi_register()
130 p->minor = 0; in sun4v_hvapi_register()
139 __get_ref(p); in sun4v_hvapi_register()
149 struct api_info *p; in sun4v_hvapi_unregister() local
153 p = __get_info(group); in sun4v_hvapi_unregister()
154 if (p) in sun4v_hvapi_unregister()
155 __put_ref(p); in sun4v_hvapi_unregister()
164 struct api_info *p; in sun4v_hvapi_get() local
170 p = __get_info(group); in sun4v_hvapi_get()
171 if (p && p->refcnt) { in sun4v_hvapi_get()
172 *major = p->major; in sun4v_hvapi_get()
173 *minor = p->minor; in sun4v_hvapi_get()