diff options
Diffstat (limited to 'drivers/char')
-rw-r--r-- | drivers/char/istallion.c | 17 | ||||
-rw-r--r-- | drivers/char/pc8736x_gpio.c | 5 | ||||
-rw-r--r-- | drivers/char/pcmcia/cm4000_cs.c | 7 | ||||
-rw-r--r-- | drivers/char/scx200_gpio.c | 6 |
4 files changed, 9 insertions, 26 deletions
diff --git a/drivers/char/istallion.c b/drivers/char/istallion.c index c86a718a702..fbce2f0669d 100644 --- a/drivers/char/istallion.c +++ b/drivers/char/istallion.c | |||
@@ -281,7 +281,6 @@ static char *stli_brdnames[] = { | |||
281 | 281 | ||
282 | /*****************************************************************************/ | 282 | /*****************************************************************************/ |
283 | 283 | ||
284 | #ifdef MODULE | ||
285 | /* | 284 | /* |
286 | * Define some string labels for arguments passed from the module | 285 | * Define some string labels for arguments passed from the module |
287 | * load line. These allow for easy board definitions, and easy | 286 | * load line. These allow for easy board definitions, and easy |
@@ -380,8 +379,6 @@ MODULE_PARM_DESC(board2, "Board 2 config -> name[,ioaddr[,memaddr]"); | |||
380 | module_param_array(board3, charp, NULL, 0); | 379 | module_param_array(board3, charp, NULL, 0); |
381 | MODULE_PARM_DESC(board3, "Board 3 config -> name[,ioaddr[,memaddr]"); | 380 | MODULE_PARM_DESC(board3, "Board 3 config -> name[,ioaddr[,memaddr]"); |
382 | 381 | ||
383 | #endif | ||
384 | |||
385 | /* | 382 | /* |
386 | * Set up a default memory address table for EISA board probing. | 383 | * Set up a default memory address table for EISA board probing. |
387 | * The default addresses are all bellow 1Mbyte, which has to be the | 384 | * The default addresses are all bellow 1Mbyte, which has to be the |
@@ -642,14 +639,8 @@ static unsigned int stli_baudrates[] = { | |||
642 | * Prototype all functions in this driver! | 639 | * Prototype all functions in this driver! |
643 | */ | 640 | */ |
644 | 641 | ||
645 | #ifdef MODULE | ||
646 | static void stli_argbrds(void); | ||
647 | static int stli_parsebrd(stlconf_t *confp, char **argp); | 642 | static int stli_parsebrd(stlconf_t *confp, char **argp); |
648 | 643 | static int stli_init(void); | |
649 | static unsigned long stli_atol(char *str); | ||
650 | #endif | ||
651 | |||
652 | int stli_init(void); | ||
653 | static int stli_open(struct tty_struct *tty, struct file *filp); | 644 | static int stli_open(struct tty_struct *tty, struct file *filp); |
654 | static void stli_close(struct tty_struct *tty, struct file *filp); | 645 | static void stli_close(struct tty_struct *tty, struct file *filp); |
655 | static int stli_write(struct tty_struct *tty, const unsigned char *buf, int count); | 646 | static int stli_write(struct tty_struct *tty, const unsigned char *buf, int count); |
@@ -785,8 +776,6 @@ static int stli_timeron; | |||
785 | 776 | ||
786 | static struct class *istallion_class; | 777 | static struct class *istallion_class; |
787 | 778 | ||
788 | #ifdef MODULE | ||
789 | |||
790 | /* | 779 | /* |
791 | * Loadable module initialization stuff. | 780 | * Loadable module initialization stuff. |
792 | */ | 781 | */ |
@@ -953,8 +942,6 @@ static int stli_parsebrd(stlconf_t *confp, char **argp) | |||
953 | return(1); | 942 | return(1); |
954 | } | 943 | } |
955 | 944 | ||
956 | #endif | ||
957 | |||
958 | /*****************************************************************************/ | 945 | /*****************************************************************************/ |
959 | 946 | ||
960 | static int stli_open(struct tty_struct *tty, struct file *filp) | 947 | static int stli_open(struct tty_struct *tty, struct file *filp) |
@@ -4693,7 +4680,7 @@ static struct tty_operations stli_ops = { | |||
4693 | 4680 | ||
4694 | /*****************************************************************************/ | 4681 | /*****************************************************************************/ |
4695 | 4682 | ||
4696 | int __init stli_init(void) | 4683 | static int __init stli_init(void) |
4697 | { | 4684 | { |
4698 | int i; | 4685 | int i; |
4699 | printk(KERN_INFO "%s: version %s\n", stli_drvtitle, stli_drvversion); | 4686 | printk(KERN_INFO "%s: version %s\n", stli_drvtitle, stli_drvversion); |
diff --git a/drivers/char/pc8736x_gpio.c b/drivers/char/pc8736x_gpio.c index 1c706ccfdbb..c860de6a6fd 100644 --- a/drivers/char/pc8736x_gpio.c +++ b/drivers/char/pc8736x_gpio.c | |||
@@ -319,9 +319,10 @@ static int __init pc8736x_gpio_init(void) | |||
319 | return 0; | 319 | return 0; |
320 | 320 | ||
321 | undo_platform_dev_add: | 321 | undo_platform_dev_add: |
322 | platform_device_put(pdev); | 322 | platform_device_del(pdev); |
323 | undo_platform_dev_alloc: | 323 | undo_platform_dev_alloc: |
324 | kfree(pdev); | 324 | platform_device_put(pdev); |
325 | |||
325 | return rc; | 326 | return rc; |
326 | } | 327 | } |
327 | 328 | ||
diff --git a/drivers/char/pcmcia/cm4000_cs.c b/drivers/char/pcmcia/cm4000_cs.c index eab5394da66..31c8a21f9d8 100644 --- a/drivers/char/pcmcia/cm4000_cs.c +++ b/drivers/char/pcmcia/cm4000_cs.c | |||
@@ -149,12 +149,7 @@ struct cm4000_dev { | |||
149 | #define ZERO_DEV(dev) \ | 149 | #define ZERO_DEV(dev) \ |
150 | memset(&dev->atr_csum,0, \ | 150 | memset(&dev->atr_csum,0, \ |
151 | sizeof(struct cm4000_dev) - \ | 151 | sizeof(struct cm4000_dev) - \ |
152 | /*link*/ sizeof(struct pcmcia_device *) - \ | 152 | offsetof(struct cm4000_dev, atr_csum)) |
153 | /*node*/ sizeof(dev_node_t) - \ | ||
154 | /*atr*/ MAX_ATR*sizeof(char) - \ | ||
155 | /*rbuf*/ 512*sizeof(char) - \ | ||
156 | /*sbuf*/ 512*sizeof(char) - \ | ||
157 | /*queue*/ 4*sizeof(wait_queue_head_t)) | ||
158 | 153 | ||
159 | static struct pcmcia_device *dev_table[CM4000_MAX_DEV]; | 154 | static struct pcmcia_device *dev_table[CM4000_MAX_DEV]; |
160 | static struct class *cmm_class; | 155 | static struct class *cmm_class; |
diff --git a/drivers/char/scx200_gpio.c b/drivers/char/scx200_gpio.c index 5a280a33040..45083e5dd23 100644 --- a/drivers/char/scx200_gpio.c +++ b/drivers/char/scx200_gpio.c | |||
@@ -126,9 +126,10 @@ static int __init scx200_gpio_init(void) | |||
126 | undo_chrdev_region: | 126 | undo_chrdev_region: |
127 | unregister_chrdev_region(dev, num_pins); | 127 | unregister_chrdev_region(dev, num_pins); |
128 | undo_platform_device_add: | 128 | undo_platform_device_add: |
129 | platform_device_put(pdev); | 129 | platform_device_del(pdev); |
130 | undo_malloc: | 130 | undo_malloc: |
131 | kfree(pdev); | 131 | platform_device_put(pdev); |
132 | |||
132 | return rc; | 133 | return rc; |
133 | } | 134 | } |
134 | 135 | ||
@@ -136,7 +137,6 @@ static void __exit scx200_gpio_cleanup(void) | |||
136 | { | 137 | { |
137 | kfree(scx200_devices); | 138 | kfree(scx200_devices); |
138 | unregister_chrdev_region(MKDEV(major, 0), num_pins); | 139 | unregister_chrdev_region(MKDEV(major, 0), num_pins); |
139 | platform_device_put(pdev); | ||
140 | platform_device_unregister(pdev); | 140 | platform_device_unregister(pdev); |
141 | /* kfree(pdev); */ | 141 | /* kfree(pdev); */ |
142 | } | 142 | } |