Lines Matching defs:new
98 struct agp_memory *new;
104 new = kzalloc(sizeof(struct agp_memory), GFP_KERNEL);
105 if (new == NULL)
108 new->key = agp_get_key();
110 if (new->key < 0) {
111 kfree(new);
115 agp_alloc_page_array(alloc_size, new);
117 if (new->pages == NULL) {
118 agp_free_key(new->key);
119 kfree(new);
122 new->num_scratch_pages = 0;
123 return new;
128 struct agp_memory *new;
130 new = kzalloc(sizeof(struct agp_memory), GFP_KERNEL);
131 if (new == NULL)
134 new->key = agp_get_key();
136 if (new->key < 0) {
137 kfree(new);
141 agp_alloc_page_array(PAGE_SIZE * scratch_pages, new);
143 if (new->pages == NULL) {
144 agp_free_key(new->key);
145 kfree(new);
148 new->num_scratch_pages = scratch_pages;
149 new->type = AGP_NORMAL_MEMORY;
150 return new;
222 struct agp_memory *new;
235 new = agp_generic_alloc_user(page_count, type);
236 if (new)
237 new->bridge = bridge;
238 return new;
242 new = bridge->driver->alloc_by_type(page_count, type);
243 if (new)
244 new->bridge = bridge;
245 return new;
250 new = agp_create_memory(scratch_pages);
252 if (new == NULL)
256 if (bridge->driver->agp_alloc_pages(bridge, new, page_count)) {
257 agp_free_memory(new);
260 new->bridge = bridge;
261 return new;
268 agp_free_memory(new);
271 new->pages[i] = page;
272 new->page_count++;
274 new->bridge = bridge;
276 return new;
1161 struct agp_memory *new;
1166 new = agp_create_user_memory(page_count);
1167 if (new == NULL)
1171 new->pages[i] = NULL;
1172 new->page_count = 0;
1173 new->type = type;
1174 new->num_scratch_pages = pages;
1176 return new;