Skip to contentSkip to conversation

isa_bus device/driver naming

PATCH Rene Herman 2 participants 4 messages Mar 18, 2007 – Mar 20, 2007

lore
Share & tools
lore
#0 lore raw

Hi Takashi.

When just now looking at the hg repo I noticed that the isa drivers you converted to the isa_bus infrastructure yourself use the driver name (ie, snd_gusmax) as the name that shows up in the sysfs tree for their devices and driver.

The ones I already did are using the name without the snd_ prefix (ie, gusmax) instead which I personally think is nicer especially since with the isa_bus the devices are called after the driver (by appending a .0, .1 , ...). Most importantly though, those names are user visible and therefore become more or less part of the ABI, so should at least be somewhat consistent and predictable. Having both

/sys/bus/isa/devices/snd_gusmax.0 and
/sys/bus/isa/devices/gusextreme.0

isn't good. The attached (against current hg alsa-kernel) turns them all into the latter format without the snd_ prefix. If you insist I'll do it the other way around instead and change the ones I did to also have the snd_ prefix. Doing it one or the other way seems important though.

Rene.

isa/cmi8330.c +2 -2
diff -r 530b211fffdb isa/cmi8330.c
@@ -601,7 +601,7 @@ static int snd_cmi8330_isa_resume(struct
 }
 #endif
 
-#define CMI8330_DRIVER	"snd_cmi8330"
+#define DEV_NAME	"cmi8330"
 
 static struct isa_driver snd_cmi8330_driver = {
 	.match		= snd_cmi8330_isa_match,
@@ -612,7 +612,7 @@ static struct isa_driver snd_cmi8330_dri
 	.resume		= snd_cmi8330_isa_resume,
 #endif
 	.driver		= {
-		.name	= CMI8330_DRIVER
+		.name	= DEV_NAME
 	},
 };
 
isa/cs423x/cs4236.c +3 -3
diff -r 530b211fffdb isa/cs423x/cs4236.c
@@ -75,10 +75,10 @@ MODULE_SUPPORTED_DEVICE("{{Crystal Semic
 
 #ifdef CS4232
 #define IDENT "CS4232"
-#define CS423X_DRIVER "snd_cs4232"
+#define DEV_NAME "cs4232"
 #else
 #define IDENT "CS4236+"
-#define CS423X_DRIVER "snd_cs4236"
+#define DEV_NAME "cs4236"
 #endif
 
 static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;	/* Index 0-MAX */
@@ -630,7 +630,7 @@ static struct isa_driver cs423x_isa_driv
 	.resume		= snd_cs423x_isa_resume,
 #endif
 	.driver		= {
-		.name	= CS423X_DRIVER
+		.name	= DEV_NAME
 	},
 };
 
isa/es18xx.c +2 -2
diff -r 530b211fffdb isa/es18xx.c
@@ -2318,7 +2318,7 @@ static int snd_es18xx_isa_resume(struct 
 }
 #endif
 
-#define ES18XX_DRIVER	"snd_es18xx"
+#define DEV_NAME "es18xx"
 
 static struct isa_driver snd_es18xx_isa_driver = {
 	.match		= snd_es18xx_isa_match,
@@ -2329,7 +2329,7 @@ static struct isa_driver snd_es18xx_isa_
 	.resume		= snd_es18xx_isa_resume,
 #endif
 	.driver		= {
-		.name	= ES18XX_DRIVER
+		.name	= DEV_NAME
 	},
 };
 
isa/gus/gusmax.c +2 -2
diff -r 530b211fffdb isa/gus/gusmax.c
@@ -358,7 +358,7 @@ static int __devexit snd_gusmax_remove(s
 	return 0;
 }
 
-#define GUSMAX_DRIVER	"snd_gusmax"
+#define DEV_NAME "gusmax"
 
 static struct isa_driver snd_gusmax_driver = {
 	.match		= snd_gusmax_match,
@@ -366,7 +366,7 @@ static struct isa_driver snd_gusmax_driv
 	.remove		= __devexit_p(snd_gusmax_remove),
 	/* FIXME: suspend/resume */
 	.driver		= {
-		.name	= GUSMAX_DRIVER
+		.name	= DEV_NAME
 	},
 };
 
isa/opl3sa2.c +2 -2
diff -r 530b211fffdb isa/opl3sa2.c
@@ -947,7 +947,7 @@ static int snd_opl3sa2_isa_resume(struct
 }
 #endif
 
-#define OPL3SA2_DRIVER	"snd_opl3sa2"
+#define DEV_NAME "opl3sa2"
 
 static struct isa_driver snd_opl3sa2_isa_driver = {
 	.match		= snd_opl3sa2_isa_match,
@@ -958,7 +958,7 @@ static struct isa_driver snd_opl3sa2_isa
 	.resume		= snd_opl3sa2_isa_resume,
 #endif
 	.driver		= {
-		.name	= OPL3SA2_DRIVER
+		.name	= DEV_NAME
 	},
 };
 
isa/opti9xx/miro.c +3 -3
diff -r 530b211fffdb isa/opti9xx/miro.c
@@ -137,8 +137,6 @@ struct snd_miro {
 
 static void snd_miro_proc_init(struct snd_miro * miro);
 
-#define DRIVER_NAME "snd-miro"
-
 static char * snd_opti9xx_names[] = {
 	"unkown",
 	"82C928", "82C929",
@@ -1423,13 +1421,15 @@ static int __devexit snd_miro_remove(str
 	return 0;
 }
 
+#define DEV_NAME "miro"
+
 static struct isa_driver snd_miro_driver = {
 	.match		= snd_miro_match,
 	.probe		= snd_miro_probe,
 	.remove		= __devexit_p(snd_miro_remove),
 	/* FIXME: suspend/resume */
 	.driver		= {
-		.name	= DRIVER_NAME
+		.name	= DEV_NAME
 	},
 };
 
isa/opti9xx/opti92x-ad1848.c +5 -5
diff -r 530b211fffdb isa/opti9xx/opti92x-ad1848.c
@@ -280,10 +280,10 @@ MODULE_DEVICE_TABLE(pnp_card, snd_opti9x
 #endif	/* CONFIG_PNP */
 
 #ifdef OPTi93X
-#define DRIVER_NAME	"snd-card-opti93x"
+#define DEV_NAME "opti93x"
 #else
-#define DRIVER_NAME	"snd-card-opti92x"
-#endif	/* OPTi93X */
+#define DEV_NAME "opti92x"
+#endif
 
 static char * snd_opti9xx_names[] = {
 	"unkown",
@@ -1289,7 +1289,7 @@ static int snd_opti93x_create(struct snd
 	}
 	codec->dma2 = chip->dma2;
 
-	if (request_irq(chip->irq, snd_opti93x_interrupt, IRQF_DISABLED, DRIVER_NAME" - WSS", codec)) {
+	if (request_irq(chip->irq, snd_opti93x_interrupt, IRQF_DISABLED, DEV_NAME" - WSS", codec)) {
 		snd_printk(KERN_ERR "opti9xx: can't grab IRQ %d\n", chip->irq);
 		snd_opti93x_free(codec);
 		return -EBUSY;
@@ -2015,7 +2015,7 @@ static struct isa_driver snd_opti9xx_dri
 	.remove		= __devexit_p(snd_opti9xx_isa_remove),
 	/* FIXME: suspend/resume */
 	.driver		= {
-		.name	= DRIVER_NAME
+		.name	= DEV_NAME
 	},
 };
 
isa/sb/sb16.c +3 -3
diff -r 530b211fffdb isa/sb/sb16.c
@@ -615,9 +615,9 @@ static int snd_sb16_isa_resume(struct de
 #endif
 
 #ifdef SNDRV_SBAWE
-#define SND_SB16_DRIVER	"snd_sbawe"
+#define DEV_NAME "sbawe"
 #else
-#define SND_SB16_DRIVER	"snd_sb16"
+#define DEV_NAME "sb16"
 #endif
 
 static struct isa_driver snd_sb16_isa_driver = {
@@ -629,7 +629,7 @@ static struct isa_driver snd_sb16_isa_dr
 	.resume		= snd_sb16_isa_resume,
 #endif
 	.driver		= {
-		.name	= SND_SB16_DRIVER
+		.name	= DEV_NAME
 	},
 };
 
isa/sb/sb8.c +2 -2
diff -r 530b211fffdb isa/sb/sb8.c
@@ -239,7 +239,7 @@ static int snd_sb8_resume(struct device 
 }
 #endif
 
-#define SND_SB8_DRIVER	"snd_sb8"
+#define DEV_NAME "sb8"
 
 static struct isa_driver snd_sb8_driver = {
 	.match		= snd_sb8_match,
@@ -250,7 +250,7 @@ static struct isa_driver snd_sb8_driver 
 	.resume		= snd_sb8_resume,
 #endif
 	.driver		= {
-		.name	= SND_SB8_DRIVER
+		.name	= DEV_NAME 
 	},
 };
 
isa/sgalaxy.c +2 -2
diff -r 530b211fffdb isa/sgalaxy.c
@@ -334,7 +334,7 @@ static int snd_sgalaxy_resume(struct dev
 }
 #endif
 
-#define SND_SGALAXY_DRIVER	"snd_sgalaxy"
+#define DEV_NAME "sgalaxy"
 
 static struct isa_driver snd_sgalaxy_driver = {
 	.match		= snd_sgalaxy_match,
@@ -345,7 +345,7 @@ static struct isa_driver snd_sgalaxy_dri
 	.resume		= snd_sgalaxy_resume,
 #endif
 	.driver		= {
-		.name	= SND_SGALAXY_DRIVER
+		.name	= DEV_NAME
 	},
 };
 
isa/sscape.c +2 -2
diff -r 530b211fffdb isa/sscape.c
@@ -1296,7 +1296,7 @@ static int __devexit snd_sscape_remove(s
 	return 0;
 }
 
-#define SSCAPE_DRIVER	"snd_sscape"
+#define DEV_NAME "sscape"
 
 static struct isa_driver snd_sscape_driver = {
 	.match		= snd_sscape_match,
@@ -1304,7 +1304,7 @@ static struct isa_driver snd_sscape_driv
 	.remove		= __devexit_p(snd_sscape_remove),
 	/* FIXME: suspend/resume */
 	.driver		= {
-		.name	= SSCAPE_DRIVER
+		.name	= DEV_NAME
 	},
 };
 
isa/wavefront/wavefront.c +2 -2
diff -r 530b211fffdb isa/wavefront/wavefront.c
@@ -633,7 +633,7 @@ static int __devexit snd_wavefront_isa_r
 	return 0;
 }
 
-#define WAVEFRONT_DRIVER	"snd_wavefront"
+#define DEV_NAME "wavefront"
 
 static struct isa_driver snd_wavefront_driver = {
 	.match		= snd_wavefront_isa_match,
@@ -641,7 +641,7 @@ static struct isa_driver snd_wavefront_d
 	.remove		= __devexit_p(snd_wavefront_isa_remove),
 	/* FIXME: suspend, resume */
 	.driver		= {
-		.name	= WAVEFRONT_DRIVER
+		.name	= DEV_NAME
 	},
 };
 

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

_______________________________________________
Alsa-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/alsa-devel

#1 lore raw

At Sun, 18 Mar 2007 22:03:43 +0100,

Quoted 15 lines · Rene Herman

Hi Takashi.

When just now looking at the hg repo I noticed that the isa drivers you converted to the isa_bus infrastructure yourself use the driver name (ie, snd_gusmax) as the name that shows up in the sysfs tree for their devices and driver.

The ones I already did are using the name without the snd_ prefix (ie, gusmax) instead which I personally think is nicer especially since with the isa_bus the devices are called after the driver (by appending a .0, .1 , ...). Most importantly though, those names are user visible and therefore become more or less part of the ABI, so should at least be somewhat consistent and predictable. Having both

Quoted 7 lines

/sys/bus/isa/devices/snd_gusmax.0 and
/sys/bus/isa/devices/gusextreme.0

isn't good. The attached (against current hg alsa-kernel) turns them all into the latter format without the snd_ prefix. If you insist I'll do it the other way around instead and change the ones I did to also have the snd_ prefix. Doing it one or the other way seems important though.

The name without snd_ prefix is fine. It was added simply because once some names conflicted with OSS drivers in pnp_driver configuration. But in the case of isa_driver, no other drivers use it yet, thus no confliction can happen.

Could you give a sign-off?

Thanks,

Takashi

Quoted 277 lines

Rene.

[2 dev_name.diff <text/plain (7bit)>]
diff -r 530b211fffdb isa/cmi8330.c

isa/cmi8330.c +2 -2
@@ -601,7 +601,7 @@ static int snd_cmi8330_isa_resume(struct
 }
 #endif
 
-#define CMI8330_DRIVER	"snd_cmi8330"
+#define DEV_NAME	"cmi8330"
 
 static struct isa_driver snd_cmi8330_driver = {
 	.match		= snd_cmi8330_isa_match,
@@ -612,7 +612,7 @@ static struct isa_driver snd_cmi8330_dri
 	.resume		= snd_cmi8330_isa_resume,
 #endif
 	.driver		= {
-		.name	= CMI8330_DRIVER
+		.name	= DEV_NAME
 	},
 };
 

diff -r 530b211fffdb isa/cs423x/cs4236.c

isa/cs423x/cs4236.c +3 -3
@@ -75,10 +75,10 @@ MODULE_SUPPORTED_DEVICE("{{Crystal Semic
 
 #ifdef CS4232
 #define IDENT "CS4232"
-#define CS423X_DRIVER "snd_cs4232"
+#define DEV_NAME "cs4232"
 #else
 #define IDENT "CS4236+"
-#define CS423X_DRIVER "snd_cs4236"
+#define DEV_NAME "cs4236"
 #endif
 
 static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;	/* Index 0-MAX */
@@ -630,7 +630,7 @@ static struct isa_driver cs423x_isa_driv
 	.resume		= snd_cs423x_isa_resume,
 #endif
 	.driver		= {
-		.name	= CS423X_DRIVER
+		.name	= DEV_NAME
 	},
 };
 

diff -r 530b211fffdb isa/es18xx.c

isa/es18xx.c +2 -2
@@ -2318,7 +2318,7 @@ static int snd_es18xx_isa_resume(struct 
 }
 #endif
 
-#define ES18XX_DRIVER	"snd_es18xx"
+#define DEV_NAME "es18xx"
 
 static struct isa_driver snd_es18xx_isa_driver = {
 	.match		= snd_es18xx_isa_match,
@@ -2329,7 +2329,7 @@ static struct isa_driver snd_es18xx_isa_
 	.resume		= snd_es18xx_isa_resume,
 #endif
 	.driver		= {
-		.name	= ES18XX_DRIVER
+		.name	= DEV_NAME
 	},
 };
 

diff -r 530b211fffdb isa/gus/gusmax.c

isa/gus/gusmax.c +2 -2
@@ -358,7 +358,7 @@ static int __devexit snd_gusmax_remove(s
 	return 0;
 }
 
-#define GUSMAX_DRIVER	"snd_gusmax"
+#define DEV_NAME "gusmax"
 
 static struct isa_driver snd_gusmax_driver = {
 	.match		= snd_gusmax_match,
@@ -366,7 +366,7 @@ static struct isa_driver snd_gusmax_driv
 	.remove		= __devexit_p(snd_gusmax_remove),
 	/* FIXME: suspend/resume */
 	.driver		= {
-		.name	= GUSMAX_DRIVER
+		.name	= DEV_NAME
 	},
 };
 

diff -r 530b211fffdb isa/opl3sa2.c

isa/opl3sa2.c +2 -2
@@ -947,7 +947,7 @@ static int snd_opl3sa2_isa_resume(struct
 }
 #endif
 
-#define OPL3SA2_DRIVER	"snd_opl3sa2"
+#define DEV_NAME "opl3sa2"
 
 static struct isa_driver snd_opl3sa2_isa_driver = {
 	.match		= snd_opl3sa2_isa_match,
@@ -958,7 +958,7 @@ static struct isa_driver snd_opl3sa2_isa
 	.resume		= snd_opl3sa2_isa_resume,
 #endif
 	.driver		= {
-		.name	= OPL3SA2_DRIVER
+		.name	= DEV_NAME
 	},
 };
 

diff -r 530b211fffdb isa/opti9xx/miro.c

isa/opti9xx/miro.c +3 -3
@@ -137,8 +137,6 @@ struct snd_miro {
 
 static void snd_miro_proc_init(struct snd_miro * miro);
 
-#define DRIVER_NAME "snd-miro"
-
 static char * snd_opti9xx_names[] = {
 	"unkown",
 	"82C928", "82C929",
@@ -1423,13 +1421,15 @@ static int __devexit snd_miro_remove(str
 	return 0;
 }
 
+#define DEV_NAME "miro"
+
 static struct isa_driver snd_miro_driver = {
 	.match		= snd_miro_match,
 	.probe		= snd_miro_probe,
 	.remove		= __devexit_p(snd_miro_remove),
 	/* FIXME: suspend/resume */
 	.driver		= {
-		.name	= DRIVER_NAME
+		.name	= DEV_NAME
 	},
 };
 

diff -r 530b211fffdb isa/opti9xx/opti92x-ad1848.c

isa/opti9xx/opti92x-ad1848.c +5 -5
@@ -280,10 +280,10 @@ MODULE_DEVICE_TABLE(pnp_card, snd_opti9x
 #endif	/* CONFIG_PNP */
 
 #ifdef OPTi93X
-#define DRIVER_NAME	"snd-card-opti93x"
+#define DEV_NAME "opti93x"
 #else
-#define DRIVER_NAME	"snd-card-opti92x"
-#endif	/* OPTi93X */
+#define DEV_NAME "opti92x"
+#endif
 
 static char * snd_opti9xx_names[] = {
 	"unkown",
@@ -1289,7 +1289,7 @@ static int snd_opti93x_create(struct snd
 	}
 	codec->dma2 = chip->dma2;
 
-	if (request_irq(chip->irq, snd_opti93x_interrupt, IRQF_DISABLED, DRIVER_NAME" - WSS", codec)) {
+	if (request_irq(chip->irq, snd_opti93x_interrupt, IRQF_DISABLED, DEV_NAME" - WSS", codec)) {
 		snd_printk(KERN_ERR "opti9xx: can't grab IRQ %d\n", chip->irq);
 		snd_opti93x_free(codec);
 		return -EBUSY;
@@ -2015,7 +2015,7 @@ static struct isa_driver snd_opti9xx_dri
 	.remove		= __devexit_p(snd_opti9xx_isa_remove),
 	/* FIXME: suspend/resume */
 	.driver		= {
-		.name	= DRIVER_NAME
+		.name	= DEV_NAME
 	},
 };
 

diff -r 530b211fffdb isa/sb/sb16.c

isa/sb/sb16.c +3 -3
@@ -615,9 +615,9 @@ static int snd_sb16_isa_resume(struct de
 #endif
 
 #ifdef SNDRV_SBAWE
-#define SND_SB16_DRIVER	"snd_sbawe"
+#define DEV_NAME "sbawe"
 #else
-#define SND_SB16_DRIVER	"snd_sb16"
+#define DEV_NAME "sb16"
 #endif
 
 static struct isa_driver snd_sb16_isa_driver = {
@@ -629,7 +629,7 @@ static struct isa_driver snd_sb16_isa_dr
 	.resume		= snd_sb16_isa_resume,
 #endif
 	.driver		= {
-		.name	= SND_SB16_DRIVER
+		.name	= DEV_NAME
 	},
 };
 

diff -r 530b211fffdb isa/sb/sb8.c

isa/sb/sb8.c +2 -2
@@ -239,7 +239,7 @@ static int snd_sb8_resume(struct device 
 }
 #endif
 
-#define SND_SB8_DRIVER	"snd_sb8"
+#define DEV_NAME "sb8"
 
 static struct isa_driver snd_sb8_driver = {
 	.match		= snd_sb8_match,
@@ -250,7 +250,7 @@ static struct isa_driver snd_sb8_driver 
 	.resume		= snd_sb8_resume,
 #endif
 	.driver		= {
-		.name	= SND_SB8_DRIVER
+		.name	= DEV_NAME 
 	},
 };
 

diff -r 530b211fffdb isa/sgalaxy.c

isa/sgalaxy.c +2 -2
@@ -334,7 +334,7 @@ static int snd_sgalaxy_resume(struct dev
 }
 #endif
 
-#define SND_SGALAXY_DRIVER	"snd_sgalaxy"
+#define DEV_NAME "sgalaxy"
 
 static struct isa_driver snd_sgalaxy_driver = {
 	.match		= snd_sgalaxy_match,
@@ -345,7 +345,7 @@ static struct isa_driver snd_sgalaxy_dri
 	.resume		= snd_sgalaxy_resume,
 #endif
 	.driver		= {
-		.name	= SND_SGALAXY_DRIVER
+		.name	= DEV_NAME
 	},
 };
 

diff -r 530b211fffdb isa/sscape.c

isa/sscape.c +2 -2
@@ -1296,7 +1296,7 @@ static int __devexit snd_sscape_remove(s
 	return 0;
 }
 
-#define SSCAPE_DRIVER	"snd_sscape"
+#define DEV_NAME "sscape"
 
 static struct isa_driver snd_sscape_driver = {
 	.match		= snd_sscape_match,
@@ -1304,7 +1304,7 @@ static struct isa_driver snd_sscape_driv
 	.remove		= __devexit_p(snd_sscape_remove),
 	/* FIXME: suspend/resume */
 	.driver		= {
-		.name	= SSCAPE_DRIVER
+		.name	= DEV_NAME
 	},
 };
 

diff -r 530b211fffdb isa/wavefront/wavefront.c

isa/wavefront/wavefront.c +1 -1
@@ -633,7 +633,7 @@ static int __devexit snd_wavefront_isa_r
 	return 0;
 }
 
-#define WAVEFRONT_DRIVER	"snd_wavefront"
+#define DEV_NAME "wavefront"
 
 static struct isa_driver snd_wavefront_driver = {
 	.match		= snd_wavefront_isa_match,

isa/wavefront/wavefront.c static struct isa_driver snd_wavefront_d · line 647

Quoted 8 lines
isa/wavefront/wavefront.c +1 -1
@@ -641,7 +641,7 @@ static struct isa_driver snd_wavefront_d
 	.remove		= __devexit_p(snd_wavefront_isa_remove),
 	/* FIXME: suspend, resume */
 	.driver		= {
-		.name	= WAVEFRONT_DRIVER
+		.name	= DEV_NAME
 	},
 };
 

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

#2 lore raw
Quoted 2 lines · Takashi Iwai

The name without snd_ prefix is fine. It was added simply because once some names conflicted with OSS drivers in pnp_driver configuration. But in the case of isa_driver, no other drivers use it yet, thus no confliction can happen.

Wonderful, thanks.

Quoted 1 line

Could you give a sign-off?

Err, yes, I keep forgetting. On linux-kernel the author's own signed-off is usually taken as implied on small (and non copyrightable) stuff like this...

===
isa_bus: delete snd_ prefix from the (sysfs visible) device/driver names.

===

Rene

isa/cmi8330.c +2 -2
diff -r 530b211fffdb isa/cmi8330.c
@@ -601,7 +601,7 @@ static int snd_cmi8330_isa_resume(struct
 }
 #endif
 
-#define CMI8330_DRIVER	"snd_cmi8330"
+#define DEV_NAME	"cmi8330"
 
 static struct isa_driver snd_cmi8330_driver = {
 	.match		= snd_cmi8330_isa_match,
@@ -612,7 +612,7 @@ static struct isa_driver snd_cmi8330_dri
 	.resume		= snd_cmi8330_isa_resume,
 #endif
 	.driver		= {
-		.name	= CMI8330_DRIVER
+		.name	= DEV_NAME
 	},
 };
 
isa/cs423x/cs4236.c +3 -3
diff -r 530b211fffdb isa/cs423x/cs4236.c
@@ -75,10 +75,10 @@ MODULE_SUPPORTED_DEVICE("{{Crystal Semic
 
 #ifdef CS4232
 #define IDENT "CS4232"
-#define CS423X_DRIVER "snd_cs4232"
+#define DEV_NAME "cs4232"
 #else
 #define IDENT "CS4236+"
-#define CS423X_DRIVER "snd_cs4236"
+#define DEV_NAME "cs4236"
 #endif
 
 static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;	/* Index 0-MAX */
@@ -630,7 +630,7 @@ static struct isa_driver cs423x_isa_driv
 	.resume		= snd_cs423x_isa_resume,
 #endif
 	.driver		= {
-		.name	= CS423X_DRIVER
+		.name	= DEV_NAME
 	},
 };
 
isa/es18xx.c +2 -2
diff -r 530b211fffdb isa/es18xx.c
@@ -2318,7 +2318,7 @@ static int snd_es18xx_isa_resume(struct 
 }
 #endif
 
-#define ES18XX_DRIVER	"snd_es18xx"
+#define DEV_NAME "es18xx"
 
 static struct isa_driver snd_es18xx_isa_driver = {
 	.match		= snd_es18xx_isa_match,
@@ -2329,7 +2329,7 @@ static struct isa_driver snd_es18xx_isa_
 	.resume		= snd_es18xx_isa_resume,
 #endif
 	.driver		= {
-		.name	= ES18XX_DRIVER
+		.name	= DEV_NAME
 	},
 };
 
isa/gus/gusmax.c +2 -2
diff -r 530b211fffdb isa/gus/gusmax.c
@@ -358,7 +358,7 @@ static int __devexit snd_gusmax_remove(s
 	return 0;
 }
 
-#define GUSMAX_DRIVER	"snd_gusmax"
+#define DEV_NAME "gusmax"
 
 static struct isa_driver snd_gusmax_driver = {
 	.match		= snd_gusmax_match,
@@ -366,7 +366,7 @@ static struct isa_driver snd_gusmax_driv
 	.remove		= __devexit_p(snd_gusmax_remove),
 	/* FIXME: suspend/resume */
 	.driver		= {
-		.name	= GUSMAX_DRIVER
+		.name	= DEV_NAME
 	},
 };
 
isa/opl3sa2.c +2 -2
diff -r 530b211fffdb isa/opl3sa2.c
@@ -947,7 +947,7 @@ static int snd_opl3sa2_isa_resume(struct
 }
 #endif
 
-#define OPL3SA2_DRIVER	"snd_opl3sa2"
+#define DEV_NAME "opl3sa2"
 
 static struct isa_driver snd_opl3sa2_isa_driver = {
 	.match		= snd_opl3sa2_isa_match,
@@ -958,7 +958,7 @@ static struct isa_driver snd_opl3sa2_isa
 	.resume		= snd_opl3sa2_isa_resume,
 #endif
 	.driver		= {
-		.name	= OPL3SA2_DRIVER
+		.name	= DEV_NAME
 	},
 };
 
isa/opti9xx/miro.c +3 -3
diff -r 530b211fffdb isa/opti9xx/miro.c
@@ -137,8 +137,6 @@ struct snd_miro {
 
 static void snd_miro_proc_init(struct snd_miro * miro);
 
-#define DRIVER_NAME "snd-miro"
-
 static char * snd_opti9xx_names[] = {
 	"unkown",
 	"82C928", "82C929",
@@ -1423,13 +1421,15 @@ static int __devexit snd_miro_remove(str
 	return 0;
 }
 
+#define DEV_NAME "miro"
+
 static struct isa_driver snd_miro_driver = {
 	.match		= snd_miro_match,
 	.probe		= snd_miro_probe,
 	.remove		= __devexit_p(snd_miro_remove),
 	/* FIXME: suspend/resume */
 	.driver		= {
-		.name	= DRIVER_NAME
+		.name	= DEV_NAME
 	},
 };
 
isa/opti9xx/opti92x-ad1848.c +5 -5
diff -r 530b211fffdb isa/opti9xx/opti92x-ad1848.c
@@ -280,10 +280,10 @@ MODULE_DEVICE_TABLE(pnp_card, snd_opti9x
 #endif	/* CONFIG_PNP */
 
 #ifdef OPTi93X
-#define DRIVER_NAME	"snd-card-opti93x"
+#define DEV_NAME "opti93x"
 #else
-#define DRIVER_NAME	"snd-card-opti92x"
-#endif	/* OPTi93X */
+#define DEV_NAME "opti92x"
+#endif
 
 static char * snd_opti9xx_names[] = {
 	"unkown",
@@ -1289,7 +1289,7 @@ static int snd_opti93x_create(struct snd
 	}
 	codec->dma2 = chip->dma2;
 
-	if (request_irq(chip->irq, snd_opti93x_interrupt, IRQF_DISABLED, DRIVER_NAME" - WSS", codec)) {
+	if (request_irq(chip->irq, snd_opti93x_interrupt, IRQF_DISABLED, DEV_NAME" - WSS", codec)) {
 		snd_printk(KERN_ERR "opti9xx: can't grab IRQ %d\n", chip->irq);
 		snd_opti93x_free(codec);
 		return -EBUSY;
@@ -2015,7 +2015,7 @@ static struct isa_driver snd_opti9xx_dri
 	.remove		= __devexit_p(snd_opti9xx_isa_remove),
 	/* FIXME: suspend/resume */
 	.driver		= {
-		.name	= DRIVER_NAME
+		.name	= DEV_NAME
 	},
 };
 
isa/sb/sb16.c +3 -3
diff -r 530b211fffdb isa/sb/sb16.c
@@ -615,9 +615,9 @@ static int snd_sb16_isa_resume(struct de
 #endif
 
 #ifdef SNDRV_SBAWE
-#define SND_SB16_DRIVER	"snd_sbawe"
+#define DEV_NAME "sbawe"
 #else
-#define SND_SB16_DRIVER	"snd_sb16"
+#define DEV_NAME "sb16"
 #endif
 
 static struct isa_driver snd_sb16_isa_driver = {
@@ -629,7 +629,7 @@ static struct isa_driver snd_sb16_isa_dr
 	.resume		= snd_sb16_isa_resume,
 #endif
 	.driver		= {
-		.name	= SND_SB16_DRIVER
+		.name	= DEV_NAME
 	},
 };
 
isa/sb/sb8.c +2 -2
diff -r 530b211fffdb isa/sb/sb8.c
@@ -239,7 +239,7 @@ static int snd_sb8_resume(struct device 
 }
 #endif
 
-#define SND_SB8_DRIVER	"snd_sb8"
+#define DEV_NAME "sb8"
 
 static struct isa_driver snd_sb8_driver = {
 	.match		= snd_sb8_match,
@@ -250,7 +250,7 @@ static struct isa_driver snd_sb8_driver 
 	.resume		= snd_sb8_resume,
 #endif
 	.driver		= {
-		.name	= SND_SB8_DRIVER
+		.name	= DEV_NAME 
 	},
 };
 
isa/sgalaxy.c +2 -2
diff -r 530b211fffdb isa/sgalaxy.c
@@ -334,7 +334,7 @@ static int snd_sgalaxy_resume(struct dev
 }
 #endif
 
-#define SND_SGALAXY_DRIVER	"snd_sgalaxy"
+#define DEV_NAME "sgalaxy"
 
 static struct isa_driver snd_sgalaxy_driver = {
 	.match		= snd_sgalaxy_match,
@@ -345,7 +345,7 @@ static struct isa_driver snd_sgalaxy_dri
 	.resume		= snd_sgalaxy_resume,
 #endif
 	.driver		= {
-		.name	= SND_SGALAXY_DRIVER
+		.name	= DEV_NAME
 	},
 };
 
isa/sscape.c +2 -2
diff -r 530b211fffdb isa/sscape.c
@@ -1296,7 +1296,7 @@ static int __devexit snd_sscape_remove(s
 	return 0;
 }
 
-#define SSCAPE_DRIVER	"snd_sscape"
+#define DEV_NAME "sscape"
 
 static struct isa_driver snd_sscape_driver = {
 	.match		= snd_sscape_match,
@@ -1304,7 +1304,7 @@ static struct isa_driver snd_sscape_driv
 	.remove		= __devexit_p(snd_sscape_remove),
 	/* FIXME: suspend/resume */
 	.driver		= {
-		.name	= SSCAPE_DRIVER
+		.name	= DEV_NAME
 	},
 };
 
isa/wavefront/wavefront.c +2 -2
diff -r 530b211fffdb isa/wavefront/wavefront.c
@@ -633,7 +633,7 @@ static int __devexit snd_wavefront_isa_r
 	return 0;
 }
 
-#define WAVEFRONT_DRIVER	"snd_wavefront"
+#define DEV_NAME "wavefront"
 
 static struct isa_driver snd_wavefront_driver = {
 	.match		= snd_wavefront_isa_match,
@@ -641,7 +641,7 @@ static struct isa_driver snd_wavefront_d
 	.remove		= __devexit_p(snd_wavefront_isa_remove),
 	/* FIXME: suspend, resume */
 	.driver		= {
-		.name	= WAVEFRONT_DRIVER
+		.name	= DEV_NAME
 	},
 };
 

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

_______________________________________________
Alsa-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/alsa-devel

#3 lore raw

At Mon, 19 Mar 2007 22:17:10 +0100,

Quoted 8 lines · Rene Herman
Quoted 4 lines · Takashi Iwai

The name without snd_ prefix is fine. It was added simply because once some names conflicted with OSS drivers in pnp_driver configuration. But in the case of isa_driver, no other drivers use it yet, thus no confliction can happen.

Quoted 7 lines

Wonderful, thanks.

Quoted 1 line

Could you give a sign-off?

Err, yes, I keep forgetting. On linux-kernel the author's own signed-off is usually taken as implied on small (and non copyrightable) stuff like this...

Well, I could apply it of course, but when no sign-off is given, I suppose it might be incomplete form.

Anyway, the patch was applied to HG tree now. Thanks.

Takashi

Quoted 293 lines

===
isa_bus: delete snd_ prefix from the (sysfs visible) device/driver names.

===

Rene
[2 dev_name.diff <text/plain (7bit)>]
diff -r 530b211fffdb isa/cmi8330.c

isa/cmi8330.c +2 -2
@@ -601,7 +601,7 @@ static int snd_cmi8330_isa_resume(struct
 }
 #endif
 
-#define CMI8330_DRIVER	"snd_cmi8330"
+#define DEV_NAME	"cmi8330"
 
 static struct isa_driver snd_cmi8330_driver = {
 	.match		= snd_cmi8330_isa_match,
@@ -612,7 +612,7 @@ static struct isa_driver snd_cmi8330_dri
 	.resume		= snd_cmi8330_isa_resume,
 #endif
 	.driver		= {
-		.name	= CMI8330_DRIVER
+		.name	= DEV_NAME
 	},
 };
 

diff -r 530b211fffdb isa/cs423x/cs4236.c

isa/cs423x/cs4236.c +3 -3
@@ -75,10 +75,10 @@ MODULE_SUPPORTED_DEVICE("{{Crystal Semic
 
 #ifdef CS4232
 #define IDENT "CS4232"
-#define CS423X_DRIVER "snd_cs4232"
+#define DEV_NAME "cs4232"
 #else
 #define IDENT "CS4236+"
-#define CS423X_DRIVER "snd_cs4236"
+#define DEV_NAME "cs4236"
 #endif
 
 static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;	/* Index 0-MAX */
@@ -630,7 +630,7 @@ static struct isa_driver cs423x_isa_driv
 	.resume		= snd_cs423x_isa_resume,
 #endif
 	.driver		= {
-		.name	= CS423X_DRIVER
+		.name	= DEV_NAME
 	},
 };
 

diff -r 530b211fffdb isa/es18xx.c

isa/es18xx.c +2 -2
@@ -2318,7 +2318,7 @@ static int snd_es18xx_isa_resume(struct 
 }
 #endif
 
-#define ES18XX_DRIVER	"snd_es18xx"
+#define DEV_NAME "es18xx"
 
 static struct isa_driver snd_es18xx_isa_driver = {
 	.match		= snd_es18xx_isa_match,
@@ -2329,7 +2329,7 @@ static struct isa_driver snd_es18xx_isa_
 	.resume		= snd_es18xx_isa_resume,
 #endif
 	.driver		= {
-		.name	= ES18XX_DRIVER
+		.name	= DEV_NAME
 	},
 };
 

diff -r 530b211fffdb isa/gus/gusmax.c

isa/gus/gusmax.c +2 -2
@@ -358,7 +358,7 @@ static int __devexit snd_gusmax_remove(s
 	return 0;
 }
 
-#define GUSMAX_DRIVER	"snd_gusmax"
+#define DEV_NAME "gusmax"
 
 static struct isa_driver snd_gusmax_driver = {
 	.match		= snd_gusmax_match,
@@ -366,7 +366,7 @@ static struct isa_driver snd_gusmax_driv
 	.remove		= __devexit_p(snd_gusmax_remove),
 	/* FIXME: suspend/resume */
 	.driver		= {
-		.name	= GUSMAX_DRIVER
+		.name	= DEV_NAME
 	},
 };
 

diff -r 530b211fffdb isa/opl3sa2.c

isa/opl3sa2.c +2 -2
@@ -947,7 +947,7 @@ static int snd_opl3sa2_isa_resume(struct
 }
 #endif
 
-#define OPL3SA2_DRIVER	"snd_opl3sa2"
+#define DEV_NAME "opl3sa2"
 
 static struct isa_driver snd_opl3sa2_isa_driver = {
 	.match		= snd_opl3sa2_isa_match,
@@ -958,7 +958,7 @@ static struct isa_driver snd_opl3sa2_isa
 	.resume		= snd_opl3sa2_isa_resume,
 #endif
 	.driver		= {
-		.name	= OPL3SA2_DRIVER
+		.name	= DEV_NAME
 	},
 };
 

diff -r 530b211fffdb isa/opti9xx/miro.c

isa/opti9xx/miro.c +3 -3
@@ -137,8 +137,6 @@ struct snd_miro {
 
 static void snd_miro_proc_init(struct snd_miro * miro);
 
-#define DRIVER_NAME "snd-miro"
-
 static char * snd_opti9xx_names[] = {
 	"unkown",
 	"82C928", "82C929",
@@ -1423,13 +1421,15 @@ static int __devexit snd_miro_remove(str
 	return 0;
 }
 
+#define DEV_NAME "miro"
+
 static struct isa_driver snd_miro_driver = {
 	.match		= snd_miro_match,
 	.probe		= snd_miro_probe,
 	.remove		= __devexit_p(snd_miro_remove),
 	/* FIXME: suspend/resume */
 	.driver		= {
-		.name	= DRIVER_NAME
+		.name	= DEV_NAME
 	},
 };
 

diff -r 530b211fffdb isa/opti9xx/opti92x-ad1848.c

isa/opti9xx/opti92x-ad1848.c +5 -5
@@ -280,10 +280,10 @@ MODULE_DEVICE_TABLE(pnp_card, snd_opti9x
 #endif	/* CONFIG_PNP */
 
 #ifdef OPTi93X
-#define DRIVER_NAME	"snd-card-opti93x"
+#define DEV_NAME "opti93x"
 #else
-#define DRIVER_NAME	"snd-card-opti92x"
-#endif	/* OPTi93X */
+#define DEV_NAME "opti92x"
+#endif
 
 static char * snd_opti9xx_names[] = {
 	"unkown",
@@ -1289,7 +1289,7 @@ static int snd_opti93x_create(struct snd
 	}
 	codec->dma2 = chip->dma2;
 
-	if (request_irq(chip->irq, snd_opti93x_interrupt, IRQF_DISABLED, DRIVER_NAME" - WSS", codec)) {
+	if (request_irq(chip->irq, snd_opti93x_interrupt, IRQF_DISABLED, DEV_NAME" - WSS", codec)) {
 		snd_printk(KERN_ERR "opti9xx: can't grab IRQ %d\n", chip->irq);
 		snd_opti93x_free(codec);
 		return -EBUSY;
@@ -2015,7 +2015,7 @@ static struct isa_driver snd_opti9xx_dri
 	.remove		= __devexit_p(snd_opti9xx_isa_remove),
 	/* FIXME: suspend/resume */
 	.driver		= {
-		.name	= DRIVER_NAME
+		.name	= DEV_NAME
 	},
 };
 

diff -r 530b211fffdb isa/sb/sb16.c

isa/sb/sb16.c +3 -3
@@ -615,9 +615,9 @@ static int snd_sb16_isa_resume(struct de
 #endif
 
 #ifdef SNDRV_SBAWE
-#define SND_SB16_DRIVER	"snd_sbawe"
+#define DEV_NAME "sbawe"
 #else
-#define SND_SB16_DRIVER	"snd_sb16"
+#define DEV_NAME "sb16"
 #endif
 
 static struct isa_driver snd_sb16_isa_driver = {
@@ -629,7 +629,7 @@ static struct isa_driver snd_sb16_isa_dr
 	.resume		= snd_sb16_isa_resume,
 #endif
 	.driver		= {
-		.name	= SND_SB16_DRIVER
+		.name	= DEV_NAME
 	},
 };
 

diff -r 530b211fffdb isa/sb/sb8.c

isa/sb/sb8.c +2 -2
@@ -239,7 +239,7 @@ static int snd_sb8_resume(struct device 
 }
 #endif
 
-#define SND_SB8_DRIVER	"snd_sb8"
+#define DEV_NAME "sb8"
 
 static struct isa_driver snd_sb8_driver = {
 	.match		= snd_sb8_match,
@@ -250,7 +250,7 @@ static struct isa_driver snd_sb8_driver 
 	.resume		= snd_sb8_resume,
 #endif
 	.driver		= {
-		.name	= SND_SB8_DRIVER
+		.name	= DEV_NAME 
 	},
 };
 

diff -r 530b211fffdb isa/sgalaxy.c

isa/sgalaxy.c +2 -2
@@ -334,7 +334,7 @@ static int snd_sgalaxy_resume(struct dev
 }
 #endif
 
-#define SND_SGALAXY_DRIVER	"snd_sgalaxy"
+#define DEV_NAME "sgalaxy"
 
 static struct isa_driver snd_sgalaxy_driver = {
 	.match		= snd_sgalaxy_match,
@@ -345,7 +345,7 @@ static struct isa_driver snd_sgalaxy_dri
 	.resume		= snd_sgalaxy_resume,
 #endif
 	.driver		= {
-		.name	= SND_SGALAXY_DRIVER
+		.name	= DEV_NAME
 	},
 };
 

diff -r 530b211fffdb isa/sscape.c

isa/sscape.c +2 -2
@@ -1296,7 +1296,7 @@ static int __devexit snd_sscape_remove(s
 	return 0;
 }
 
-#define SSCAPE_DRIVER	"snd_sscape"
+#define DEV_NAME "sscape"
 
 static struct isa_driver snd_sscape_driver = {
 	.match		= snd_sscape_match,
@@ -1304,7 +1304,7 @@ static struct isa_driver snd_sscape_driv
 	.remove		= __devexit_p(snd_sscape_remove),
 	/* FIXME: suspend/resume */
 	.driver		= {
-		.name	= SSCAPE_DRIVER
+		.name	= DEV_NAME
 	},
 };
 

diff -r 530b211fffdb isa/wavefront/wavefront.c

isa/wavefront/wavefront.c +2 -2
@@ -633,7 +633,7 @@ static int __devexit snd_wavefront_isa_r
 	return 0;
 }
 
-#define WAVEFRONT_DRIVER	"snd_wavefront"
+#define DEV_NAME "wavefront"
 
 static struct isa_driver snd_wavefront_driver = {
 	.match		= snd_wavefront_isa_match,
@@ -641,7 +641,7 @@ static struct isa_driver snd_wavefront_d
 	.remove		= __devexit_p(snd_wavefront_isa_remove),
 	/* FIXME: suspend, resume */
 	.driver		= {
-		.name	= WAVEFRONT_DRIVER
+		.name	= DEV_NAME
 	},
 };
 

[3 <text/plain; us-ascii (7bit)>]
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT

Quoted 8 lines

Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
[4 <text/plain; us-ascii (7bit)>]
_______________________________________________
Alsa-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/alsa-devel

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV