]> git.pld-linux.org Git - packages/kernel.git/blame - atm-09-suni-MOD_USE_COUNT.patch
- obsolete
[packages/kernel.git] / atm-09-suni-MOD_USE_COUNT.patch
CommitLineData
b5a39c4d
JR
1exporting a symbol declared as __init is bogus. additonally, suni
2doesnt need to modify its ref counts, to quote:
3
4Q: My code use "MOD_INC_USE_COUNT". Do I still need to adjust my
5 module count when someone calls one of my functions?
6A: No ...
7 ... It could be another module using one of your
8 EXPORT_SYMBOL'ed functions, in which case you cannot be removed
9 since they would have to be removed first. ...
10
11this is certainly the case for suni which is used by the various
12atm drivers.
13
14Index: linux/drivers/atm/suni.c
15===================================================================
16RCS file: /home/chas/CVSROOT/linux/drivers/atm/suni.c,v
17retrieving revision 1.1
18retrieving revision 1.3
19diff -u -r1.1 -r1.3
20--- linux/drivers/atm/suni.c 20 Feb 2003 13:45:03 -0000 1.1
21+++ linux/drivers/atm/suni.c 26 Feb 2003 15:43:30 -0000 1.3
22@@ -233,8 +233,6 @@
23 if (!(PRIV(dev) = kmalloc(sizeof(struct suni_priv),GFP_KERNEL)))
24 return -ENOMEM;
25
26- MOD_INC_USE_COUNT;
27-
28 PRIV(dev)->dev = dev;
29 spin_lock_irqsave(&sunis_lock,flags);
30 first = !sunis;
31@@ -280,7 +278,6 @@
32 spin_unlock_irqrestore(&sunis_lock,flags);
33 kfree(PRIV(dev));
34
35- MOD_DEC_USE_COUNT;
36 return 0;
37 }
38
39@@ -293,7 +290,7 @@
40 };
41
42
43-int __init suni_init(struct atm_dev *dev)
44+int suni_init(struct atm_dev *dev)
45 {
46 unsigned char mri;
47
48-
49To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
50the body of a message to majordomo@vger.kernel.org
51More majordomo info at http://vger.kernel.org/majordomo-info.html
52Please read the FAQ at http://www.tux.org/lkml/
This page took 0.121405 seconds and 4 git commands to generate.