mtd/drivers/mtd/devices blkmtd.c,1.11,1.12

spse at infradead.org spse at infradead.org
Wed Sep 4 17:43:40 EDT 2002


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

Modified Files:
	blkmtd.c 
Log Message:


Formatting cleanup (tabs -> 8 spaces)
No code changes

Index: blkmtd.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/devices/blkmtd.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- blkmtd.c	4 Sep 2002 21:35:23 -0000	1.11
+++ blkmtd.c	4 Sep 2002 21:43:37 -0000	1.12
@@ -74,23 +74,25 @@
 
 /* Info for the block device */
 typedef struct mtd_raw_dev_data_s {
-  struct block_device *binding;
-  int sector_size, sector_bits;
-  int partial_last_page;   // 0 if device ends on page boundary, else page no of last page
-  int last_page_sectors;   // Number of sectors in last page if partial_last_page != 0
-  size_t totalsize;
-  int readonly;
-  struct address_space as;
-  struct mtd_info mtd_info;
[...2113 lines suppressed...]
+		if(mtd_rawdevice->mtd_info.eraseregions)
+			kfree(mtd_rawdevice->mtd_info.eraseregions);
+		if(mtd_rawdevice->mtd_info.name)
+			kfree(mtd_rawdevice->mtd_info.name);
+		if(mtd_rawdevice->binding) 
+			blkdev_put(mtd_rawdevice->binding, BDEV_RAW);
+		kfree(mtd_rawdevice);
+	}
+
+	if(write_queue) {
+		kfree(write_queue);
+		write_queue = NULL;
+	}
+
+	if(erase_page) 
+		__free_pages(erase_page, 0);
+	return err;
 }
 
 module_init(init_blkmtd);





More information about the linux-mtd-cvs mailing list