public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2.6.15-rc3-mm1 0/3] -mm patches to replace pci_module_init() with pci_register_driver()
@ 2005-12-01 12:58 Richard Knutsson
  2005-12-01 12:58 ` [PATCH 2.6.15-rc3-mm1 1/3] drivers: Replace pci_module_init() with pci_register_driver() in -mm Richard Knutsson
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Richard Knutsson @ 2005-12-01 12:58 UTC (permalink / raw)
  To: akpm; +Cc: linux-kernel, Richard Knutsson

An additional serie to replace the obsolete pci_module_init() with pci_register_driver() in the -mm tree. Last patch #if 0's pci_module_init().

Because pci_module_init() is implemented as:
pci.h:352 #define pci_module_init pci_register_driver
the replacment should not effect anything.

Doing "find . -name *.[chS] | xargs grep -n pci_module_init" in the patched tree results in:
./sound/oss/es1371.c:97: *                       Use pci_module_init
./include/linux/pci.h:350: * pci_module_init is obsolete, this stays here till we fix up all usages of it
./include/linux/pci.h:353:#define pci_module_init       pci_register_driver
./drivers/net/3c59x.c:41:    - Set vortex_have_pci if pci_module_init returns zero (fixes cardbus
./drivers/media/dvb/b2c2/flexcop-pci.c:418:static int __init flexcop_pci_module_init(void)
./drivers/media/dvb/b2c2/flexcop-pci.c:428:module_init(flexcop_pci_module_init);

It is just sent to lkml in hope that the changes are to small and to spread for mailing every maintainer. Will you pick this up too, Andrew?

Any comment is welcome.

/Richard

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 2.6.15-rc3-mm1 1/3] drivers: Replace pci_module_init() with pci_register_driver() in -mm
  2005-12-01 12:58 [PATCH 2.6.15-rc3-mm1 0/3] -mm patches to replace pci_module_init() with pci_register_driver() Richard Knutsson
@ 2005-12-01 12:58 ` Richard Knutsson
  2005-12-01 12:59 ` [PATCH 2.6.15-rc3-mm1 2/3] sound: " Richard Knutsson
  2005-12-01 12:59 ` [PATCH 2.6.15-rc3(-mm1) 3/3] pci.h: Richard Knutsson
  2 siblings, 0 replies; 6+ messages in thread
From: Richard Knutsson @ 2005-12-01 12:58 UTC (permalink / raw)
  To: akpm; +Cc: linux-kernel, Richard Knutsson

From: Richard Knutsson <ricknu-0@student.ltu.se>

Replace obsolete pci_module_init() with pci_register_driver().

Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se>

---

 edac/amd76x_edac.c       |    2 +-
 edac/e7xxx_edac.c        |    2 +-
 edac/r82600_edac.c       |    2 +-
 net/sky2.c               |    2 +-
 net/wireless/tiacx/pci.c |    2 +-
 scsi/arcmsr/arcmsr.c     |    2 +-
 scsi/pata_amd.c          |    2 +-
 scsi/pata_opti.c         |    2 +-
 scsi/pata_pdc2027x.c     |    2 +-
 scsi/pata_sil680.c       |    2 +-
 scsi/pata_triflex.c      |    2 +-
 scsi/pata_via.c          |    2 +-
 12 files changed, 12 insertions(+), 12 deletions(-)

diff -Narup a/drivers/edac/amd76x_edac.c b/drivers/edac/amd76x_edac.c
--- a/drivers/edac/amd76x_edac.c	2005-12-01 01:35:41.000000000 +0100
+++ b/drivers/edac/amd76x_edac.c	2005-12-01 01:52:23.000000000 +0100
@@ -340,7 +340,7 @@ static struct pci_driver amd76x_driver =
 
 int __init amd76x_init(void)
 {
-	return pci_module_init(&amd76x_driver);
+	return pci_register_driver(&amd76x_driver);
 }
 
 static void __exit amd76x_exit(void)
diff -Narup a/drivers/edac/e7xxx_edac.c b/drivers/edac/e7xxx_edac.c
--- a/drivers/edac/e7xxx_edac.c	2005-12-01 01:35:41.000000000 +0100
+++ b/drivers/edac/e7xxx_edac.c	2005-12-01 01:52:23.000000000 +0100
@@ -539,7 +539,7 @@ static struct pci_driver e7xxx_driver = 
 
 int __init e7xxx_init(void)
 {
-	return pci_module_init(&e7xxx_driver);
+	return pci_register_driver(&e7xxx_driver);
 }
 
 
diff -Narup a/drivers/edac/r82600_edac.c b/drivers/edac/r82600_edac.c
--- a/drivers/edac/r82600_edac.c	2005-12-01 01:35:41.000000000 +0100
+++ b/drivers/edac/r82600_edac.c	2005-12-01 01:52:23.000000000 +0100
@@ -383,7 +383,7 @@ static struct pci_driver r82600_driver =
 
 int __init r82600_init(void)
 {
-	return pci_module_init(&r82600_driver);
+	return pci_register_driver(&r82600_driver);
 }
 
 
diff -Narup a/drivers/net/sky2.c b/drivers/net/sky2.c
--- a/drivers/net/sky2.c	2005-12-01 01:35:51.000000000 +0100
+++ b/drivers/net/sky2.c	2005-12-01 01:52:23.000000000 +0100
@@ -3023,7 +3023,7 @@ static struct pci_driver sky2_driver = {
 
 static int __init sky2_init_module(void)
 {
-	return pci_module_init(&sky2_driver);
+	return pci_register_driver(&sky2_driver);
 }
 
 static void __exit sky2_cleanup_module(void)
diff -Narup a/drivers/net/wireless/tiacx/pci.c b/drivers/net/wireless/tiacx/pci.c
--- a/drivers/net/wireless/tiacx/pci.c	2005-12-01 01:35:49.000000000 +0100
+++ b/drivers/net/wireless/tiacx/pci.c	2005-12-01 01:52:23.000000000 +0100
@@ -4607,7 +4607,7 @@ acxpci_e_init_module(void)
 	acxlog(L_INIT, "PCI module " WLAN_RELEASE " initialized, "
 		"waiting for cards to probe...\n");
 
-	res = pci_module_init(&acxpci_drv_id);
+	res = pci_register_driver(&acxpci_drv_id);
 	FN_EXIT1(res);
 	return res;
 }
diff -Narup a/drivers/scsi/arcmsr/arcmsr.c b/drivers/scsi/arcmsr/arcmsr.c
--- a/drivers/scsi/arcmsr/arcmsr.c	2005-12-01 01:35:58.000000000 +0100
+++ b/drivers/scsi/arcmsr/arcmsr.c	2005-12-01 01:52:23.000000000 +0100
@@ -519,7 +519,7 @@ static int arcmsr_scsi_host_template_ini
 	 ** register as a PCI hot-plug driver module
 	 */
 	memset(pHCBARC, 0, sizeof(struct _HCBARC));
-	error = pci_module_init(&arcmsr_pci_driver);
+	error = pci_register_driver(&arcmsr_pci_driver);
 	if (pHCBARC->pACB[0] != NULL) {
 		host_template->proc_name = "arcmsr";
 		register_reboot_notifier(&arcmsr_event_notifier);
diff -Narup a/drivers/scsi/pata_amd.c b/drivers/scsi/pata_amd.c
--- a/drivers/scsi/pata_amd.c	2005-12-01 01:35:57.000000000 +0100
+++ b/drivers/scsi/pata_amd.c	2005-12-01 01:52:23.000000000 +0100
@@ -625,7 +625,7 @@ static struct pci_driver amd_pci_driver 
 
 static int __init amd_init(void)
 {
-	return pci_module_init(&amd_pci_driver);
+	return pci_register_driver(&amd_pci_driver);
 }
 
 static void __exit amd_exit(void)
diff -Narup a/drivers/scsi/pata_opti.c b/drivers/scsi/pata_opti.c
--- a/drivers/scsi/pata_opti.c	2005-12-01 01:35:57.000000000 +0100
+++ b/drivers/scsi/pata_opti.c	2005-12-01 01:52:23.000000000 +0100
@@ -247,7 +247,7 @@ static struct pci_driver opti_pci_driver
 
 static int __init opti_init(void)
 {
-	return pci_module_init(&opti_pci_driver);
+	return pci_register_driver(&opti_pci_driver);
 }
 
 
diff -Narup a/drivers/scsi/pata_pdc2027x.c b/drivers/scsi/pata_pdc2027x.c
--- a/drivers/scsi/pata_pdc2027x.c	2005-12-01 01:35:57.000000000 +0100
+++ b/drivers/scsi/pata_pdc2027x.c	2005-12-01 01:52:23.000000000 +0100
@@ -840,7 +840,7 @@ static void __devexit pdc2027x_remove_on
  */
 static int __init pdc2027x_init(void)
 {
-	return pci_module_init(&pdc2027x_pci_driver);
+	return pci_register_driver(&pdc2027x_pci_driver);
 }
 
 /**
diff -Narup a/drivers/scsi/pata_sil680.c b/drivers/scsi/pata_sil680.c
--- a/drivers/scsi/pata_sil680.c	2005-12-01 01:35:56.000000000 +0100
+++ b/drivers/scsi/pata_sil680.c	2005-12-01 01:52:23.000000000 +0100
@@ -341,7 +341,7 @@ static struct pci_driver sil680_pci_driv
 
 static int __init sil680_init(void)
 {
-	return pci_module_init(&sil680_pci_driver);
+	return pci_register_driver(&sil680_pci_driver);
 }
 
 
diff -Narup a/drivers/scsi/pata_triflex.c b/drivers/scsi/pata_triflex.c
--- a/drivers/scsi/pata_triflex.c	2005-12-01 01:35:59.000000000 +0100
+++ b/drivers/scsi/pata_triflex.c	2005-12-01 01:52:23.000000000 +0100
@@ -247,7 +247,7 @@ static struct pci_driver triflex_pci_dri
 
 static int __init triflex_init(void)
 {
-	return pci_module_init(&triflex_pci_driver);
+	return pci_register_driver(&triflex_pci_driver);
 }
 
 
diff -Narup a/drivers/scsi/pata_via.c b/drivers/scsi/pata_via.c
--- a/drivers/scsi/pata_via.c	2005-12-01 01:35:59.000000000 +0100
+++ b/drivers/scsi/pata_via.c	2005-12-01 01:52:23.000000000 +0100
@@ -491,7 +491,7 @@ static struct pci_driver via_pci_driver 
 
 static int __init via_init(void)
 {
-	return pci_module_init(&via_pci_driver);
+	return pci_register_driver(&via_pci_driver);
 }
 
 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 2.6.15-rc3-mm1 2/3] sound: Replace pci_module_init() with pci_register_driver() in -mm
  2005-12-01 12:58 [PATCH 2.6.15-rc3-mm1 0/3] -mm patches to replace pci_module_init() with pci_register_driver() Richard Knutsson
  2005-12-01 12:58 ` [PATCH 2.6.15-rc3-mm1 1/3] drivers: Replace pci_module_init() with pci_register_driver() in -mm Richard Knutsson
@ 2005-12-01 12:59 ` Richard Knutsson
  2005-12-01 12:59 ` [PATCH 2.6.15-rc3(-mm1) 3/3] pci.h: Richard Knutsson
  2 siblings, 0 replies; 6+ messages in thread
From: Richard Knutsson @ 2005-12-01 12:59 UTC (permalink / raw)
  To: akpm; +Cc: linux-kernel, Richard Knutsson

From: Richard Knutsson <ricknu-0@student.ltu.se>

Replace obsolete pci_module_init() with pci_register_driver().

Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se>

---

 oss/ad1889.c                  |    2 +-
 oss/btaudio.c                 |    2 +-
 oss/cmpci.c                   |    2 +-
 oss/cs4281/cs4281m.c          |    2 +-
 oss/cs46xx.c                  |    2 +-
 oss/emu10k1/main.c            |    2 +-
 oss/es1370.c                  |    2 +-
 oss/es1371.c                  |    2 +-
 oss/ite8172.c                 |    2 +-
 oss/kahlua.c                  |    2 +-
 oss/maestro.c                 |    2 +-
 oss/nec_vrc5477.c             |    2 +-
 oss/nm256_audio.c             |    2 +-
 oss/rme96xx.c                 |    2 +-
 oss/sonicvibes.c              |    2 +-
 oss/ymfpci.c                  |    2 +-
 pci/cs5535audio/cs5535audio.c |    2 +-
 17 files changed, 17 insertions(+), 17 deletions(-)

diff -Narup a/sound/oss/ad1889.c b/sound/oss/ad1889.c
--- a/sound/oss/ad1889.c	2005-12-01 01:35:03.000000000 +0100
+++ b/sound/oss/ad1889.c	2005-12-01 01:52:22.000000000 +0100
@@ -1089,7 +1089,7 @@ static struct pci_driver ad1889_driver =
 
 static int __init ad1889_init_module(void)
 {
-	return pci_module_init(&ad1889_driver);
+	return pci_register_driver(&ad1889_driver);
 }
 
 static void ad1889_exit_module(void)
diff -Narup a/sound/oss/btaudio.c b/sound/oss/btaudio.c
--- a/sound/oss/btaudio.c	2005-12-01 01:35:02.000000000 +0100
+++ b/sound/oss/btaudio.c	2005-12-01 01:52:22.000000000 +0100
@@ -1101,7 +1101,7 @@ static int btaudio_init_module(void)
 	       digital ? "digital" : "",
 	       analog && digital ? "+" : "",
 	       analog ? "analog" : "");
-	return pci_module_init(&btaudio_pci_driver);
+	return pci_register_driver(&btaudio_pci_driver);
 }
 
 static void btaudio_cleanup_module(void)
diff -Narup a/sound/oss/cmpci.c b/sound/oss/cmpci.c
--- a/sound/oss/cmpci.c	2005-12-01 01:35:02.000000000 +0100
+++ b/sound/oss/cmpci.c	2005-12-01 01:52:22.000000000 +0100
@@ -3366,7 +3366,7 @@ static struct pci_driver cm_driver = {
 static int __init init_cmpci(void)
 {
 	printk(KERN_INFO "cmpci: version $Revision: 6.82 $ time " __TIME__ " " __DATE__ "\n");
-	return pci_module_init(&cm_driver);
+	return pci_register_driver(&cm_driver);
 }
 
 static void __exit cleanup_cmpci(void)
diff -Narup a/sound/oss/cs4281/cs4281m.c b/sound/oss/cs4281/cs4281m.c
--- a/sound/oss/cs4281/cs4281m.c	2005-12-01 01:35:02.000000000 +0100
+++ b/sound/oss/cs4281/cs4281m.c	2005-12-01 01:52:22.000000000 +0100
@@ -4461,7 +4461,7 @@ static int __init cs4281_init_module(voi
 	printk(KERN_INFO "cs4281: version v%d.%02d.%d time " __TIME__ " "
 	       __DATE__ "\n", CS4281_MAJOR_VERSION, CS4281_MINOR_VERSION,
 	       CS4281_ARCH);
-	rtn = pci_module_init(&cs4281_pci_driver);
+	rtn = pci_register_driver(&cs4281_pci_driver);
 
 	CS_DBGOUT(CS_INIT | CS_FUNCTION, 2,
 		  printk(KERN_INFO "cs4281: cs4281_init_module()- (%d)\n",rtn));
diff -Narup a/sound/oss/cs46xx.c b/sound/oss/cs46xx.c
--- a/sound/oss/cs46xx.c	2005-12-01 01:35:02.000000000 +0100
+++ b/sound/oss/cs46xx.c	2005-12-01 01:52:22.000000000 +0100
@@ -5690,7 +5690,7 @@ static int __init cs46xx_init_module(voi
 	int rtn = 0;
 	CS_DBGOUT(CS_INIT | CS_FUNCTION, 2, printk(KERN_INFO 
 		"cs46xx: cs46xx_init_module()+ \n"));
-	rtn = pci_module_init(&cs46xx_pci_driver);
+	rtn = pci_register_driver(&cs46xx_pci_driver);
 
 	if(rtn == -ENODEV)
 	{
diff -Narup a/sound/oss/emu10k1/main.c b/sound/oss/emu10k1/main.c
--- a/sound/oss/emu10k1/main.c	2005-12-01 01:35:03.000000000 +0100
+++ b/sound/oss/emu10k1/main.c	2005-12-01 01:52:22.000000000 +0100
@@ -1428,7 +1428,7 @@ static int __init emu10k1_init_module(vo
 {
 	printk(KERN_INFO "Creative EMU10K1 PCI Audio Driver, version " DRIVER_VERSION ", " __TIME__ " " __DATE__ "\n");
 
-	return pci_module_init(&emu10k1_pci_driver);
+	return pci_register_driver(&emu10k1_pci_driver);
 }
 
 static void __exit emu10k1_cleanup_module(void)
diff -Narup a/sound/oss/es1370.c b/sound/oss/es1370.c
--- a/sound/oss/es1370.c	2005-12-01 01:35:03.000000000 +0100
+++ b/sound/oss/es1370.c	2005-12-01 01:52:23.000000000 +0100
@@ -2779,7 +2779,7 @@ static struct pci_driver es1370_driver =
 static int __init init_es1370(void)
 {
 	printk(KERN_INFO "es1370: version v0.38 time " __TIME__ " " __DATE__ "\n");
-	return pci_module_init(&es1370_driver);
+	return pci_register_driver(&es1370_driver);
 }
 
 static void __exit cleanup_es1370(void)
diff -Narup a/sound/oss/es1371.c b/sound/oss/es1371.c
--- a/sound/oss/es1371.c	2005-12-01 01:35:03.000000000 +0100
+++ b/sound/oss/es1371.c	2005-12-01 01:52:23.000000000 +0100
@@ -3090,7 +3090,7 @@ static struct pci_driver es1371_driver =
 static int __init init_es1371(void)
 {
 	printk(KERN_INFO PFX "version v0.32 time " __TIME__ " " __DATE__ "\n");
-	return pci_module_init(&es1371_driver);
+	return pci_register_driver(&es1371_driver);
 }
 
 static void __exit cleanup_es1371(void)
diff -Narup a/sound/oss/ite8172.c b/sound/oss/ite8172.c
--- a/sound/oss/ite8172.c	2005-12-01 01:35:02.000000000 +0100
+++ b/sound/oss/ite8172.c	2005-12-01 01:52:22.000000000 +0100
@@ -2206,7 +2206,7 @@ static struct pci_driver it8172_driver =
 static int __init init_it8172(void)
 {
 	info("version v0.5 time " __TIME__ " " __DATE__);
-	return pci_module_init(&it8172_driver);
+	return pci_register_driver(&it8172_driver);
 }
 
 static void __exit cleanup_it8172(void)
diff -Narup a/sound/oss/kahlua.c b/sound/oss/kahlua.c
--- a/sound/oss/kahlua.c	2005-12-01 01:35:02.000000000 +0100
+++ b/sound/oss/kahlua.c	2005-12-01 01:52:22.000000000 +0100
@@ -218,7 +218,7 @@ static struct pci_driver kahlua_driver =
 static int __init kahlua_init_module(void)
 {
 	printk(KERN_INFO "Cyrix Kahlua VSA1 XpressAudio support (c) Copyright 2003 Red Hat Inc\n");
-	return pci_module_init(&kahlua_driver);
+	return pci_register_driver(&kahlua_driver);
 }
 
 static void __devexit kahlua_cleanup_module(void)
diff -Narup a/sound/oss/maestro.c b/sound/oss/maestro.c
--- a/sound/oss/maestro.c	2005-12-01 01:35:02.000000000 +0100
+++ b/sound/oss/maestro.c	2005-12-01 01:52:22.000000000 +0100
@@ -3624,7 +3624,7 @@ static int __init init_maestro(void)
 {
 	int rc;
 
-	rc = pci_module_init(&maestro_pci_driver);
+	rc = pci_register_driver(&maestro_pci_driver);
 	if (rc < 0)
 		return rc;
 
diff -Narup a/sound/oss/nec_vrc5477.c b/sound/oss/nec_vrc5477.c
--- a/sound/oss/nec_vrc5477.c	2005-12-01 01:35:02.000000000 +0100
+++ b/sound/oss/nec_vrc5477.c	2005-12-01 01:52:22.000000000 +0100
@@ -2045,7 +2045,7 @@ static struct pci_driver vrc5477_ac97_dr
 static int __init init_vrc5477_ac97(void)
 {
 	printk("Vrc5477 AC97 driver: version v0.2 time " __TIME__ " " __DATE__ " by Jun Sun\n");
-	return pci_module_init(&vrc5477_ac97_driver);
+	return pci_register_driver(&vrc5477_ac97_driver);
 }
 
 static void __exit cleanup_vrc5477_ac97(void)
diff -Narup a/sound/oss/nm256_audio.c b/sound/oss/nm256_audio.c
--- a/sound/oss/nm256_audio.c	2005-12-01 01:35:02.000000000 +0100
+++ b/sound/oss/nm256_audio.c	2005-12-01 01:52:22.000000000 +0100
@@ -1644,7 +1644,7 @@ module_param(force_load, bool, 0);
 static int __init do_init_nm256(void)
 {
     printk (KERN_INFO "NeoMagic 256AV/256ZX audio driver, version 1.1p\n");
-    return pci_module_init(&nm256_pci_driver);
+    return pci_register_driver(&nm256_pci_driver);
 }
 
 static void __exit cleanup_nm256 (void)
diff -Narup a/sound/oss/rme96xx.c b/sound/oss/rme96xx.c
--- a/sound/oss/rme96xx.c	2005-12-01 01:35:02.000000000 +0100
+++ b/sound/oss/rme96xx.c	2005-12-01 01:52:22.000000000 +0100
@@ -1095,7 +1095,7 @@ static int __init init_rme96xx(void)
 	devices = ((devices-1) & RME96xx_MASK_DEVS) + 1;
 	printk(KERN_INFO RME_MESS" reserving %d dsp device(s)\n",devices);
         numcards = 0;
-	return pci_module_init(&rme96xx_driver);
+	return pci_register_driver(&rme96xx_driver);
 }
 
 static void __exit cleanup_rme96xx(void)
diff -Narup a/sound/oss/sonicvibes.c b/sound/oss/sonicvibes.c
--- a/sound/oss/sonicvibes.c	2005-12-01 01:35:02.000000000 +0100
+++ b/sound/oss/sonicvibes.c	2005-12-01 01:52:22.000000000 +0100
@@ -2765,7 +2765,7 @@ static int __init init_sonicvibes(void)
 	if (!(wavetable_mem = __get_free_pages(GFP_KERNEL, 20-PAGE_SHIFT)))
 		printk(KERN_INFO "sv: cannot allocate 1MB of contiguous nonpageable memory for wavetable data\n");
 #endif
-	return pci_module_init(&sv_driver);
+	return pci_register_driver(&sv_driver);
 }
 
 static void __exit cleanup_sonicvibes(void)
diff -Narup a/sound/oss/ymfpci.c b/sound/oss/ymfpci.c
--- a/sound/oss/ymfpci.c	2005-12-01 01:35:03.000000000 +0100
+++ b/sound/oss/ymfpci.c	2005-12-01 01:52:23.000000000 +0100
@@ -2680,7 +2680,7 @@ static struct pci_driver ymfpci_driver =
 
 static int __init ymf_init_module(void)
 {
-	return pci_module_init(&ymfpci_driver);
+	return pci_register_driver(&ymfpci_driver);
 }
 
 static void __exit ymf_cleanup_module (void)
diff -Narup a/sound/pci/cs5535audio/cs5535audio.c b/sound/pci/cs5535audio/cs5535audio.c
--- a/sound/pci/cs5535audio/cs5535audio.c	2005-12-01 01:35:03.000000000 +0100
+++ b/sound/pci/cs5535audio/cs5535audio.c	2005-12-01 01:52:23.000000000 +0100
@@ -385,7 +385,7 @@ static struct pci_driver driver = {
 
 static int __init alsa_card_cs5535audio_init(void)
 {
-	return pci_module_init(&driver);
+	return pci_register_driver(&driver);
 }
 
 static void __exit alsa_card_cs5535audio_exit(void)

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 2.6.15-rc3(-mm1) 3/3] pci.h:
  2005-12-01 12:58 [PATCH 2.6.15-rc3-mm1 0/3] -mm patches to replace pci_module_init() with pci_register_driver() Richard Knutsson
  2005-12-01 12:58 ` [PATCH 2.6.15-rc3-mm1 1/3] drivers: Replace pci_module_init() with pci_register_driver() in -mm Richard Knutsson
  2005-12-01 12:59 ` [PATCH 2.6.15-rc3-mm1 2/3] sound: " Richard Knutsson
@ 2005-12-01 12:59 ` Richard Knutsson
  2005-12-01 23:22   ` Andrew Morton
  2 siblings, 1 reply; 6+ messages in thread
From: Richard Knutsson @ 2005-12-01 12:59 UTC (permalink / raw)
  To: akpm; +Cc: linux-kernel, Richard Knutsson

From: Richard Knutsson <ricknu-0@student.ltu.se>

#if 0'ing no-longer-needed pci_module_init().

Need remove-pci_module_init-patches for both 2.6.15-rc3 and 2.6.15-rc3-mm1 to be implemented.

Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se>

---

 pci.h |    2 ++
 1 files changed, 2 insertions(+)

diff -Narup a/include/linux/pci.h b/include/linux/pci.h
--- a/include/linux/pci.h	2005-12-01 02:15:06.000000000 +0100
+++ b/include/linux/pci.h	2005-12-01 03:53:48.000000000 +0100
@@ -345,11 +345,13 @@ struct pci_driver {
 	.vendor = PCI_ANY_ID, .device = PCI_ANY_ID, \
 	.subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID
 
+#if 0
 /*
  * pci_module_init is obsolete, this stays here till we fix up all usages of it
  * in the tree.
  */
 #define pci_module_init	pci_register_driver
+#endif
 
 /* these external functions are only available when PCI support is enabled */
 #ifdef CONFIG_PCI

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 2.6.15-rc3(-mm1) 3/3] pci.h:
  2005-12-01 12:59 ` [PATCH 2.6.15-rc3(-mm1) 3/3] pci.h: Richard Knutsson
@ 2005-12-01 23:22   ` Andrew Morton
  2005-12-03  1:34     ` [PATCH] pci: Schedule removal of pci_module_init (was Re: [PATCH 2.6.15-rc3(-mm1) 3/3] pci.h:) Richard Knutsson
  0 siblings, 1 reply; 6+ messages in thread
From: Andrew Morton @ 2005-12-01 23:22 UTC (permalink / raw)
  To: Richard Knutsson; +Cc: linux-kernel, ricknu-0

Richard Knutsson <ricknu-0@student.ltu.se> wrote:
>
>  +#if 0
>   /*
>    * pci_module_init is obsolete, this stays here till we fix up all usages of it
>    * in the tree.
>    */
>   #define pci_module_init	pci_register_driver
>  +#endif

This one's a bit optimistic.  We need to wait until Linus's patch is fully
converted, than wait a bit.

You might investigate turning this into an inline function, then mark it
__deprecated and generate a Documentation/feature-removal-schedule.txt
record for it.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] pci: Schedule removal of pci_module_init (was Re: [PATCH 2.6.15-rc3(-mm1) 3/3] pci.h:)
  2005-12-01 23:22   ` Andrew Morton
@ 2005-12-03  1:34     ` Richard Knutsson
  0 siblings, 0 replies; 6+ messages in thread
From: Richard Knutsson @ 2005-12-03  1:34 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel, Greg KH

Andrew Morton wrote:

>Richard Knutsson <ricknu-0@student.ltu.se> wrote:
>  
>
>> +#if 0
>>  /*
>>   * pci_module_init is obsolete, this stays here till we fix up all usages of it
>>   * in the tree.
>>   */
>>  #define pci_module_init	pci_register_driver
>> +#endif
>>    
>>
>
>This one's a bit optimistic.  We need to wait until Linus's patch is fully
>converted, than wait a bit.
>
>You might investigate turning this into an inline function, then mark it
>__deprecated and generate a Documentation/feature-removal-schedule.txt
>record for it.
>-
>
From: Richard Knutsson <ricknu-0@student.ltu.se>

Scheduled the removal of pci_module_init and __deprecated the function, 
as suggested by Andrew.

Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se>
---

diff -Narup a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt
--- a/Documentation/feature-removal-schedule.txt	2005-11-29 11:08:41.000000000 +0100
+++ b/Documentation/feature-removal-schedule.txt	2005-12-03 01:21:46.000000000 +0100
@@ -159,3 +159,10 @@ Why:	The 8250 serial driver now has the 
 	brother on Alchemy SOCs.  The loss of features is not considered an
 	issue.
 Who:	Ralf Baechle <ralf@linux-mips.org>
+
+---------------------------
+
+What:	pci_module_init(driver)
+When:	April 2006
+Why:	Is replaced by pci_register_driver(pci_driver).
+Who:	Richard Knutsson <ricknu-0@student.ltu.se>
diff -Narup a/include/linux/pci.h b/include/linux/pci.h
--- a/include/linux/pci.h	2005-11-29 11:09:05.000000000 +0100
+++ b/include/linux/pci.h	2005-12-03 01:40:40.000000000 +0100
@@ -277,12 +277,6 @@ struct pci_driver {
 	.vendor = PCI_ANY_ID, .device = PCI_ANY_ID, \
 	.subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID
 
-/*
- * pci_module_init is obsolete, this stays here till we fix up all usages of it
- * in the tree.
- */
-#define pci_module_init	pci_register_driver
-
 /* these external functions are only available when PCI support is enabled */
 #ifdef CONFIG_PCI
 
@@ -434,6 +428,10 @@ void pci_enable_bridges(struct pci_bus *
 
 /* Proper probing supporting hot-pluggable devices */
 int __pci_register_driver(struct pci_driver *, struct module *);
+static inline int __deprecated pci_module_init(struct pci_driver *driver)
+{
+	return __pci_register_driver(driver, THIS_MODULE);
+}
 static inline int pci_register_driver(struct pci_driver *driver)
 {
 	return __pci_register_driver(driver, THIS_MODULE);
@@ -553,6 +551,7 @@ static inline void pci_disable_device(st
 static inline int pci_set_dma_mask(struct pci_dev *dev, u64 mask) { return -EIO; }
 static inline int pci_assign_resource(struct pci_dev *dev, int i) { return -EBUSY;}
 static inline int __pci_register_driver(struct pci_driver *drv, struct module *owner) { return 0;}
+static inline int __deprecated pci_module_init(struct pci_driver *driver) { return 0; }
 static inline int pci_register_driver(struct pci_driver *drv) { return 0;}
 static inline void pci_unregister_driver(struct pci_driver *drv) { }
 static inline int pci_find_capability (struct pci_dev *dev, int cap) {return 0; }



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2005-12-03  1:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-12-01 12:58 [PATCH 2.6.15-rc3-mm1 0/3] -mm patches to replace pci_module_init() with pci_register_driver() Richard Knutsson
2005-12-01 12:58 ` [PATCH 2.6.15-rc3-mm1 1/3] drivers: Replace pci_module_init() with pci_register_driver() in -mm Richard Knutsson
2005-12-01 12:59 ` [PATCH 2.6.15-rc3-mm1 2/3] sound: " Richard Knutsson
2005-12-01 12:59 ` [PATCH 2.6.15-rc3(-mm1) 3/3] pci.h: Richard Knutsson
2005-12-01 23:22   ` Andrew Morton
2005-12-03  1:34     ` [PATCH] pci: Schedule removal of pci_module_init (was Re: [PATCH 2.6.15-rc3(-mm1) 3/3] pci.h:) Richard Knutsson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox