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>
This commit is contained in:
parent
2e9b981a7c
commit
06b3a1d12f
12 changed files with 5 additions and 49 deletions
|
@ -54,8 +54,6 @@
|
|||
__func__ , ## args); \
|
||||
} while (0)
|
||||
|
||||
static char *version = "cm4000_cs.c v2.4.0gm6 - All bugs added by Harald Welte";
|
||||
|
||||
#define T_1SEC (HZ)
|
||||
#define T_10MSEC msecs_to_jiffies(10)
|
||||
#define T_20MSEC msecs_to_jiffies(20)
|
||||
|
@ -1889,8 +1887,6 @@ static int __init cmm_init(void)
|
|||
{
|
||||
int rc;
|
||||
|
||||
printk(KERN_INFO "%s\n", version);
|
||||
|
||||
cmm_class = class_create(THIS_MODULE, "cardman_4000");
|
||||
if (IS_ERR(cmm_class))
|
||||
return PTR_ERR(cmm_class);
|
||||
|
@ -1915,7 +1911,6 @@ static int __init cmm_init(void)
|
|||
|
||||
static void __exit cmm_exit(void)
|
||||
{
|
||||
printk(KERN_INFO MODULE_NAME ": unloading\n");
|
||||
pcmcia_unregister_driver(&cm4000_driver);
|
||||
unregister_chrdev(major, DEVICE_NAME);
|
||||
class_destroy(cmm_class);
|
||||
|
|
|
@ -48,9 +48,6 @@
|
|||
__func__ , ## args); \
|
||||
} while (0)
|
||||
|
||||
static char *version =
|
||||
"OMNIKEY CardMan 4040 v1.1.0gm5 - All bugs added by Harald Welte";
|
||||
|
||||
#define CCID_DRIVER_BULK_DEFAULT_TIMEOUT (150*HZ)
|
||||
#define CCID_DRIVER_ASYNC_POWERUP_TIMEOUT (35*HZ)
|
||||
#define CCID_DRIVER_MINIMUM_TIMEOUT (3*HZ)
|
||||
|
@ -653,7 +650,6 @@ static int __init cm4040_init(void)
|
|||
{
|
||||
int rc;
|
||||
|
||||
printk(KERN_INFO "%s\n", version);
|
||||
cmx_class = class_create(THIS_MODULE, "cardman_4040");
|
||||
if (IS_ERR(cmx_class))
|
||||
return PTR_ERR(cmx_class);
|
||||
|
@ -678,7 +674,6 @@ static int __init cm4040_init(void)
|
|||
|
||||
static void __exit cm4040_exit(void)
|
||||
{
|
||||
printk(KERN_INFO MODULE_NAME ": unloading\n");
|
||||
pcmcia_unregister_driver(&reader_driver);
|
||||
unregister_chrdev(major, DEVICE_NAME);
|
||||
class_destroy(cmx_class);
|
||||
|
|
|
@ -307,9 +307,6 @@ static int __init init_ipwireless(void)
|
|||
{
|
||||
int ret;
|
||||
|
||||
printk(KERN_INFO IPWIRELESS_PCCARD_NAME " "
|
||||
IPWIRELESS_PCMCIA_VERSION " by " IPWIRELESS_PCMCIA_AUTHOR "\n");
|
||||
|
||||
ret = ipwireless_tty_init();
|
||||
if (ret != 0)
|
||||
return ret;
|
||||
|
@ -326,9 +323,6 @@ static int __init init_ipwireless(void)
|
|||
*/
|
||||
static void __exit exit_ipwireless(void)
|
||||
{
|
||||
printk(KERN_INFO IPWIRELESS_PCCARD_NAME " "
|
||||
IPWIRELESS_PCMCIA_VERSION " removed\n");
|
||||
|
||||
pcmcia_unregister_driver(&me);
|
||||
ipwireless_tty_release();
|
||||
}
|
||||
|
|
|
@ -2809,8 +2809,6 @@ static void synclink_cs_cleanup(void)
|
|||
{
|
||||
int rc;
|
||||
|
||||
printk("Unloading %s: version %s\n", driver_name, driver_version);
|
||||
|
||||
while(mgslpc_device_list)
|
||||
mgslpc_remove_device(mgslpc_device_list);
|
||||
|
||||
|
@ -2833,8 +2831,6 @@ static int __init synclink_cs_init(void)
|
|||
BREAKPOINT();
|
||||
}
|
||||
|
||||
printk("%s %s\n", driver_name, driver_version);
|
||||
|
||||
if ((rc = pcmcia_register_driver(&mgslpc_driver)) < 0)
|
||||
return rc;
|
||||
|
||||
|
|
|
@ -220,7 +220,7 @@ static struct pcmcia_driver avma1cs_driver = {
|
|||
|
||||
static int __init init_avma1_cs(void)
|
||||
{
|
||||
return(pcmcia_register_driver(&avma1cs_driver));
|
||||
return pcmcia_register_driver(&avma1cs_driver);
|
||||
}
|
||||
|
||||
static void __exit exit_avma1_cs(void)
|
||||
|
|
|
@ -762,8 +762,6 @@ static struct pcmcia_driver pcmciamtd_driver = {
|
|||
|
||||
static int __init init_pcmciamtd(void)
|
||||
{
|
||||
info(DRIVER_DESC);
|
||||
|
||||
if(bankwidth && bankwidth != 1 && bankwidth != 2) {
|
||||
info("bad bankwidth (%d), using default", bankwidth);
|
||||
bankwidth = 2;
|
||||
|
|
|
@ -254,12 +254,12 @@ static struct pcmcia_driver airo_driver = {
|
|||
.resume = airo_resume,
|
||||
};
|
||||
|
||||
static int airo_cs_init(void)
|
||||
static int __init airo_cs_init(void)
|
||||
{
|
||||
return pcmcia_register_driver(&airo_driver);
|
||||
}
|
||||
|
||||
static void airo_cs_cleanup(void)
|
||||
static void __exit airo_cs_cleanup(void)
|
||||
{
|
||||
pcmcia_unregister_driver(&airo_driver);
|
||||
}
|
||||
|
|
|
@ -317,12 +317,12 @@ static struct pcmcia_driver atmel_driver = {
|
|||
.resume = atmel_resume,
|
||||
};
|
||||
|
||||
static int atmel_cs_init(void)
|
||||
static int __init atmel_cs_init(void)
|
||||
{
|
||||
return pcmcia_register_driver(&atmel_driver);
|
||||
}
|
||||
|
||||
static void atmel_cs_cleanup(void)
|
||||
static void __exit atmel_cs_cleanup(void)
|
||||
{
|
||||
pcmcia_unregister_driver(&atmel_driver);
|
||||
}
|
||||
|
|
|
@ -281,12 +281,6 @@ static int orinoco_cs_resume(struct pcmcia_device *link)
|
|||
/* Module initialization */
|
||||
/********************************************************************/
|
||||
|
||||
/* Can't be declared "const" or the whole __initdata section will
|
||||
* become const */
|
||||
static char version[] __initdata = DRIVER_NAME " " DRIVER_VERSION
|
||||
" (David Gibson <hermes@gibson.dropbear.id.au>, "
|
||||
"Pavel Roskin <proski@gnu.org>, et al)";
|
||||
|
||||
static struct pcmcia_device_id orinoco_cs_ids[] = {
|
||||
PCMCIA_DEVICE_MANF_CARD(0x0101, 0x0777), /* 3Com AirConnect PCI 777A */
|
||||
PCMCIA_DEVICE_MANF_CARD(0x0156, 0x0002), /* Lucent Orinoco and old Intersil */
|
||||
|
@ -389,8 +383,6 @@ static struct pcmcia_driver orinoco_driver = {
|
|||
static int __init
|
||||
init_orinoco_cs(void)
|
||||
{
|
||||
printk(KERN_DEBUG "%s\n", version);
|
||||
|
||||
return pcmcia_register_driver(&orinoco_driver);
|
||||
}
|
||||
|
||||
|
|
|
@ -345,12 +345,6 @@ spectrum_cs_resume(struct pcmcia_device *link)
|
|||
/* Module initialization */
|
||||
/********************************************************************/
|
||||
|
||||
/* Can't be declared "const" or the whole __initdata section will
|
||||
* become const */
|
||||
static char version[] __initdata = DRIVER_NAME " " DRIVER_VERSION
|
||||
" (Pavel Roskin <proski@gnu.org>,"
|
||||
" David Gibson <hermes@gibson.dropbear.id.au>, et al)";
|
||||
|
||||
static struct pcmcia_device_id spectrum_cs_ids[] = {
|
||||
PCMCIA_DEVICE_MANF_CARD(0x026c, 0x0001), /* Symbol Spectrum24 LA4137 */
|
||||
PCMCIA_DEVICE_MANF_CARD(0x0104, 0x0001), /* Socket Communications CF */
|
||||
|
@ -372,8 +366,6 @@ static struct pcmcia_driver orinoco_driver = {
|
|||
static int __init
|
||||
init_spectrum_cs(void)
|
||||
{
|
||||
printk(KERN_DEBUG "%s\n", version);
|
||||
|
||||
return pcmcia_register_driver(&orinoco_driver);
|
||||
}
|
||||
|
||||
|
|
|
@ -85,8 +85,6 @@ static void aha152x_release_cs(struct pcmcia_device *link);
|
|||
static void aha152x_detach(struct pcmcia_device *p_dev);
|
||||
static int aha152x_config_cs(struct pcmcia_device *link);
|
||||
|
||||
static struct pcmcia_device *dev_list;
|
||||
|
||||
static int aha152x_probe(struct pcmcia_device *link)
|
||||
{
|
||||
scsi_info_t *info;
|
||||
|
@ -231,7 +229,6 @@ static int __init init_aha152x_cs(void)
|
|||
static void __exit exit_aha152x_cs(void)
|
||||
{
|
||||
pcmcia_unregister_driver(&aha152x_cs_driver);
|
||||
BUG_ON(dev_list != NULL);
|
||||
}
|
||||
|
||||
module_init(init_aha152x_cs);
|
||||
|
|
|
@ -1800,14 +1800,11 @@ static struct pcmcia_driver nsp_driver = {
|
|||
|
||||
static int __init nsp_cs_init(void)
|
||||
{
|
||||
nsp_msg(KERN_INFO, "loading...");
|
||||
|
||||
return pcmcia_register_driver(&nsp_driver);
|
||||
}
|
||||
|
||||
static void __exit nsp_cs_exit(void)
|
||||
{
|
||||
nsp_msg(KERN_INFO, "unloading...");
|
||||
pcmcia_unregister_driver(&nsp_driver);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue