diff options
Diffstat (limited to 'drivers/char/agp/parisc-agp.c')
| -rw-r--r-- | drivers/char/agp/parisc-agp.c | 8 | 
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/char/agp/parisc-agp.c b/drivers/char/agp/parisc-agp.c index 94821ab01c6..15f2e7025b7 100644 --- a/drivers/char/agp/parisc-agp.c +++ b/drivers/char/agp/parisc-agp.c @@ -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;  	} @@ -333,7 +335,7 @@ parisc_agp_setup(void __iomem *ioc_hpa, void __iomem *lba_hpa)  	struct agp_bridge_data *bridge;  	int error = 0; -	fake_bridge_dev = alloc_pci_dev(); +	fake_bridge_dev = pci_alloc_dev(NULL);  	if (!fake_bridge_dev) {  		error = -ENOMEM;  		goto fail;  | 
