mtd/drivers/mtd/maps amd76xrom.c,1.1,1.2

Thayne Harbaugh tharbaugh at lnxi.com
Thu Mar 6 17:22:40 EST 2003


Update of /home/cvs/mtd/drivers/mtd/maps
In directory phoenix.infradead.org:/tmp/cvs-serv19824/drivers/mtd/maps

Modified Files:
	amd76xrom.c 
Log Message:
Fix warning about freeing resource.  Better comments for the #if code disabling

Index: amd76xrom.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/maps/amd76xrom.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- amd76xrom.c	18 Oct 2002 22:45:48 -0000	1.1
+++ amd76xrom.c	6 Mar 2003 22:22:37 -0000	1.2
@@ -113,7 +113,10 @@
 	u32 rom_size;
 
 	window = &rom_window[0];
-#if 0
+
+	/* disabled because it fights with BIOS reserved regions */
+#define REQUEST_MEM_REGION 0
+#if REQUEST_MEM_REGION
 	while(window->size) {
 		if (request_mem_region(window->start, window->size, "amd76xrom")) {
 			break;
@@ -124,7 +127,7 @@
 		printk(KERN_ERR "amd76xrom: cannot reserve rom window\n");
 		goto err_out_none;
 	}
-#endif
+#endif /* REQUEST_MEM_REGION */
 
 	/* Enable the selected rom window */
 	pci_read_config_byte(pdev, 0x43, &byte);
@@ -177,8 +180,10 @@
 err_out_iounmap:
 	iounmap((void *)(info->window_addr));
 err_out_free_mmio_region:
+#if REQUEST_MEM_REGION
 	release_mem_region(window->start, window->size);
 err_out_none:
+#endif /* REQUEST_MEM_REGION */
 	return -ENODEV;
 }
 
@@ -199,8 +204,10 @@
 	/* Disable writes through the rom window */
 	pci_read_config_byte(pdev, 0x40, &byte);
 	pci_write_config_byte(pdev, 0x40, byte & ~1);
-	
+
+#if REQUEST_MEM_REGION
 	release_mem_region(info->window_start, info->window_size);
+#endif /* REQUEST_MEM_REGION */
 }
 
 static struct pci_device_id amd76xrom_pci_tbl[] __devinitdata = {





More information about the linux-mtd-cvs mailing list