From f40b68903ccd511ea9d658b4bce319dd032a265a Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Wed, 5 Jul 2006 16:51:05 +0200 Subject: [ALSA] Fix section mismatch errors in ALSA PCI drivers Fixed 'section mismatch' errors in ALSA PCI drivers: - removed invalid __devinitdata from pci id tables - fix/remove __devinit of functions called in suspend/resume Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela --- sound/pci/au88x0/au8810.c | 2 +- sound/pci/au88x0/au8820.c | 2 +- sound/pci/au88x0/au8830.c | 2 +- sound/pci/au88x0/au88x0.h | 3 ++- sound/pci/au88x0/au88x0_a3d.c | 29 ++++++++++++++--------------- sound/pci/au88x0/au88x0_core.c | 4 ++-- 6 files changed, 21 insertions(+), 21 deletions(-) (limited to 'sound/pci/au88x0') diff --git a/sound/pci/au88x0/au8810.c b/sound/pci/au88x0/au8810.c index bd33529..fce22c7 100644 --- a/sound/pci/au88x0/au8810.c +++ b/sound/pci/au88x0/au8810.c @@ -1,6 +1,6 @@ #include "au8810.h" #include "au88x0.h" -static struct pci_device_id snd_vortex_ids[] __devinitdata = { +static struct pci_device_id snd_vortex_ids[] = { {PCI_VENDOR_ID_AUREAL, PCI_DEVICE_ID_AUREAL_ADVANTAGE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1,}, {0,} diff --git a/sound/pci/au88x0/au8820.c b/sound/pci/au88x0/au8820.c index 7e3fd83..d1fbcce 100644 --- a/sound/pci/au88x0/au8820.c +++ b/sound/pci/au88x0/au8820.c @@ -1,6 +1,6 @@ #include "au8820.h" #include "au88x0.h" -static struct pci_device_id snd_vortex_ids[] __devinitdata = { +static struct pci_device_id snd_vortex_ids[] = { {PCI_VENDOR_ID_AUREAL, PCI_DEVICE_ID_AUREAL_VORTEX_1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0,}, {0,} diff --git a/sound/pci/au88x0/au8830.c b/sound/pci/au88x0/au8830.c index b840f66..d4f2717 100644 --- a/sound/pci/au88x0/au8830.c +++ b/sound/pci/au88x0/au8830.c @@ -1,6 +1,6 @@ #include "au8830.h" #include "au88x0.h" -static struct pci_device_id snd_vortex_ids[] __devinitdata = { +static struct pci_device_id snd_vortex_ids[] = { {PCI_VENDOR_ID_AUREAL, PCI_DEVICE_ID_AUREAL_VORTEX_2, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0,}, {0,} diff --git a/sound/pci/au88x0/au88x0.h b/sound/pci/au88x0/au88x0.h index f078b71..b1cfc3c 100644 --- a/sound/pci/au88x0/au88x0.h +++ b/sound/pci/au88x0/au88x0.h @@ -270,7 +270,8 @@ static void vortex_mix_setvolumebyte(vortex_t * vortex, unsigned char mix, /* A3D functions. */ #ifndef CHIP_AU8820 -static void vortex_Vort3D(vortex_t * v, int en); +static void vortex_Vort3D_enable(vortex_t * v); +static void vortex_Vort3D_disable(vortex_t * v); static void vortex_Vort3D_connect(vortex_t * vortex, int en); static void vortex_Vort3D_InitializeSource(a3dsrc_t * a, int en); #endif diff --git a/sound/pci/au88x0/au88x0_a3d.c b/sound/pci/au88x0/au88x0_a3d.c index d215f39..649849e 100644 --- a/sound/pci/au88x0/au88x0_a3d.c +++ b/sound/pci/au88x0/au88x0_a3d.c @@ -593,24 +593,23 @@ static int Vort3DRend_Initialize(vortex_t * v, unsigned short mode) static int vortex_a3d_register_controls(vortex_t * vortex); static void vortex_a3d_unregister_controls(vortex_t * vortex); /* A3D base support init/shudown */ -static void vortex_Vort3D(vortex_t * v, int en) +static void __devinit vortex_Vort3D_enable(vortex_t * v) { int i; - if (en) { - Vort3DRend_Initialize(v, XT_HEADPHONE); - for (i = 0; i < NR_A3D; i++) { - vortex_A3dSourceHw_Initialize(v, i % 4, i >> 2); - a3dsrc_ZeroStateA3D(&(v->a3d[0])); - } - } else { - vortex_XtalkHw_Disable(v); + + Vort3DRend_Initialize(v, XT_HEADPHONE); + for (i = 0; i < NR_A3D; i++) { + vortex_A3dSourceHw_Initialize(v, i % 4, i >> 2); + a3dsrc_ZeroStateA3D(&(v->a3d[0])); } /* Register ALSA controls */ - if (en) { - vortex_a3d_register_controls(v); - } else { - vortex_a3d_unregister_controls(v); - } + vortex_a3d_register_controls(v); +} + +static void vortex_Vort3D_disable(vortex_t * v) +{ + vortex_XtalkHw_Disable(v); + vortex_a3d_unregister_controls(v); } /* Make A3D subsystem connections. */ @@ -855,7 +854,7 @@ static struct snd_kcontrol_new vortex_a3d_kcontrol __devinitdata = { }; /* Control (un)registration. */ -static int vortex_a3d_register_controls(vortex_t * vortex) +static int __devinit vortex_a3d_register_controls(vortex_t * vortex) { struct snd_kcontrol *kcontrol; int err, i; diff --git a/sound/pci/au88x0/au88x0_core.c b/sound/pci/au88x0/au88x0_core.c index 4347e6a..5299cce 100644 --- a/sound/pci/au88x0/au88x0_core.c +++ b/sound/pci/au88x0/au88x0_core.c @@ -2690,7 +2690,7 @@ static int __devinit vortex_core_init(vortex_t * vortex) #ifndef CHIP_AU8820 vortex_eq_init(vortex); vortex_spdif_init(vortex, 48000, 1); - vortex_Vort3D(vortex, 1); + vortex_Vort3D_enable(vortex); #endif #ifndef CHIP_AU8810 vortex_wt_init(vortex); @@ -2718,7 +2718,7 @@ static int vortex_core_shutdown(vortex_t * vortex) printk(KERN_INFO "Vortex: shutdown..."); #ifndef CHIP_AU8820 vortex_eq_free(vortex); - vortex_Vort3D(vortex, 0); + vortex_Vort3D_disable(vortex); #endif //vortex_disable_timer_int(vortex); vortex_disable_int(vortex); -- cgit v1.1