aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/istallion.c17
-rw-r--r--drivers/char/pc8736x_gpio.c5
-rw-r--r--drivers/char/pcmcia/cm4000_cs.c7
-rw-r--r--drivers/char/scx200_gpio.c6
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]");
380module_param_array(board3, charp, NULL, 0); 379module_param_array(board3, charp, NULL, 0);
381MODULE_PARM_DESC(board3, "Board 3 config -> name[,ioaddr[,memaddr]"); 380MODULE_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
646static void stli_argbrds(void);
647static int stli_parsebrd(stlconf_t *confp, char **argp); 642static int stli_parsebrd(stlconf_t *confp, char **argp);
648 643static int stli_init(void);
649static unsigned long stli_atol(char *str);
650#endif
651
652int stli_init(void);
653static int stli_open(struct tty_struct *tty, struct file *filp); 644static int stli_open(struct tty_struct *tty, struct file *filp);
654static void stli_close(struct tty_struct *tty, struct file *filp); 645static void stli_close(struct tty_struct *tty, struct file *filp);
655static int stli_write(struct tty_struct *tty, const unsigned char *buf, int count); 646static int stli_write(struct tty_struct *tty, const unsigned char *buf, int count);
@@ -785,8 +776,6 @@ static int stli_timeron;
785 776
786static struct class *istallion_class; 777static 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
960static int stli_open(struct tty_struct *tty, struct file *filp) 947static 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
4696int __init stli_init(void) 4683static 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
321undo_platform_dev_add: 321undo_platform_dev_add:
322 platform_device_put(pdev); 322 platform_device_del(pdev);
323undo_platform_dev_alloc: 323undo_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
159static struct pcmcia_device *dev_table[CM4000_MAX_DEV]; 154static struct pcmcia_device *dev_table[CM4000_MAX_DEV];
160static struct class *cmm_class; 155static 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)
126undo_chrdev_region: 126undo_chrdev_region:
127 unregister_chrdev_region(dev, num_pins); 127 unregister_chrdev_region(dev, num_pins);
128undo_platform_device_add: 128undo_platform_device_add:
129 platform_device_put(pdev); 129 platform_device_del(pdev);
130undo_malloc: 130undo_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}