Skip to contentSkip to conversation

via82xx: add __devinitdata

PATCH Applied Andreas Mohr 2 participants 2 messages Oct 3, 2006 – Oct 4, 2006 Sound

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 via82xx: add __devinitdata

Hi,

add __devinitdata to struct whitelist, since it's used within a __devinit function.
Add const attribute to iterator variable, too.

Compile-tested (no section warnings etc.) and run-tested on vt8233, 2.6.18-mm3 (hopefully applies well to current ALSA).

sound/pci/via82xx.c +2 -2
diff -urN linux-2.6.18-mm3.orig/sound/pci/via82xx.c linux-2.6.18-mm3/sound/pci/via82xx.c
@@ -2360,7 +2360,7 @@
 
 static int __devinit check_dxs_list(struct pci_dev *pci, int revision)
 {
-	static struct dxs_whitelist whitelist[] = {
+	static struct dxs_whitelist whitelist[] __devinitdata = {
 		{ .subvendor = 0x1005, .subdevice = 0x4710, .action = VIA_DXS_ENABLE }, /* Avance Logic Mobo */
 		{ .subvendor = 0x1019, .subdevice = 0x0996, .action = VIA_DXS_48K },
 		{ .subvendor = 0x1019, .subdevice = 0x0a81, .action = VIA_DXS_NO_VRA }, /* ECS K7VTA3 v8.0 */
@@ -2421,7 +2421,7 @@
 		{ .subvendor = 0x4005, .subdevice = 0x4710, .action = VIA_DXS_SRC },	/* MSI K7T266 Pro2 (MS-6380 V2.0) BIOS 3.7 */
 		{ } /* terminator */
 	};
-	struct dxs_whitelist *w;
+	const struct dxs_whitelist *w;
 	unsigned short subsystem_vendor;
 	unsigned short subsystem_device;
 

-------------------------------------------------------------------------
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

Applied
#1 lore raw

At Tue, 3 Oct 2006 14:21:50 +0200,

Quoted 11 lines · Andreas Mohr

Hi,

add __devinitdata to struct whitelist, since it's used within a __devinit function.
Add const attribute to iterator variable, too.

Compile-tested (no section warnings etc.) and run-tested on vt8233, 2.6.18-mm3 (hopefully applies well to current ALSA).

Merged to ALSA tree now.

Thanks,

Takashi

-------------------------------------------------------------------------
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