]> git.pld-linux.org Git - packages/kernel.git/blame - linux-sound-oss-devinit-oops.patch
- minor fix. it builds but linking needs fix.
[packages/kernel.git] / linux-sound-oss-devinit-oops.patch
CommitLineData
f0ed2000
JB
1Fix for oops on rmmod caused by *_remove() function marked as __devinit
2(and thus discarded after module initialization - if CONFIG_MODULES=y
3and CONFIG_HOTPLUG is not set).
4This patch changes __devinit to __devexit and adds __devexit_p() where
5pointer to such function is used.
6
7The only exception is au1000, where au1000_remove() is called from
8cleanup_au1000() function - __devinit is jest removed there.
9
10 -- Jakub Bogusz <qboosh@pld-linux.org>
11
12--- linux-2.6.0-test11/sound/oss/cs4281/cs4281m.c.orig 2003-11-26 21:45:53.000000000 +0100
13+++ linux-2.6.0-test11/sound/oss/cs4281/cs4281m.c 2003-12-05 23:39:46.823135264 +0100
14@@ -4435,7 +4435,7 @@
15
16 // ---------------------------------------------------------------------
17
18-static void __devinit cs4281_remove(struct pci_dev *pci_dev)
19+static void __devexit cs4281_remove(struct pci_dev *pci_dev)
20 {
21 struct cs4281_state *s = pci_get_drvdata(pci_dev);
22 // stop DMA controller
23@@ -4469,7 +4469,7 @@
24 .name = "cs4281",
25 .id_table = cs4281_pci_tbl,
26 .probe = cs4281_probe,
27- .remove = cs4281_remove,
28+ .remove = __devexit_p(cs4281_remove),
29 .suspend = CS4281_SUSPEND_TBL,
30 .resume = CS4281_RESUME_TBL,
31 };
32--- linux-2.6.0-test11/sound/oss/cs46xx.c.orig 2003-11-26 21:42:47.000000000 +0100
33+++ linux-2.6.0-test11/sound/oss/cs46xx.c 2003-12-05 23:29:58.702543184 +0100
34@@ -5603,7 +5603,7 @@
35
36 // ---------------------------------------------------------------------
37
38-static void __devinit cs46xx_remove(struct pci_dev *pci_dev)
39+static void __devexit cs46xx_remove(struct pci_dev *pci_dev)
40 {
41 struct cs_card *card = PCI_GET_DRIVER_DATA(pci_dev);
42 int i;
43@@ -5730,7 +5730,7 @@
44 .name = "cs46xx",
45 .id_table = cs46xx_pci_tbl,
46 .probe = cs46xx_probe,
47- .remove = cs46xx_remove,
48+ .remove = __devexit_p(cs46xx_remove),
49 .suspend = CS46XX_SUSPEND_TBL,
50 .resume = CS46XX_RESUME_TBL,
51 };
52--- linux-2.6.0-test11/sound/oss/esssolo1.c.orig 2003-11-26 21:43:06.000000000 +0100
53+++ linux-2.6.0-test11/sound/oss/esssolo1.c 2003-12-05 23:30:40.015262696 +0100
54@@ -2407,7 +2407,7 @@
55 return ret;
56 }
57
58-static void __devinit solo1_remove(struct pci_dev *dev)
59+static void __devexit solo1_remove(struct pci_dev *dev)
60 {
61 struct solo1_state *s = pci_get_drvdata(dev);
62
63@@ -2447,7 +2447,7 @@
64 .name = "ESS Solo1",
65 .id_table = id_table,
66 .probe = solo1_probe,
67- .remove = solo1_remove,
68+ .remove = __devexit_p(solo1_remove),
69 .suspend = solo1_suspend,
70 .resume = solo1_resume,
71 };
72--- linux-2.6.0-test11/sound/oss/ite8172.c.orig 2003-11-26 21:43:24.000000000 +0100
73+++ linux-2.6.0-test11/sound/oss/ite8172.c 2003-12-05 23:31:34.154032352 +0100
74@@ -2165,7 +2165,7 @@
75 return -1;
76 }
77
78-static void __devinit it8172_remove(struct pci_dev *dev)
79+static void __devexit it8172_remove(struct pci_dev *dev)
80 {
81 struct it8172_state *s = pci_get_drvdata(dev);
82
83@@ -2200,7 +2200,7 @@
84 .name = IT8172_MODULE_NAME,
85 .id_table = id_table,
86 .probe = it8172_probe,
87- .remove = it8172_remove
88+ .remove = __devexit_p(it8172_remove)
89 };
90
91 static int __init init_it8172(void)
92--- linux-2.6.0-test11/sound/oss/rme96xx.c.orig 2003-11-26 21:43:36.000000000 +0100
93+++ linux-2.6.0-test11/sound/oss/rme96xx.c 2003-12-05 23:32:24.956309232 +0100
94@@ -1033,7 +1033,7 @@
95 }
96
97
98-static void __devinit rme96xx_remove(struct pci_dev *dev)
99+static void __devexit rme96xx_remove(struct pci_dev *dev)
100 {
101 int i;
102 rme96xx_info *s = pci_get_drvdata(dev);
103@@ -1087,7 +1087,7 @@
104 .name = "rme96xx",
105 .id_table = id_table,
106 .probe = rme96xx_probe,
107- .remove = rme96xx_remove,
108+ .remove = __devexit_p(rme96xx_remove),
109 };
110
111 static int __init init_rme96xx(void)
112--- linux-2.6.0-test11/sound/oss/au1000.c.orig 2003-11-26 21:44:41.000000000 +0100
113+++ linux-2.6.0-test11/sound/oss/au1000.c 2003-12-05 23:35:42.252315680 +0100
114@@ -2177,7 +2177,7 @@
115 return -1;
116 }
117
118-static void __devinit au1000_remove(void)
119+static void au1000_remove(void)
120 {
121 struct au1000_state *s = &au1000_state;
122
123--- linux-2.6.0-test11/sound/oss/sonicvibes.c.orig 2003-11-26 21:43:51.000000000 +0100
124+++ linux-2.6.0-test11/sound/oss/sonicvibes.c 2003-12-05 23:32:51.911211464 +0100
125@@ -2678,7 +2678,7 @@
126 return ret;
127 }
128
129-static void __devinit sv_remove(struct pci_dev *dev)
130+static void __devexit sv_remove(struct pci_dev *dev)
131 {
132 struct sv_state *s = pci_get_drvdata(dev);
133
134@@ -2720,7 +2720,7 @@
135 .name = "sonicvibes",
136 .id_table = id_table,
137 .probe = sv_probe,
138- .remove = sv_remove,
139+ .remove = __devexit_p(sv_remove),
140 };
141
142 static int __init init_sonicvibes(void)
143--- linux-2.6.0-test11/sound/oss/nec_vrc5477.c.orig 2003-11-26 21:44:59.000000000 +0100
144+++ linux-2.6.0-test11/sound/oss/nec_vrc5477.c 2003-12-05 23:36:07.803431320 +0100
145@@ -1964,7 +1964,7 @@
146 return -1;
147 }
148
149-static void __devinit vrc5477_ac97_remove(struct pci_dev *dev)
150+static void __devexit vrc5477_ac97_remove(struct pci_dev *dev)
151 {
152 struct vrc5477_ac97_state *s = pci_get_drvdata(dev);
153
154@@ -2000,7 +2000,7 @@
155 .name = VRC5477_AC97_MODULE_NAME,
156 .id_table = id_table,
157 .probe = vrc5477_ac97_probe,
158- .remove = vrc5477_ac97_remove,
159+ .remove = __devexit_p(vrc5477_ac97_remove),
160 };
161
162 static int __init init_vrc5477_ac97(void)
163--- linux-2.6.0-test11/sound/oss/es1371.c.orig 2003-11-26 21:44:59.000000000 +0100
164+++ linux-2.6.0-test11/sound/oss/es1371.c 2003-12-05 23:36:28.527280816 +0100
165@@ -3001,7 +3001,7 @@
166 return res;
167 }
168
169-static void __devinit es1371_remove(struct pci_dev *dev)
170+static void __devexit es1371_remove(struct pci_dev *dev)
171 {
172 struct es1371_state *s = pci_get_drvdata(dev);
173
174@@ -3043,7 +3043,7 @@
175 .name = "es1371",
176 .id_table = id_table,
177 .probe = es1371_probe,
178- .remove = es1371_remove,
179+ .remove = __devexit_p(es1371_remove),
180 };
181
182 static int __init init_es1371(void)
183--- linux-2.6.0-test11/sound/oss/es1370.c.orig 2003-11-26 21:46:01.000000000 +0100
184+++ linux-2.6.0-test11/sound/oss/es1370.c 2003-12-05 23:36:47.907334600 +0100
185@@ -2700,7 +2700,7 @@
186 return ret;
187 }
188
189-static void __devinit es1370_remove(struct pci_dev *dev)
190+static void __devexit es1370_remove(struct pci_dev *dev)
191 {
192 struct es1370_state *s = pci_get_drvdata(dev);
193
194@@ -2736,7 +2736,7 @@
195 .name = "es1370",
196 .id_table = id_table,
197 .probe = es1370_probe,
198- .remove = es1370_remove,
199+ .remove = __devexit_p(es1370_remove),
200 };
201
202 static int __init init_es1370(void)
This page took 0.598645 seconds and 4 git commands to generate.