Lines Matching refs:p

39 	struct probe *p;  in kobj_map()  local
44 p = kmalloc_array(n, sizeof(struct probe), GFP_KERNEL); in kobj_map()
45 if (p == NULL) in kobj_map()
48 for (i = 0; i < n; i++, p++) { in kobj_map()
49 p->owner = module; in kobj_map()
50 p->get = probe; in kobj_map()
51 p->lock = lock; in kobj_map()
52 p->dev = dev; in kobj_map()
53 p->range = range; in kobj_map()
54 p->data = data; in kobj_map()
57 for (i = 0, p -= n; i < n; i++, p++, index++) { in kobj_map()
61 p->next = *s; in kobj_map()
62 *s = p; in kobj_map()
82 struct probe *p = *s; in kobj_unmap() local
83 if (p->dev == dev && p->range == range) { in kobj_unmap()
84 *s = p->next; in kobj_unmap()
86 found = p; in kobj_unmap()
98 struct probe *p; in kobj_lookup() local
103 for (p = domain->probes[MAJOR(dev) % 255]; p; p = p->next) { in kobj_lookup()
108 if (p->dev > dev || p->dev + p->range - 1 < dev) in kobj_lookup()
110 if (p->range - 1 >= best) in kobj_lookup()
112 if (!try_module_get(p->owner)) in kobj_lookup()
114 owner = p->owner; in kobj_lookup()
115 data = p->data; in kobj_lookup()
116 probe = p->get; in kobj_lookup()
117 best = p->range - 1; in kobj_lookup()
118 *index = dev - p->dev; in kobj_lookup()
119 if (p->lock && p->lock(dev, data) < 0) { in kobj_lookup()
137 struct kobj_map *p = kmalloc(sizeof(struct kobj_map), GFP_KERNEL); in kobj_map_init() local
141 if ((p == NULL) || (base == NULL)) { in kobj_map_init()
142 kfree(p); in kobj_map_init()
151 p->probes[i] = base; in kobj_map_init()
152 p->lock = lock; in kobj_map_init()
153 return p; in kobj_map_init()