mtd/drivers/mtd/devices blkmtd-25.c,1.2,1.3 blkmtd.c,1.17,1.18 doc2000.c,1.50,1.51 doc2001.c,1.38,1.39 lart.c,1.3,1.4 ms02-nv.c,1.2,1.3 mtdram.c,1.29,1.30 pmc551.c,1.22,1.23slram.c,1.28,1.29

David Woodhouse dwmw2 at infradead.org
Wed May 14 18:27:02 EDT 2003


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

Modified Files:
	blkmtd-25.c blkmtd.c doc2000.c doc2001.c lart.c ms02-nv.c 
	mtdram.c pmc551.c slram.c 
Log Message:
fix races in get_mtd_device etc, use set_module_owner everywhere

Index: blkmtd-25.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/devices/blkmtd-25.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- blkmtd-25.c	24 Jan 2003 13:00:24 -0000	1.2
+++ blkmtd-25.c	14 May 2003 22:26:27 -0000	1.3
@@ -731,7 +731,7 @@
 	}
 	dev->mtd_info.read = blkmtd_read;
 	dev->mtd_info.priv = dev;
-	dev->mtd_info.module = THIS_MODULE;
+	set_module_owner(&dev->mtd_info);
 
 	list_add(&dev->list, &blkmtd_device_list);
 	if (add_mtd_device(&dev->mtd_info)) {

Index: blkmtd.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/devices/blkmtd.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- blkmtd.c	24 Jan 2003 13:00:24 -0000	1.17
+++ blkmtd.c	14 May 2003 22:26:27 -0000	1.18
@@ -912,7 +912,7 @@
 	dev->mtd_info.point = 0;
 	dev->mtd_info.unpoint = 0;
 	dev->mtd_info.priv = dev;
-	dev->mtd_info.module = THIS_MODULE;
+	set_module_owner(&dev->mtd_info);
 
 	list_add(&dev->list, &blkmtd_device_list);
 	if (add_mtd_device(&dev->mtd_info)) {

Index: doc2000.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/devices/doc2000.c,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -r1.50 -r1.51
--- doc2000.c	10 Dec 2002 15:05:42 -0000	1.50
+++ doc2000.c	14 May 2003 22:26:28 -0000	1.51
@@ -557,7 +557,7 @@
 	mtd->erasesize = 0;
 	mtd->oobblock = 512;
 	mtd->oobsize = 16;
-	mtd->module = THIS_MODULE;
+	set_module_owner(mtd);
 	mtd->erase = doc_erase;
 	mtd->point = NULL;
 	mtd->unpoint = NULL;

Index: doc2001.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/devices/doc2001.c,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -r1.38 -r1.39
--- doc2001.c	10 Dec 2002 15:05:42 -0000	1.38
+++ doc2001.c	14 May 2003 22:26:28 -0000	1.39
@@ -366,7 +366,7 @@
 
 	mtd->oobblock = 512;
 	mtd->oobsize = 16;
-	mtd->module = THIS_MODULE;
+	set_module_owner(mtd);
 	mtd->erase = doc_erase;
 	mtd->point = NULL;
 	mtd->unpoint = NULL;

Index: lart.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/devices/lart.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- lart.c	22 Apr 2003 20:12:47 -0000	1.3
+++ lart.c	14 May 2003 22:26:28 -0000	1.4
@@ -641,10 +641,10 @@
    mtd.erasesize = FLASH_BLOCKSIZE_MAIN;
    mtd.numeraseregions = NB_OF (erase_regions);
    mtd.eraseregions = erase_regions;
-   mtd.module = THIS_MODULE;
    mtd.erase = flash_erase;
    mtd.read = flash_read;
    mtd.write = flash_write;
+   set_module_owner(&mtd);
 
 #ifdef LART_DEBUG
    printk (KERN_DEBUG

Index: ms02-nv.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/devices/ms02-nv.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ms02-nv.c	24 Jan 2003 14:05:17 -0000	1.2
+++ ms02-nv.c	14 May 2003 22:26:28 -0000	1.3
@@ -222,7 +222,7 @@
 	mtd->flags = MTD_CAP_RAM | MTD_XIP;
 	mtd->size = fixsize;
 	mtd->name = (char *)ms02nv_name;
-	mtd->module = THIS_MODULE;
+	set_module_owner(mtd);
 	mtd->read = ms02nv_read;
 	mtd->write = ms02nv_write;
 

Index: mtdram.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/devices/mtdram.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- mtdram.c	21 Oct 2002 13:40:06 -0000	1.29
+++ mtdram.c	14 May 2003 22:26:28 -0000	1.30
@@ -136,7 +136,7 @@
    mtd->erasesize = MTDRAM_ERASE_SIZE;
    mtd->priv = mapped_address;
 
-   mtd->module = THIS_MODULE;
+   set_module_owner(mtd);
    mtd->erase = ram_erase;
    mtd->point = ram_point;
    mtd->unpoint = ram_unpoint;

Index: pmc551.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/devices/pmc551.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- pmc551.c	24 Jan 2003 13:34:30 -0000	1.22
+++ pmc551.c	14 May 2003 22:26:28 -0000	1.23
@@ -787,10 +787,10 @@
                 mtd->write 	= pmc551_write;
                 mtd->point 	= pmc551_point;
                 mtd->unpoint 	= pmc551_unpoint;
-                mtd->module 	= THIS_MODULE;
                 mtd->type 	= MTD_RAM;
                 mtd->name 	= "PMC551 RAM board";
                 mtd->erasesize 	= 0x10000;
+		set_module_owner(mtd);
 
                 if (add_mtd_device(mtd)) {
                         printk(KERN_NOTICE "pmc551: Failed to register new device\n");

Index: slram.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/devices/slram.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- slram.c	24 Jan 2003 13:35:34 -0000	1.28
+++ slram.c	14 May 2003 22:26:28 -0000	1.29
@@ -199,7 +199,7 @@
 	(*curmtd)->mtdinfo->unpoint = slram_unpoint;
 	(*curmtd)->mtdinfo->read = slram_read;
 	(*curmtd)->mtdinfo->write = slram_write;
-	(*curmtd)->mtdinfo->module = THIS_MODULE;
+	set_module_owner((*curmtd)->mtdinfo);
 	(*curmtd)->mtdinfo->type = MTD_RAM;
 	(*curmtd)->mtdinfo->erasesize = 0x0;
 




More information about the linux-mtd-cvs mailing list