diff options
author | Tilman Schmidt <tilman@imap.cc> | 2006-04-10 22:55:14 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-04-11 06:18:50 -0700 |
commit | 70440cf24ce6841fc5a01c38e2a732cf0bc2792a (patch) | |
tree | 712fb3d0dea87e1e2750f395bb84d83b9a003c9a /drivers/isdn/gigaset/common.c | |
parent | 443e1f45ac1fee498e3ff053c61fcc54024ee6ee (diff) | |
download | kernel_samsung_crespo-70440cf24ce6841fc5a01c38e2a732cf0bc2792a.zip kernel_samsung_crespo-70440cf24ce6841fc5a01c38e2a732cf0bc2792a.tar.gz kernel_samsung_crespo-70440cf24ce6841fc5a01c38e2a732cf0bc2792a.tar.bz2 |
[PATCH] isdn4linux: Siemens Gigaset drivers: remove forward references
With Hansjoerg Lipp <hjlipp@web.de>
Remove four unnecessary forward function declarations and an obsolete E-mail
address from the Siemens Gigaset drivers.
Signed-off-by: Hansjoerg Lipp <hjlipp@web.de>
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Cc: Karsten Keil <kkeil@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/isdn/gigaset/common.c')
-rw-r--r-- | drivers/isdn/gigaset/common.c | 106 |
1 files changed, 49 insertions, 57 deletions
diff --git a/drivers/isdn/gigaset/common.c b/drivers/isdn/gigaset/common.c index c3c9804..f8e5759 100644 --- a/drivers/isdn/gigaset/common.c +++ b/drivers/isdn/gigaset/common.c @@ -1,7 +1,7 @@ /* * Stuff used by all variants of the driver * - * Copyright (c) 2001 by Stefan Eilers <Eilers.Stefan@epost.de>, + * Copyright (c) 2001 by Stefan Eilers, * Hansjoerg Lipp <hjlipp@web.de>, * Tilman Schmidt <tilman@imap.cc>. * @@ -19,7 +19,7 @@ #include <linux/moduleparam.h> /* Version Information */ -#define DRIVER_AUTHOR "Hansjoerg Lipp <hjlipp@web.de>, Tilman Schmidt <tilman@imap.cc>, Stefan Eilers <Eilers.Stefan@epost.de>" +#define DRIVER_AUTHOR "Hansjoerg Lipp <hjlipp@web.de>, Tilman Schmidt <tilman@imap.cc>, Stefan Eilers" #define DRIVER_DESC "Driver for Gigaset 307x" /* Module parameters */ @@ -28,15 +28,7 @@ EXPORT_SYMBOL_GPL(gigaset_debuglevel); module_param_named(debug, gigaset_debuglevel, int, S_IRUGO|S_IWUSR); MODULE_PARM_DESC(debug, "debug level"); -/*====================================================================== - Prototypes of internal functions - */ - -static struct cardstate *alloc_cs(struct gigaset_driver *drv); -static void free_cs(struct cardstate *cs); -static void make_valid(struct cardstate *cs, unsigned mask); -static void make_invalid(struct cardstate *cs, unsigned mask); - +/* driver state flags */ #define VALID_MINOR 0x01 #define VALID_ID 0x02 #define ASSIGNED 0x04 @@ -400,6 +392,52 @@ static void gigaset_freebcs(struct bc_state *bcs) } } +static struct cardstate *alloc_cs(struct gigaset_driver *drv) +{ + unsigned long flags; + unsigned i; + static struct cardstate *ret = NULL; + + spin_lock_irqsave(&drv->lock, flags); + for (i = 0; i < drv->minors; ++i) { + if (!(drv->flags[i] & VALID_MINOR)) { + drv->flags[i] = VALID_MINOR; + ret = drv->cs + i; + } + if (ret) + break; + } + spin_unlock_irqrestore(&drv->lock, flags); + return ret; +} + +static void free_cs(struct cardstate *cs) +{ + unsigned long flags; + struct gigaset_driver *drv = cs->driver; + spin_lock_irqsave(&drv->lock, flags); + drv->flags[cs->minor_index] = 0; + spin_unlock_irqrestore(&drv->lock, flags); +} + +static void make_valid(struct cardstate *cs, unsigned mask) +{ + unsigned long flags; + struct gigaset_driver *drv = cs->driver; + spin_lock_irqsave(&drv->lock, flags); + drv->flags[cs->minor_index] |= mask; + spin_unlock_irqrestore(&drv->lock, flags); +} + +static void make_invalid(struct cardstate *cs, unsigned mask) +{ + unsigned long flags; + struct gigaset_driver *drv = cs->driver; + spin_lock_irqsave(&drv->lock, flags); + drv->flags[cs->minor_index] &= ~mask; + spin_unlock_irqrestore(&drv->lock, flags); +} + void gigaset_freecs(struct cardstate *cs) { int i; @@ -1117,52 +1155,6 @@ out1: } EXPORT_SYMBOL_GPL(gigaset_initdriver); -static struct cardstate *alloc_cs(struct gigaset_driver *drv) -{ - unsigned long flags; - unsigned i; - static struct cardstate *ret = NULL; - - spin_lock_irqsave(&drv->lock, flags); - for (i = 0; i < drv->minors; ++i) { - if (!(drv->flags[i] & VALID_MINOR)) { - drv->flags[i] = VALID_MINOR; - ret = drv->cs + i; - } - if (ret) - break; - } - spin_unlock_irqrestore(&drv->lock, flags); - return ret; -} - -static void free_cs(struct cardstate *cs) -{ - unsigned long flags; - struct gigaset_driver *drv = cs->driver; - spin_lock_irqsave(&drv->lock, flags); - drv->flags[cs->minor_index] = 0; - spin_unlock_irqrestore(&drv->lock, flags); -} - -static void make_valid(struct cardstate *cs, unsigned mask) -{ - unsigned long flags; - struct gigaset_driver *drv = cs->driver; - spin_lock_irqsave(&drv->lock, flags); - drv->flags[cs->minor_index] |= mask; - spin_unlock_irqrestore(&drv->lock, flags); -} - -static void make_invalid(struct cardstate *cs, unsigned mask) -{ - unsigned long flags; - struct gigaset_driver *drv = cs->driver; - spin_lock_irqsave(&drv->lock, flags); - drv->flags[cs->minor_index] &= ~mask; - spin_unlock_irqrestore(&drv->lock, flags); -} - /* For drivers without fixed assignment device<->cardstate (usb) */ struct cardstate *gigaset_getunassignedcs(struct gigaset_driver *drv) { |