]>
Commit | Line | Data |
---|---|---|
b5a39c4d JR |
1 | exporting a symbol declared as __init is bogus. additonally, suni |
2 | doesnt need to modify its ref counts, to quote: | |
3 | ||
4 | Q: My code use "MOD_INC_USE_COUNT". Do I still need to adjust my | |
5 | module count when someone calls one of my functions? | |
6 | A: 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 | ||
11 | this is certainly the case for suni which is used by the various | |
12 | atm drivers. | |
13 | ||
14 | Index: linux/drivers/atm/suni.c | |
15 | =================================================================== | |
16 | RCS file: /home/chas/CVSROOT/linux/drivers/atm/suni.c,v | |
17 | retrieving revision 1.1 | |
18 | retrieving revision 1.3 | |
19 | diff -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 | - | |
49 | To unsubscribe from this list: send the line "unsubscribe linux-kernel" in | |
50 | the body of a message to majordomo@vger.kernel.org | |
51 | More majordomo info at http://vger.kernel.org/majordomo-info.html | |
52 | Please read the FAQ at http://www.tux.org/lkml/ |