aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDominik Brodowski <linux@dominikbrodowski.net>2010-08-08 06:27:40 -0400
committerDominik Brodowski <linux@dominikbrodowski.net>2010-09-29 11:20:25 -0400
commit06b3a1d12f41b592972643f8b84015d6c03dc576 (patch)
tree9c2e9450a74f3cea78d8819bfcd305f3f6c40b0d /drivers
parent2e9b981a7c63ee8278df6823f8389d69dad1a499 (diff)
pcmcia: avoid messages on module (un)loading
printk() statements on module load or unload are frowned upon. Also, add a few __init or __exit declarations. Tested-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/char/pcmcia/cm4000_cs.c5
-rw-r--r--drivers/char/pcmcia/cm4040_cs.c5
-rw-r--r--drivers/char/pcmcia/ipwireless/main.c6
-rw-r--r--drivers/char/pcmcia/synclink_cs.c4
-rw-r--r--drivers/isdn/hisax/avma1_cs.c2
-rw-r--r--drivers/mtd/maps/pcmciamtd.c2
-rw-r--r--drivers/net/wireless/airo_cs.c4
-rw-r--r--drivers/net/wireless/atmel_cs.c4
-rw-r--r--drivers/net/wireless/orinoco/orinoco_cs.c8
-rw-r--r--drivers/net/wireless/orinoco/spectrum_cs.c8
-rw-r--r--drivers/scsi/pcmcia/aha152x_stub.c3
-rw-r--r--drivers/scsi/pcmcia/nsp_cs.c3
12 files changed, 5 insertions, 49 deletions
diff --git a/drivers/char/pcmcia/cm4000_cs.c b/drivers/char/pcmcia/cm4000_cs.c
index e932526d4561..c7b482d15e2a 100644
--- a/drivers/char/pcmcia/cm4000_cs.c
+++ b/drivers/char/pcmcia/cm4000_cs.c
@@ -54,8 +54,6 @@
54 __func__ , ## args); \ 54 __func__ , ## args); \
55 } while (0) 55 } while (0)
56 56
57static char *version = "cm4000_cs.c v2.4.0gm6 - All bugs added by Harald Welte";
58
59#define T_1SEC (HZ) 57#define T_1SEC (HZ)
60#define T_10MSEC msecs_to_jiffies(10) 58#define T_10MSEC msecs_to_jiffies(10)
61#define T_20MSEC msecs_to_jiffies(20) 59#define T_20MSEC msecs_to_jiffies(20)
@@ -1889,8 +1887,6 @@ static int __init cmm_init(void)
1889{ 1887{
1890 int rc; 1888 int rc;
1891 1889
1892 printk(KERN_INFO "%s\n", version);
1893
1894 cmm_class = class_create(THIS_MODULE, "cardman_4000"); 1890 cmm_class = class_create(THIS_MODULE, "cardman_4000");
1895 if (IS_ERR(cmm_class)) 1891 if (IS_ERR(cmm_class))
1896 return PTR_ERR(cmm_class); 1892 return PTR_ERR(cmm_class);
@@ -1915,7 +1911,6 @@ static int __init cmm_init(void)
1915 1911
1916static void __exit cmm_exit(void) 1912static void __exit cmm_exit(void)
1917{ 1913{
1918 printk(KERN_INFO MODULE_NAME ": unloading\n");
1919 pcmcia_unregister_driver(&cm4000_driver); 1914 pcmcia_unregister_driver(&cm4000_driver);
1920 unregister_chrdev(major, DEVICE_NAME); 1915 unregister_chrdev(major, DEVICE_NAME);
1921 class_destroy(cmm_class); 1916 class_destroy(cmm_class);
diff --git a/drivers/char/pcmcia/cm4040_cs.c b/drivers/char/pcmcia/cm4040_cs.c
index d7e2bec02485..bf2f046fc2c1 100644
--- a/drivers/char/pcmcia/cm4040_cs.c
+++ b/drivers/char/pcmcia/cm4040_cs.c
@@ -48,9 +48,6 @@
48 __func__ , ## args); \ 48 __func__ , ## args); \
49 } while (0) 49 } while (0)
50 50
51static char *version =
52"OMNIKEY CardMan 4040 v1.1.0gm5 - All bugs added by Harald Welte";
53
54#define CCID_DRIVER_BULK_DEFAULT_TIMEOUT (150*HZ) 51#define CCID_DRIVER_BULK_DEFAULT_TIMEOUT (150*HZ)
55#define CCID_DRIVER_ASYNC_POWERUP_TIMEOUT (35*HZ) 52#define CCID_DRIVER_ASYNC_POWERUP_TIMEOUT (35*HZ)
56#define CCID_DRIVER_MINIMUM_TIMEOUT (3*HZ) 53#define CCID_DRIVER_MINIMUM_TIMEOUT (3*HZ)
@@ -653,7 +650,6 @@ static int __init cm4040_init(void)
653{ 650{
654 int rc; 651 int rc;
655 652
656 printk(KERN_INFO "%s\n", version);
657 cmx_class = class_create(THIS_MODULE, "cardman_4040"); 653 cmx_class = class_create(THIS_MODULE, "cardman_4040");
658 if (IS_ERR(cmx_class)) 654 if (IS_ERR(cmx_class))
659 return PTR_ERR(cmx_class); 655 return PTR_ERR(cmx_class);
@@ -678,7 +674,6 @@ static int __init cm4040_init(void)
678 674
679static void __exit cm4040_exit(void) 675static void __exit cm4040_exit(void)
680{ 676{
681 printk(KERN_INFO MODULE_NAME ": unloading\n");
682 pcmcia_unregister_driver(&reader_driver); 677 pcmcia_unregister_driver(&reader_driver);
683 unregister_chrdev(major, DEVICE_NAME); 678 unregister_chrdev(major, DEVICE_NAME);
684 class_destroy(cmx_class); 679 class_destroy(cmx_class);
diff --git a/drivers/char/pcmcia/ipwireless/main.c b/drivers/char/pcmcia/ipwireless/main.c
index a1b808346691..94b8eb4d691d 100644
--- a/drivers/char/pcmcia/ipwireless/main.c
+++ b/drivers/char/pcmcia/ipwireless/main.c
@@ -307,9 +307,6 @@ static int __init init_ipwireless(void)
307{ 307{
308 int ret; 308 int ret;
309 309
310 printk(KERN_INFO IPWIRELESS_PCCARD_NAME " "
311 IPWIRELESS_PCMCIA_VERSION " by " IPWIRELESS_PCMCIA_AUTHOR "\n");
312
313 ret = ipwireless_tty_init(); 310 ret = ipwireless_tty_init();
314 if (ret != 0) 311 if (ret != 0)
315 return ret; 312 return ret;
@@ -326,9 +323,6 @@ static int __init init_ipwireless(void)
326 */ 323 */
327static void __exit exit_ipwireless(void) 324static void __exit exit_ipwireless(void)
328{ 325{
329 printk(KERN_INFO IPWIRELESS_PCCARD_NAME " "
330 IPWIRELESS_PCMCIA_VERSION " removed\n");
331
332 pcmcia_unregister_driver(&me); 326 pcmcia_unregister_driver(&me);
333 ipwireless_tty_release(); 327 ipwireless_tty_release();
334} 328}
diff --git a/drivers/char/pcmcia/synclink_cs.c b/drivers/char/pcmcia/synclink_cs.c
index 493dba51115b..d97a53cccdc5 100644
--- a/drivers/char/pcmcia/synclink_cs.c
+++ b/drivers/char/pcmcia/synclink_cs.c
@@ -2809,8 +2809,6 @@ static void synclink_cs_cleanup(void)
2809{ 2809{
2810 int rc; 2810 int rc;
2811 2811
2812 printk("Unloading %s: version %s\n", driver_name, driver_version);
2813
2814 while(mgslpc_device_list) 2812 while(mgslpc_device_list)
2815 mgslpc_remove_device(mgslpc_device_list); 2813 mgslpc_remove_device(mgslpc_device_list);
2816 2814
@@ -2833,8 +2831,6 @@ static int __init synclink_cs_init(void)
2833 BREAKPOINT(); 2831 BREAKPOINT();
2834 } 2832 }
2835 2833
2836 printk("%s %s\n", driver_name, driver_version);
2837
2838 if ((rc = pcmcia_register_driver(&mgslpc_driver)) < 0) 2834 if ((rc = pcmcia_register_driver(&mgslpc_driver)) < 0)
2839 return rc; 2835 return rc;
2840 2836
diff --git a/drivers/isdn/hisax/avma1_cs.c b/drivers/isdn/hisax/avma1_cs.c
index 314bc86bf92b..62616c871c78 100644
--- a/drivers/isdn/hisax/avma1_cs.c
+++ b/drivers/isdn/hisax/avma1_cs.c
@@ -220,7 +220,7 @@ static struct pcmcia_driver avma1cs_driver = {
220 220
221static int __init init_avma1_cs(void) 221static int __init init_avma1_cs(void)
222{ 222{
223 return(pcmcia_register_driver(&avma1cs_driver)); 223 return pcmcia_register_driver(&avma1cs_driver);
224} 224}
225 225
226static void __exit exit_avma1_cs(void) 226static void __exit exit_avma1_cs(void)
diff --git a/drivers/mtd/maps/pcmciamtd.c b/drivers/mtd/maps/pcmciamtd.c
index 214c695a2398..5df89e742a33 100644
--- a/drivers/mtd/maps/pcmciamtd.c
+++ b/drivers/mtd/maps/pcmciamtd.c
@@ -762,8 +762,6 @@ static struct pcmcia_driver pcmciamtd_driver = {
762 762
763static int __init init_pcmciamtd(void) 763static int __init init_pcmciamtd(void)
764{ 764{
765 info(DRIVER_DESC);
766
767 if(bankwidth && bankwidth != 1 && bankwidth != 2) { 765 if(bankwidth && bankwidth != 1 && bankwidth != 2) {
768 info("bad bankwidth (%d), using default", bankwidth); 766 info("bad bankwidth (%d), using default", bankwidth);
769 bankwidth = 2; 767 bankwidth = 2;
diff --git a/drivers/net/wireless/airo_cs.c b/drivers/net/wireless/airo_cs.c
index 0fc8f639c1d4..b084278f36b7 100644
--- a/drivers/net/wireless/airo_cs.c
+++ b/drivers/net/wireless/airo_cs.c
@@ -254,12 +254,12 @@ static struct pcmcia_driver airo_driver = {
254 .resume = airo_resume, 254 .resume = airo_resume,
255}; 255};
256 256
257static int airo_cs_init(void) 257static int __init airo_cs_init(void)
258{ 258{
259 return pcmcia_register_driver(&airo_driver); 259 return pcmcia_register_driver(&airo_driver);
260} 260}
261 261
262static void airo_cs_cleanup(void) 262static void __exit airo_cs_cleanup(void)
263{ 263{
264 pcmcia_unregister_driver(&airo_driver); 264 pcmcia_unregister_driver(&airo_driver);
265} 265}
diff --git a/drivers/net/wireless/atmel_cs.c b/drivers/net/wireless/atmel_cs.c
index 13c0c3b02690..fabe91a8db2b 100644
--- a/drivers/net/wireless/atmel_cs.c
+++ b/drivers/net/wireless/atmel_cs.c
@@ -317,12 +317,12 @@ static struct pcmcia_driver atmel_driver = {
317 .resume = atmel_resume, 317 .resume = atmel_resume,
318}; 318};
319 319
320static int atmel_cs_init(void) 320static int __init atmel_cs_init(void)
321{ 321{
322 return pcmcia_register_driver(&atmel_driver); 322 return pcmcia_register_driver(&atmel_driver);
323} 323}
324 324
325static void atmel_cs_cleanup(void) 325static void __exit atmel_cs_cleanup(void)
326{ 326{
327 pcmcia_unregister_driver(&atmel_driver); 327 pcmcia_unregister_driver(&atmel_driver);
328} 328}
diff --git a/drivers/net/wireless/orinoco/orinoco_cs.c b/drivers/net/wireless/orinoco/orinoco_cs.c
index 28212661f34a..2b1f554af0b2 100644
--- a/drivers/net/wireless/orinoco/orinoco_cs.c
+++ b/drivers/net/wireless/orinoco/orinoco_cs.c
@@ -281,12 +281,6 @@ static int orinoco_cs_resume(struct pcmcia_device *link)
281/* Module initialization */ 281/* Module initialization */
282/********************************************************************/ 282/********************************************************************/
283 283
284/* Can't be declared "const" or the whole __initdata section will
285 * become const */
286static char version[] __initdata = DRIVER_NAME " " DRIVER_VERSION
287 " (David Gibson <hermes@gibson.dropbear.id.au>, "
288 "Pavel Roskin <proski@gnu.org>, et al)";
289
290static struct pcmcia_device_id orinoco_cs_ids[] = { 284static struct pcmcia_device_id orinoco_cs_ids[] = {
291 PCMCIA_DEVICE_MANF_CARD(0x0101, 0x0777), /* 3Com AirConnect PCI 777A */ 285 PCMCIA_DEVICE_MANF_CARD(0x0101, 0x0777), /* 3Com AirConnect PCI 777A */
292 PCMCIA_DEVICE_MANF_CARD(0x0156, 0x0002), /* Lucent Orinoco and old Intersil */ 286 PCMCIA_DEVICE_MANF_CARD(0x0156, 0x0002), /* Lucent Orinoco and old Intersil */
@@ -389,8 +383,6 @@ static struct pcmcia_driver orinoco_driver = {
389static int __init 383static int __init
390init_orinoco_cs(void) 384init_orinoco_cs(void)
391{ 385{
392 printk(KERN_DEBUG "%s\n", version);
393
394 return pcmcia_register_driver(&orinoco_driver); 386 return pcmcia_register_driver(&orinoco_driver);
395} 387}
396 388
diff --git a/drivers/net/wireless/orinoco/spectrum_cs.c b/drivers/net/wireless/orinoco/spectrum_cs.c
index 5906e9af9064..1314cf204f12 100644
--- a/drivers/net/wireless/orinoco/spectrum_cs.c
+++ b/drivers/net/wireless/orinoco/spectrum_cs.c
@@ -345,12 +345,6 @@ spectrum_cs_resume(struct pcmcia_device *link)
345/* Module initialization */ 345/* Module initialization */
346/********************************************************************/ 346/********************************************************************/
347 347
348/* Can't be declared "const" or the whole __initdata section will
349 * become const */
350static char version[] __initdata = DRIVER_NAME " " DRIVER_VERSION
351 " (Pavel Roskin <proski@gnu.org>,"
352 " David Gibson <hermes@gibson.dropbear.id.au>, et al)";
353
354static struct pcmcia_device_id spectrum_cs_ids[] = { 348static struct pcmcia_device_id spectrum_cs_ids[] = {
355 PCMCIA_DEVICE_MANF_CARD(0x026c, 0x0001), /* Symbol Spectrum24 LA4137 */ 349 PCMCIA_DEVICE_MANF_CARD(0x026c, 0x0001), /* Symbol Spectrum24 LA4137 */
356 PCMCIA_DEVICE_MANF_CARD(0x0104, 0x0001), /* Socket Communications CF */ 350 PCMCIA_DEVICE_MANF_CARD(0x0104, 0x0001), /* Socket Communications CF */
@@ -372,8 +366,6 @@ static struct pcmcia_driver orinoco_driver = {
372static int __init 366static int __init
373init_spectrum_cs(void) 367init_spectrum_cs(void)
374{ 368{
375 printk(KERN_DEBUG "%s\n", version);
376
377 return pcmcia_register_driver(&orinoco_driver); 369 return pcmcia_register_driver(&orinoco_driver);
378} 370}
379 371
diff --git a/drivers/scsi/pcmcia/aha152x_stub.c b/drivers/scsi/pcmcia/aha152x_stub.c
index 49cbea33c141..e77dd02eccdd 100644
--- a/drivers/scsi/pcmcia/aha152x_stub.c
+++ b/drivers/scsi/pcmcia/aha152x_stub.c
@@ -85,8 +85,6 @@ static void aha152x_release_cs(struct pcmcia_device *link);
85static void aha152x_detach(struct pcmcia_device *p_dev); 85static void aha152x_detach(struct pcmcia_device *p_dev);
86static int aha152x_config_cs(struct pcmcia_device *link); 86static int aha152x_config_cs(struct pcmcia_device *link);
87 87
88static struct pcmcia_device *dev_list;
89
90static int aha152x_probe(struct pcmcia_device *link) 88static int aha152x_probe(struct pcmcia_device *link)
91{ 89{
92 scsi_info_t *info; 90 scsi_info_t *info;
@@ -231,7 +229,6 @@ static int __init init_aha152x_cs(void)
231static void __exit exit_aha152x_cs(void) 229static void __exit exit_aha152x_cs(void)
232{ 230{
233 pcmcia_unregister_driver(&aha152x_cs_driver); 231 pcmcia_unregister_driver(&aha152x_cs_driver);
234 BUG_ON(dev_list != NULL);
235} 232}
236 233
237module_init(init_aha152x_cs); 234module_init(init_aha152x_cs);
diff --git a/drivers/scsi/pcmcia/nsp_cs.c b/drivers/scsi/pcmcia/nsp_cs.c
index 0f604d613656..07b73ca2a7e0 100644
--- a/drivers/scsi/pcmcia/nsp_cs.c
+++ b/drivers/scsi/pcmcia/nsp_cs.c
@@ -1800,14 +1800,11 @@ static struct pcmcia_driver nsp_driver = {
1800 1800
1801static int __init nsp_cs_init(void) 1801static int __init nsp_cs_init(void)
1802{ 1802{
1803 nsp_msg(KERN_INFO, "loading...");
1804
1805 return pcmcia_register_driver(&nsp_driver); 1803 return pcmcia_register_driver(&nsp_driver);
1806} 1804}
1807 1805
1808static void __exit nsp_cs_exit(void) 1806static void __exit nsp_cs_exit(void)
1809{ 1807{
1810 nsp_msg(KERN_INFO, "unloading...");
1811 pcmcia_unregister_driver(&nsp_driver); 1808 pcmcia_unregister_driver(&nsp_driver);
1812} 1809}
1813 1810