|
@@ -129,7 +129,8 @@ parisc_agp_insert_memory(struct agp_memory *mem, off_t pg_start, int type)
|
|
|
off_t j, io_pg_start;
|
|
|
int io_pg_count;
|
|
|
|
|
|
- if (type != 0 || mem->type != 0) {
|
|
|
+ if (type != mem->type ||
|
|
|
+ agp_bridge->driver->agp_type_to_mask_type(agp_bridge, type)) {
|
|
|
return -EINVAL;
|
|
|
}
|
|
|
|
|
@@ -175,7 +176,8 @@ parisc_agp_remove_memory(struct agp_memory *mem, off_t pg_start, int type)
|
|
|
struct _parisc_agp_info *info = &parisc_agp_info;
|
|
|
int i, io_pg_start, io_pg_count;
|
|
|
|
|
|
- if (type != 0 || mem->type != 0) {
|
|
|
+ if (type != mem->type ||
|
|
|
+ agp_bridge->driver->agp_type_to_mask_type(agp_bridge, type)) {
|
|
|
return -EINVAL;
|
|
|
}
|
|
|
|