Lines Matching refs:new
115 struct agp_memory *new;
121 new = kzalloc(sizeof(struct agp_memory), GFP_KERNEL);
122 if (new == NULL)
125 new->key = agp_get_key();
127 if (new->key < 0) {
128 kfree(new);
132 agp_alloc_page_array(alloc_size, new);
134 if (new->pages == NULL) {
135 agp_free_key(new->key);
136 kfree(new);
139 new->num_scratch_pages = 0;
140 return new;
145 struct agp_memory *new;
147 new = kzalloc(sizeof(struct agp_memory), GFP_KERNEL);
148 if (new == NULL)
151 new->key = agp_get_key();
153 if (new->key < 0) {
154 kfree(new);
158 agp_alloc_page_array(PAGE_SIZE * scratch_pages, new);
160 if (new->pages == NULL) {
161 agp_free_key(new->key);
162 kfree(new);
165 new->num_scratch_pages = scratch_pages;
166 new->type = AGP_NORMAL_MEMORY;
167 return new;
238 struct agp_memory *new;
251 new = agp_generic_alloc_user(page_count, type);
252 if (new)
253 new->bridge = bridge;
254 return new;
258 new = bridge->driver->alloc_by_type(page_count, type);
259 if (new)
260 new->bridge = bridge;
261 return new;
266 new = agp_create_memory(scratch_pages);
268 if (new == NULL)
272 if (bridge->driver->agp_alloc_pages(bridge, new, page_count)) {
273 agp_free_memory(new);
276 new->bridge = bridge;
277 return new;
284 agp_free_memory(new);
287 new->pages[i] = page;
288 new->page_count++;
290 new->bridge = bridge;
292 return new;
1183 struct agp_memory *new;
1188 new = agp_create_user_memory(page_count);
1189 if (new == NULL)
1193 new->pages[i] = NULL;
1194 new->page_count = 0;
1195 new->type = type;
1196 new->num_scratch_pages = pages;
1198 return new;