aboutsummaryrefslogtreecommitdiff
path: root/drivers/isdn/gigaset/gigaset.h
diff options
context:
space:
mode:
authorTilman Schmidt <tilman@imap.cc>2006-04-10 22:55:16 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-04-11 06:18:50 -0700
commit69049cc87dccb1e6fb54aa25c63033efac805dbd (patch)
tree9db1953a831091335b98f8749865f4c8b410ff9b /drivers/isdn/gigaset/gigaset.h
parent27d1ac2ef7d0b9250ca9fd2ef506e12866ce8fdf (diff)
[PATCH] isdn4linux: Siemens Gigaset drivers: make some variables non-atomic
With Hansjoerg Lipp <hjlipp@web.de> Replace some atomic_t variables in the Gigaset drivers by non-atomic ones, using spinlocks instead to assure atomicity, as proposed in discussions on the linux-kernel mailing list. 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/gigaset.h')
-rw-r--r--drivers/isdn/gigaset/gigaset.h18
1 files changed, 8 insertions, 10 deletions
diff --git a/drivers/isdn/gigaset/gigaset.h b/drivers/isdn/gigaset/gigaset.h
index 39a883ebc69..350dfcf15e6 100644
--- a/drivers/isdn/gigaset/gigaset.h
+++ b/drivers/isdn/gigaset/gigaset.h
@@ -55,9 +55,6 @@
#define GIG_RETRYCID
#define GIG_X75
-#define MAX_TIMER_INDEX 1000
-#define MAX_SEQ_INDEX 1000
-
#define GIG_TICK 100 /* in milliseconds */
/* timeout values (unit: 1 sec) */
@@ -375,7 +372,7 @@ struct at_state_t {
struct list_head list;
int waiting;
int getstring;
- atomic_t timer_index;
+ unsigned timer_index;
unsigned long timer_expires;
int timer_active;
unsigned int ConState; /* State of connection */
@@ -384,7 +381,7 @@ struct at_state_t {
int int_var[VAR_NUM]; /* see VAR_XXXX */
char *str_var[STR_NUM]; /* see STR_XXXX */
unsigned pending_commands; /* see PC_XXXX */
- atomic_t seq_index;
+ unsigned seq_index;
struct cardstate *cs;
struct bc_state *bcs;
@@ -484,10 +481,11 @@ struct cardstate {
unsigned fwver[4];
int gotfwver;
- atomic_t running; /* !=0 if events are handled */
- atomic_t connected; /* !=0 if hardware is connected */
+ unsigned running; /* !=0 if events are handled */
+ unsigned connected; /* !=0 if hardware is connected */
+ unsigned isdn_up; /* !=0 after ISDN_STAT_RUN */
- atomic_t cidmode;
+ unsigned cidmode;
int myid; /* id for communication with LL */
isdn_if iif;
@@ -528,7 +526,7 @@ struct cardstate {
/* event queue */
struct event_t events[MAX_EVENTS];
- atomic_t ev_tail, ev_head;
+ unsigned ev_tail, ev_head;
spinlock_t ev_lock;
/* current modem response */
@@ -824,7 +822,7 @@ static inline void gigaset_schedule_event(struct cardstate *cs)
{
unsigned long flags;
spin_lock_irqsave(&cs->lock, flags);
- if (atomic_read(&cs->running))
+ if (cs->running)
tasklet_schedule(&cs->event_tasklet);
spin_unlock_irqrestore(&cs->lock, flags);
}