mtd/drivers/mtd/maps amd76xrom.c,1.4,1.5 arctic-mtd.c,1.5,1.6 autcpu12-nvram.c,1.2,1.3 beech-mtd.c,1.4,1.5 cdb89712.c,1.4,1.5 ceiva.c,1.4,1.5 cfi_flagadm.c,1.8,1.9 cstm_mips_ixx.c,1.6,1.7 dbox2-flash.c,1.6,1.7 dc21285.c,1.11,1.12 dilnetpc.c,1.9,1.10 ebony.c,1.4,1.5 edb7312.c,1.4,1.5 elan-104nc.c,1.14,1.15 epxa10db-flash.c,1.6,1.7 fortunet.c,1.3,1.4 h720x-flash.c,1.2,1.3 ich2rom.c,1.4,1.5 impa7.c,1.4,1.5 integrator-flash.c,1.9,1.10 iq80310.c,1.11,1.12 l440gx.c,1.9,1.10 lasat.c,1.2,1.3 lubbock-flash.c,1.3,1.4 mbx860.c,1.2,1.3 netsc520.c,1.6,1.7 nettel.c,1.2,1.3 nora.c,1.21,1.22 ocelot.c,1.8,1.9 octagon-5066.c,1.21,1.22 pb1xxx-flash.c,1.5,1.6 pci.c,1.3,1.4 pcmciamtd.c,1.41,1.42 physmap.c,1.23,1.24 pnc2000.c,1.11,1.12 redwood.c,1.3,1.4 rpxlite.c,1.16,1.17 sa1100-flash.c,1.31,1.32 sbc_gxx.c,1.22,1.23 sc520cdp.c,1.12,1.13 scb2_flash.c,1.3,1.4 scx200_docflash.c,1.2,1.3 solutionengine.c,1.6,1.7 sun_uflash.c,1.5,1.6 tqm8xxl.c,1.5,1.6 tsunami_flash.c,1.2,1.3 uclinux.c,1.3,1.4 vmax301.c,1.25,1.26

David Woodhouse dwmw2 at infradead.org
Wed May 14 18:26:35 EDT 2003


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

Modified Files:
	amd76xrom.c arctic-mtd.c autcpu12-nvram.c beech-mtd.c 
	cdb89712.c ceiva.c cfi_flagadm.c cstm_mips_ixx.c dbox2-flash.c 
	dc21285.c dilnetpc.c ebony.c edb7312.c elan-104nc.c 
	epxa10db-flash.c fortunet.c h720x-flash.c ich2rom.c impa7.c 
	integrator-flash.c iq80310.c l440gx.c lasat.c lubbock-flash.c 
	mbx860.c netsc520.c nettel.c nora.c ocelot.c octagon-5066.c 
	pb1xxx-flash.c pci.c pcmciamtd.c physmap.c pnc2000.c redwood.c 
	rpxlite.c sa1100-flash.c sbc_gxx.c sc520cdp.c scb2_flash.c 
	scx200_docflash.c solutionengine.c sun_uflash.c tqm8xxl.c 
	tsunami_flash.c uclinux.c vmax301.c 
Log Message:
fix races in get_mtd_device etc, use set_module_owner everywhere

Index: amd76xrom.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/maps/amd76xrom.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- amd76xrom.c	14 May 2003 15:05:14 -0000	1.4
+++ amd76xrom.c	14 May 2003 22:26:29 -0000	1.5
@@ -120,7 +120,7 @@
 	printk(KERN_NOTICE "amd76xrom chip at offset: 0x%x\n",
 		window->size - rom_size);
 		
-	info->mtd->module = THIS_MODULE;
+	set_module_owner(info->mtd);
 	add_mtd_device(info->mtd);
 	info->window_start = window->start;
 	info->window_size = window->size;

Index: arctic-mtd.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/maps/arctic-mtd.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- arctic-mtd.c	14 May 2003 15:05:14 -0000	1.5
+++ arctic-mtd.c	14 May 2003 22:26:29 -0000	1.6
@@ -104,7 +104,7 @@
 	if (!arctic_mtd)
 		return -ENXIO;
 
-	arctic_mtd->module = THIS_MODULE;
+	set_module_owner(arctic_mtd);
 
 	return add_mtd_partitions(arctic_mtd, arctic_partitions, 3);
 }

Index: autcpu12-nvram.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/maps/autcpu12-nvram.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- autcpu12-nvram.c	14 May 2003 15:05:14 -0000	1.2
+++ autcpu12-nvram.c	14 May 2003 22:26:29 -0000	1.3
@@ -86,7 +86,7 @@
 		goto out_ioremap;
 	}
 
-	sram_mtd->module = THIS_MODULE;
+	set_module_owner(sram_mtd);
 	sram_mtd->erasesize = 16;
 	
 	if (add_mtd_device(sram_mtd)) {

Index: beech-mtd.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/maps/beech-mtd.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- beech-mtd.c	14 May 2003 15:05:14 -0000	1.4
+++ beech-mtd.c	14 May 2003 22:26:29 -0000	1.5
@@ -88,7 +88,7 @@
 	if (!beech_mtd)
 		return -ENXIO;
 
-	beech_mtd->module = THIS_MODULE;
+	set_module_owner(beech_mtd);
 
 	return add_mtd_partitions(beech_mtd, beech_partitions, 2);
 }

Index: cdb89712.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/maps/cdb89712.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- cdb89712.c	14 May 2003 15:05:14 -0000	1.4
+++ cdb89712.c	14 May 2003 22:26:29 -0000	1.5
@@ -62,7 +62,7 @@
 		goto out_ioremap;
 	}
 
-	flash_mtd->module = THIS_MODULE;
+	set_module_owner(flash_mtd);
 	
 	if (add_mtd_device(flash_mtd)) {
 		printk("FLASH device addition failed\n");
@@ -127,7 +127,7 @@
 		goto out_ioremap;
 	}
 
-	sram_mtd->module = THIS_MODULE;
+	set_module_owner(sram_mtd);
 	sram_mtd->erasesize = 16;
 	
 	if (add_mtd_device(sram_mtd)) {
@@ -195,7 +195,7 @@
 		goto out_ioremap;
 	}
 
-	bootrom_mtd->module = THIS_MODULE;
+	set_module_owner(bootrom_mtd);
 	bootrom_mtd->erasesize = 0x10000;
 	
 	if (add_mtd_device(bootrom_mtd)) {

Index: ceiva.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/maps/ceiva.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- ceiva.c	14 May 2003 15:05:14 -0000	1.4
+++ ceiva.c	14 May 2003 22:26:29 -0000	1.5
@@ -160,7 +160,7 @@
 			ret = -ENXIO;
 			break;
 		}
-		clps[i].mtd->module = THIS_MODULE;
+		set_module_owner(clps[i].mtd);
 		subdev[i] = clps[i].mtd;
 
 		printk(KERN_INFO "clps flash: JEDEC device at 0x%08lx, %dMiB, "

Index: cfi_flagadm.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/maps/cfi_flagadm.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- cfi_flagadm.c	14 May 2003 15:05:14 -0000	1.8
+++ cfi_flagadm.c	14 May 2003 22:26:29 -0000	1.9
@@ -107,7 +107,7 @@
 
 	mymtd = do_map_probe("cfi_probe", &flagadm_map);
 	if (mymtd) {
-		mymtd->module = THIS_MODULE;
+		set_module_owner(mymtd);
 		add_mtd_partitions(mymtd, flagadm_parts, PARTITION_COUNT);
 		printk(KERN_NOTICE "FlagaDM flash device initialized\n");
 		return 0;

Index: cstm_mips_ixx.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/maps/cstm_mips_ixx.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- cstm_mips_ixx.c	14 May 2003 15:05:14 -0000	1.6
+++ cstm_mips_ixx.c	14 May 2003 22:26:29 -0000	1.7
@@ -199,7 +199,7 @@
 		        printk(KERN_NOTICE "cstm_mips_ixx %d jedec: mymtd is %x\n",i,(unsigned int)mymtd);
 		}
 		if (mymtd) {
-			mymtd->module = THIS_MODULE;
+			set_module_owner(mymtd);
 
 	                cstm_mips_ixx_map[i].map_priv_2 = (unsigned long)mymtd;
 		        add_mtd_partitions(mymtd, parts, cstm_mips_ixx_board_desc[i].num_partitions);

Index: dbox2-flash.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/maps/dbox2-flash.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- dbox2-flash.c	14 May 2003 15:05:14 -0000	1.6
+++ dbox2-flash.c	14 May 2003 22:26:29 -0000	1.7
@@ -91,7 +91,7 @@
 	}
 	    
 	if (mymtd) {
-		mymtd->module = THIS_MODULE;
+		set_module_owner(mymtd);
 
                 /* Create MTD devices for each partition. */
 	        add_mtd_partitions(mymtd, partition_info, NUM_PARTITIONS);

Index: dc21285.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/maps/dc21285.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- dc21285.c	14 May 2003 15:05:14 -0000	1.11
+++ dc21285.c	14 May 2003 22:26:29 -0000	1.12
@@ -140,7 +140,7 @@
 	if (mymtd) {
 		int nrparts = 0;
 
-		mymtd->module = THIS_MODULE;
+		set_module_owner(mymtd);
 			
 		/* partition fixup */
 

Index: dilnetpc.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/maps/dilnetpc.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- dilnetpc.c	14 May 2003 15:05:14 -0000	1.9
+++ dilnetpc.c	14 May 2003 22:26:29 -0000	1.10
@@ -433,7 +433,7 @@
 		return -ENXIO;
 	}
 		
-	mymtd->module = THIS_MODULE;
+	set_module_owner(mymtd);
 
 	/*
 	** Supply pointers to lowlvl_parts[] array to add_mtd_partitions()

Index: ebony.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/maps/ebony.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- ebony.c	14 May 2003 15:05:14 -0000	1.4
+++ ebony.c	14 May 2003 22:26:29 -0000	1.5
@@ -106,7 +106,7 @@
 
 	flash = do_map_probe("map_rom", &ebony_small_map);
 	if (flash) {
-		flash->module = THIS_MODULE;
+		set_module_owner(flash);
 		add_mtd_partitions(flash, ebony_small_partitions,
 					NB_OF(ebony_small_partitions));
 	} else {
@@ -128,7 +128,7 @@
 
 	flash = do_map_probe("cfi_probe", &ebony_large_map);
 	if (flash) {
-		flash->module = THIS_MODULE;
+		set_module_owner(flash);
 		add_mtd_partitions(flash, ebony_large_partitions,
 					NB_OF(ebony_large_partitions));
 	} else {

Index: edb7312.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/maps/edb7312.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- edb7312.c	14 May 2003 15:05:14 -0000	1.4
+++ edb7312.c	14 May 2003 22:26:29 -0000	1.5
@@ -97,7 +97,7 @@
 		mymtd = do_map_probe(*type, &edb7312nor_map);
 	}
 	if (mymtd) {
-		mymtd->module = THIS_MODULE;
+		set_module_owner(mymtd);
 
 #ifdef CONFIG_MTD_PARTITIONS
 #ifdef CONFIG_MTD_CMDLINE_PARTS

Index: elan-104nc.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/maps/elan-104nc.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- elan-104nc.c	14 May 2003 15:05:14 -0000	1.14
+++ elan-104nc.c	14 May 2003 22:26:29 -0000	1.15
@@ -261,7 +261,7 @@
 		return -ENXIO;
 	}
 	
-	all_mtd->module=THIS_MODULE;
+	set_module_owner(all_mtd);
 
 	/* Create MTD devices for each partition. */
 	add_mtd_partitions( all_mtd, partition_info, NUM_PARTITIONS );

Index: epxa10db-flash.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/maps/epxa10db-flash.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- epxa10db-flash.c	14 May 2003 15:05:14 -0000	1.6
+++ epxa10db-flash.c	14 May 2003 22:26:29 -0000	1.7
@@ -73,7 +73,7 @@
 		return -ENXIO;
 	}
 
-	mymtd->module = THIS_MODULE;
+	set_module_owner(mymtd);
 
 	/* Unlock the flash device. */
 	if(mymtd->unlock){

Index: fortunet.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/maps/fortunet.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- fortunet.c	14 May 2003 15:05:14 -0000	1.3
+++ fortunet.c	14 May 2003 22:26:30 -0000	1.4
@@ -236,7 +236,7 @@
 				map_regions[ix].mymtd = do_map_probe("cfi_probe",
 					&map_regions[ix].map_info);
 			}
-			map_regions[ix].mymtd->module = THIS_MODULE;
+			set_module_owner(map_regions[ix].mymtd);
 			add_mtd_partitions(map_regions[ix].mymtd,
 				map_regions[ix].parts,map_regions_parts[ix]);
 		}

Index: h720x-flash.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/maps/h720x-flash.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- h720x-flash.c	14 May 2003 15:05:14 -0000	1.2
+++ h720x-flash.c	14 May 2003 22:26:30 -0000	1.3
@@ -88,7 +88,7 @@
 	}
 	    
 	if (mymtd) {
-		mymtd->module = THIS_MODULE;
+		set_module_owner(mymtd);
 
 #ifdef CONFIG_MTD_CMDLINE_PARTS
 		nr_mtd_parts = parse_cmdline_partitions(mymtd, &mtd_parts, h720x_map.name);

Index: ich2rom.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/maps/ich2rom.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- ich2rom.c	14 May 2003 15:05:14 -0000	1.4
+++ ich2rom.c	14 May 2003 22:26:30 -0000	1.5
@@ -222,7 +222,7 @@
 	info->mtd->lock = ich2rom_lock;
 	info->mtd->unlock = ich2rom_unlock;
 		
-	info->mtd->module = THIS_MODULE;
+	set_module_owner(info->mtd);
 	add_mtd_device(info->mtd);
 	return 0;
 

Index: impa7.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/maps/impa7.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- impa7.c	14 May 2003 15:05:14 -0000	1.4
+++ impa7.c	14 May 2003 22:26:30 -0000	1.5
@@ -107,7 +107,7 @@
 
 		if (impa7_mtd[i]) 
 		{
-			impa7_mtd[i]->module = THIS_MODULE;
+			set_module_owner(impa7_mtd[i]);
 			add_mtd_device(impa7_mtd[i]);
 			devicesfound++;
 #ifdef CONFIG_MTD_PARTITIONS

Index: integrator-flash.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/maps/integrator-flash.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- integrator-flash.c	14 May 2003 15:05:14 -0000	1.9
+++ integrator-flash.c	14 May 2003 22:26:30 -0000	1.10
@@ -187,7 +187,7 @@
 	if (!mtd)
 		return -ENXIO;
 
-	mtd->module = THIS_MODULE;
+	set_module_owner(mtd);
 
 	ret = parse_afs_partitions(mtd, &parts, (void *)0);
 	if (ret > 0) {

Index: iq80310.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/maps/iq80310.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- iq80310.c	14 May 2003 15:05:15 -0000	1.11
+++ iq80310.c	14 May 2003 22:26:30 -0000	1.12
@@ -79,7 +79,7 @@
 		iounmap((void *)iq80310_map.virt);
 		return -ENXIO;
 	}
-	mymtd->module = THIS_MODULE;
+	set_module_owner(mymtd);
 
 #ifdef CONFIG_MTD_REDBOOT_PARTS
 	if (parsed_nr_parts == 0) {

Index: l440gx.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/maps/l440gx.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- l440gx.c	14 May 2003 15:05:15 -0000	1.9
+++ l440gx.c	14 May 2003 22:26:30 -0000	1.10
@@ -130,7 +130,7 @@
 		mymtd = do_map_probe("map_rom", &l440gx_map);
 	}
 	if (mymtd) {
-		mymtd->module = THIS_MODULE;
+		set_module_owner(mymtd);
 
 		add_mtd_device(mymtd);
 		return 0;

Index: lasat.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/maps/lasat.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- lasat.c	14 May 2003 15:05:15 -0000	1.2
+++ lasat.c	14 May 2003 22:26:30 -0000	1.3
@@ -58,7 +58,7 @@
 	if (mymtd) {
 		u32 size, offset = 0;
 
-		mymtd->module = THIS_MODULE;
+		set_module_owner(mymtd);
 
 		for (i=0; i < LASAT_MTD_LAST; i++) {
 			size = lasat_flash_partition_size(i);

Index: lubbock-flash.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/maps/lubbock-flash.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- lubbock-flash.c	14 May 2003 15:05:15 -0000	1.3
+++ lubbock-flash.c	14 May 2003 22:26:30 -0000	1.4
@@ -95,7 +95,7 @@
 				ret = -EIO;
 			continue;
 		}
-		mymtds[i]->module = THIS_MODULE;
+		set_module_owner(mymtds[i]);
 
 #ifdef CONFIG_MTD_REDBOOT_PARTS
 		int ret = parse_redboot_partitions(mymtds[i], &parsed_parts[i], 0);

Index: mbx860.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/maps/mbx860.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- mbx860.c	14 May 2003 15:05:15 -0000	1.2
+++ mbx860.c	14 May 2003 22:26:30 -0000	1.3
@@ -69,7 +69,7 @@
 
 	mymtd = do_map_probe("jedec_probe", &mbx_map);
 	if (mymtd) {
-		mymtd->module = THIS_MODULE;
+		set_module_owner(mymtd);
 		add_mtd_device(mymtd);
                 add_mtd_partitions(mymtd, partition_info, NUM_PARTITIONS);
 		return 0;

Index: netsc520.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/maps/netsc520.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- netsc520.c	14 May 2003 15:05:15 -0000	1.6
+++ netsc520.c	14 May 2003 22:26:30 -0000	1.7
@@ -114,7 +114,7 @@
 		return -ENXIO;
 	}
 		
-	mymtd->module = THIS_MODULE;
+	set_module_owner(mymtd);
 	add_mtd_partitions( mymtd, partition_info, NUM_PARTITIONS );
 	return 0;
 }

Index: nettel.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/maps/nettel.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- nettel.c	14 May 2003 15:05:15 -0000	1.2
+++ nettel.c	14 May 2003 22:26:30 -0000	1.3
@@ -285,7 +285,7 @@
 		printk(KERN_NOTICE "SNAPGEAR: AMD flash device size = %dK\n",
 			amd_mtd->size>>10);
 
-		amd_mtd->module = THIS_MODULE;
+		set_module_owner(amd_mtd);
 
 		/* The high BIOS partition is only present for 2MB units */
 		num_amd_partitions = NUM_AMD_PARTITIONS;
@@ -416,7 +416,7 @@
 	printk(KERN_NOTICE "SNAPGEAR: Intel flash device size = %dK\n",
 		(intel_mtd->size >> 10));
 
-	intel_mtd->module = THIS_MODULE;
+	set_module_owner(intel_mtd);
 
 #ifndef CONFIG_BLK_DEV_INITRD
 	ROOT_DEV = MKDEV(MTD_BLOCK_MAJOR, 1);

Index: nora.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/maps/nora.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- nora.c	2 Oct 2001 15:05:14 -0000	1.21
+++ nora.c	14 May 2003 22:26:30 -0000	1.22
@@ -173,7 +173,7 @@
 
 	mymtd = do_map_probe("cfi_probe", &nora_map);
 	if (mymtd) {
-		mymtd->module = THIS_MODULE;
+		set_module_owner(mymtd);
 		
 		add_mtd_device(&nora_mtds[2]);
 		add_mtd_device(&nora_mtds[0]);

Index: ocelot.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/maps/ocelot.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- ocelot.c	14 May 2003 15:05:15 -0000	1.8
+++ ocelot.c	14 May 2003 22:26:30 -0000	1.9
@@ -92,7 +92,7 @@
 		printk("NVRAM probe failed\n");
 		goto fail_1;
 	}
-	nvram_mtd->module = THIS_MODULE;
+	set_module_owner(nvram_mtd);
 	nvram_mtd->erasesize = 16;
 	/* Override the write() method */
 	nvram_mtd->write = ocelot_ram_write;
@@ -126,7 +126,7 @@
 
 	add_mtd_device(nvram_mtd);
 
-	flash_mtd->module = THIS_MODULE;
+	set_module_owner(flash_mtd);
 	nr_parts = parse_redboot_partitions(flash_mtd, &parsed_parts, (void *)0);
 
 	if (nr_parts)

Index: octagon-5066.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/maps/octagon-5066.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- octagon-5066.c	14 May 2003 15:05:15 -0000	1.21
+++ octagon-5066.c	14 May 2003 22:26:30 -0000	1.22
@@ -264,7 +264,7 @@
 		if (!oct5066_mtd[i])
 			oct5066_mtd[i] = do_map_probe("map_rom", &oct5066_map[i]);
 		if (oct5066_mtd[i]) {
-			oct5066_mtd[i]->module = THIS_MODULE;
+			set_module_owner(oct5066_mtd[i]);
 			add_mtd_device(oct5066_mtd[i]);
 		}
 	}

Index: pb1xxx-flash.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/maps/pb1xxx-flash.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- pb1xxx-flash.c	14 May 2003 15:05:15 -0000	1.5
+++ pb1xxx-flash.c	14 May 2003 22:26:30 -0000	1.6
@@ -169,7 +169,7 @@
 		iounmap(pb1xxx_map.virt);
 		return -ENXIO;
 	}
-	mymtd->module = THIS_MODULE;
+	set_module_owner(mymtd);
 
 	add_mtd_partitions(mymtd, parts, nb_parts);
 	return 0;

Index: pci.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/maps/pci.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- pci.c	14 May 2003 15:05:15 -0000	1.3
+++ pci.c	14 May 2003 22:26:30 -0000	1.4
@@ -321,7 +321,7 @@
 	if (!mtd)
 		goto release;
 
-	mtd->module = THIS_MODULE;
+	set_module_owner(mtd);
 	add_mtd_device(mtd);
 
 	pci_set_drvdata(dev, mtd);

Index: pcmciamtd.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/maps/pcmciamtd.c,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -r1.41 -r1.42
--- pcmciamtd.c	14 May 2003 15:05:15 -0000	1.41
+++ pcmciamtd.c	14 May 2003 22:26:30 -0000	1.42
@@ -645,7 +645,7 @@
 	}
 
 	dev->mtd_info = mtd;
-	mtd->module = THIS_MODULE;
+	set_module_owner(mtd);
 
 	if(new_name) {
 		int size = 0;

Index: physmap.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/maps/physmap.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- physmap.c	14 May 2003 15:05:15 -0000	1.23
+++ physmap.c	14 May 2003 22:26:31 -0000	1.24
@@ -87,7 +87,7 @@
 		mymtd = do_map_probe(*type, &physmap_map);
 	}
 	if (mymtd) {
-		mymtd->module = THIS_MODULE;
+		set_module_owner(mymtd);
 
 		add_mtd_device(mymtd);
 #ifdef CONFIG_MTD_PARTITIONS

Index: pnc2000.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/maps/pnc2000.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- pnc2000.c	14 May 2003 15:05:15 -0000	1.11
+++ pnc2000.c	14 May 2003 22:26:31 -0000	1.12
@@ -69,7 +69,7 @@
 
 	mymtd = do_map_probe("cfi_probe", &pnc_map);
 	if (mymtd) {
-		mymtd->module = THIS_MODULE;
+		set_module_owner(mymtd);
 		return add_mtd_partitions(mymtd, pnc_partitions, 3);
 	}
 

Index: redwood.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/maps/redwood.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- redwood.c	14 May 2003 15:05:15 -0000	1.3
+++ redwood.c	14 May 2003 22:26:31 -0000	1.4
@@ -143,7 +143,7 @@
 	redwood_mtd = do_map_probe("cfi_probe",&redwood_flash_map);
 
 	if (redwood_mtd) {
-		redwood_mtd->module = THIS_MODULE;
+		set_module_owner(redwood_mtd);
 		return add_mtd_partitions(redwood_mtd,
 				redwood_flash_partitions,
 				NUM_REDWOOD_FLASH_PARTITIONS);

Index: rpxlite.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/maps/rpxlite.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- rpxlite.c	14 May 2003 15:05:15 -0000	1.16
+++ rpxlite.c	14 May 2003 22:26:31 -0000	1.17
@@ -36,7 +36,7 @@
 	simple_map_init(&rpxlite_map);
 	mymtd = do_map_probe("cfi_probe", &rpxlite_map);
 	if (mymtd) {
-		mymtd->module = THIS_MODULE;
+		set_module_owner(mymtd);
 		add_mtd_device(mymtd);
 		return 0;
 	}

Index: sa1100-flash.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/maps/sa1100-flash.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -r1.31 -r1.32
--- sa1100-flash.c	14 May 2003 15:05:15 -0000	1.31
+++ sa1100-flash.c	14 May 2003 22:26:31 -0000	1.32
@@ -913,7 +913,7 @@
 	ret = -ENXIO;
 	if (!mymtd)
 		goto out_err;
-	mymtd->module = THIS_MODULE;
+	set_module_owner(mymtd);
 
 	/*
 	 * Dynamic partition selection stuff (might override the static ones)

Index: sbc_gxx.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/maps/sbc_gxx.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- sbc_gxx.c	14 May 2003 15:05:16 -0000	1.22
+++ sbc_gxx.c	14 May 2003 22:26:31 -0000	1.23
@@ -262,7 +262,7 @@
 		return -ENXIO;
 	}
 	
-	all_mtd->module=THIS_MODULE;
+	set_module_owner(all_mtd);
 
 	/* Create MTD devices for each partition. */
 	add_mtd_partitions(all_mtd, partition_info, NUM_PARTITIONS );

Index: sc520cdp.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/maps/sc520cdp.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- sc520cdp.c	14 May 2003 15:05:16 -0000	1.12
+++ sc520cdp.c	14 May 2003 22:26:31 -0000	1.13
@@ -256,7 +256,7 @@
 			mymtd[i] = do_map_probe("map_rom", &sc520cdp_map[i]);
 
 		if (mymtd[i]) {
-			mymtd[i]->module = THIS_MODULE;
+			set_module_owner(mymtd[i]);
 			++devices_found;
 		}
 		else {

Index: scb2_flash.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/maps/scb2_flash.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- scb2_flash.c	14 May 2003 15:05:16 -0000	1.3
+++ scb2_flash.c	14 May 2003 22:26:31 -0000	1.4
@@ -178,7 +178,7 @@
 		return -ENODEV;
 	}
 
-	scb2_mtd->module = THIS_MODULE;
+	set_module_owner(scb2_mtd);
 	if (scb2_fixup_mtd(scb2_mtd) < 0) {
 		del_mtd_device(scb2_mtd);
 		map_destroy(scb2_mtd);

Index: scx200_docflash.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/maps/scx200_docflash.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- scx200_docflash.c	14 May 2003 15:05:16 -0000	1.2
+++ scx200_docflash.c	14 May 2003 22:26:31 -0000	1.3
@@ -197,7 +197,7 @@
 	if (size < mymtd->size)
 		printk(KERN_WARNING NAME ": warning, flash mapping is smaller than flash size\n");
 
-	mymtd->module = THIS_MODULE;
+	set_module_owner(mymtd);
 
 #if PARTITION
 	partition_info[3].offset = mymtd->size-partition_info[3].size;

Index: solutionengine.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/maps/solutionengine.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- solutionengine.c	14 May 2003 15:05:16 -0000	1.6
+++ solutionengine.c	14 May 2003 22:26:31 -0000	1.7
@@ -84,11 +84,11 @@
 	printk(KERN_NOTICE "Solution Engine: Flash at 0x%08lx, EPROM at 0x%08lx\n",
 	       soleng_flash_map.phys & 0x1fffffff,
 	       soleng_eprom_map.phys & 0x1fffffff);
-	flash_mtd->module = THIS_MODULE;
+	set_module_owner(flash_mtd);
 
 	eprom_mtd = do_map_probe("map_rom", &soleng_eprom_map);
 	if (eprom_mtd) {
-		eprom_mtd->module = THIS_MODULE;
+		set_module_owner(eprom_mtd);
 		add_mtd_device(eprom_mtd);
 	}
 

Index: sun_uflash.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/maps/sun_uflash.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- sun_uflash.c	14 May 2003 15:05:16 -0000	1.5
+++ sun_uflash.c	14 May 2003 22:26:31 -0000	1.6
@@ -119,7 +119,7 @@
 
 	list_add(&pdev->list, &device_list);
 
-	pdev->mtd->module = THIS_MODULE;
+	set_module_owner(pdev->mtd);
 
 	add_mtd_device(pdev->mtd);
 	return(0);

Index: tqm8xxl.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/maps/tqm8xxl.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- tqm8xxl.c	14 May 2003 15:05:16 -0000	1.5
+++ tqm8xxl.c	14 May 2003 22:26:31 -0000	1.6
@@ -175,7 +175,7 @@
 		mtd_banks[idx] = do_map_probe("cfi_probe", map_banks[idx]);
 
 		if (mtd_banks[idx]) {
-			mtd_banks[idx]->module = THIS_MODULE;
+			set_module_owner(mtd_banks[idx]);
 			mtd_size += mtd_banks[idx]->size;
 			num_banks++;
 

Index: tsunami_flash.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/maps/tsunami_flash.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- tsunami_flash.c	14 May 2003 15:05:16 -0000	1.2
+++ tsunami_flash.c	14 May 2003 22:26:31 -0000	1.3
@@ -93,7 +93,7 @@
 		tsunami_flash_mtd = do_map_probe(*type, &tsunami_flash_map);
 	}
 	if (tsunami_flash_mtd) {
-		tsunami_flash_mtd->module = THIS_MODULE;
+		set_module_owner(tsunami_flash_mtd);
 		add_mtd_device(tsunami_flash_mtd);
 		return 0;
 	}

Index: uclinux.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/maps/uclinux.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- uclinux.c	14 May 2003 15:05:16 -0000	1.3
+++ uclinux.c	14 May 2003 22:26:31 -0000	1.4
@@ -85,7 +85,7 @@
 		return(-ENXIO);
 	}
 		
-	mtd->module = THIS_MODULE;
+	set_module_owner(mtd);
 	mtd->point = uclinux_point;
 	mtd->priv = mapp;
 

Index: vmax301.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/maps/vmax301.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- vmax301.c	14 May 2003 15:05:16 -0000	1.25
+++ vmax301.c	14 May 2003 22:26:31 -0000	1.26
@@ -220,7 +220,7 @@
 		if (!vmax_mtd[i])
 			vmax_mtd[i] = do_map_probe("map_rom", &vmax_map[i]);
 		if (vmax_mtd[i]) {
-			vmax_mtd[i]->module = THIS_MODULE;
+			set_module_owner(vmax_mtd[i]);
 			add_mtd_device(vmax_mtd[i]);
 		}
 	}




More information about the linux-mtd-cvs mailing list