Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2005-01-20 16:21:09 -0800
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-01-20 16:21:09 -0800
commitfcb05259f46edf35e5f04f2588bfb7f5bfffc58c (patch)
treec562f5affe8e7389aaf1996cb3d4e0da138e508a
parentde02781e017e81f273e7062c342f615a6e110471 (diff)
[PATCH] Lock initializer cleanup: Network drivers
Use the new lock initializers DEFINE_SPIN_LOCK and DEFINE_RW_LOCK Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--drivers/net/appletalk/ltpc.c4
-rw-r--r--drivers/net/arcnet/arcnet.c2
-rw-r--r--drivers/net/de600.c2
-rw-r--r--drivers/net/fec_8xx/fec_mii.c2
-rw-r--r--drivers/net/hamradio/6pack.c2
-rw-r--r--drivers/net/hamradio/scc.c2
-rw-r--r--drivers/net/ibm_emac/ibm_emac_mal.c2
-rw-r--r--drivers/net/irda/au1k_ir.c2
-rw-r--r--drivers/net/ppp_async.c2
-rw-r--r--drivers/net/ppp_generic.c4
-rw-r--r--drivers/net/ppp_synctty.c2
-rw-r--r--drivers/net/pppoe.c2
-rw-r--r--drivers/net/sk_g16.c2
-rw-r--r--drivers/net/via-velocity.c2
-rw-r--r--drivers/net/wan/sdla.c2
-rw-r--r--drivers/net/wan/syncppp.c2
-rw-r--r--drivers/net/wireless/strip.c2
17 files changed, 19 insertions, 19 deletions
diff --git a/drivers/net/appletalk/ltpc.c b/drivers/net/appletalk/ltpc.c
index e9b11453b710..ad8e943231a1 100644
--- a/drivers/net/appletalk/ltpc.c
+++ b/drivers/net/appletalk/ltpc.c
@@ -236,8 +236,8 @@ static int dma;
/* our stuff */
#include "ltpc.h"
-static spinlock_t txqueue_lock = SPIN_LOCK_UNLOCKED;
-static spinlock_t mbox_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(txqueue_lock);
+static DEFINE_SPINLOCK(mbox_lock);
/* function prototypes */
static int do_read(struct net_device *dev, void *cbuf, int cbuflen,
diff --git a/drivers/net/arcnet/arcnet.c b/drivers/net/arcnet/arcnet.c
index 9fd21724f61f..fdd83f141a50 100644
--- a/drivers/net/arcnet/arcnet.c
+++ b/drivers/net/arcnet/arcnet.c
@@ -351,7 +351,7 @@ struct net_device *alloc_arcdev(char *name)
name && *name ? name : "arc%d", arcdev_setup);
if(dev) {
struct arcnet_local *lp = (struct arcnet_local *) dev->priv;
- lp->lock = SPIN_LOCK_UNLOCKED;
+ spin_lock_init(&lp->lock);
}
return dev;
diff --git a/drivers/net/de600.c b/drivers/net/de600.c
index 1b6b437f5d40..56a100fb9e4b 100644
--- a/drivers/net/de600.c
+++ b/drivers/net/de600.c
@@ -99,7 +99,7 @@ static volatile int tx_fifo_in;
static volatile int tx_fifo_out;
static volatile int free_tx_pages = TX_PAGES;
static int was_down;
-static spinlock_t de600_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(de600_lock);
static inline u8 de600_read_status(struct net_device *dev)
{
diff --git a/drivers/net/fec_8xx/fec_mii.c b/drivers/net/fec_8xx/fec_mii.c
index 8fd1495fafe2..803eb095cf8e 100644
--- a/drivers/net/fec_8xx/fec_mii.c
+++ b/drivers/net/fec_8xx/fec_mii.c
@@ -54,7 +54,7 @@
/*************************************************/
/* XXX both FECs use the MII interface of FEC1 */
-static spinlock_t fec_mii_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(fec_mii_lock);
#define FEC_MII_LOOPS 10000
diff --git a/drivers/net/hamradio/6pack.c b/drivers/net/hamradio/6pack.c
index 5728c90db586..48af4c20ffa1 100644
--- a/drivers/net/hamradio/6pack.c
+++ b/drivers/net/hamradio/6pack.c
@@ -422,7 +422,7 @@ out_mem:
* best way to fix this is to use a rwlock in the tty struct, but for now we
* use a single global rwlock for all ttys in ppp line discipline.
*/
-static rwlock_t disc_data_lock = RW_LOCK_UNLOCKED;
+static DEFINE_RWLOCK(disc_data_lock);
static struct sixpack *sp_get(struct tty_struct *tty)
{
diff --git a/drivers/net/hamradio/scc.c b/drivers/net/hamradio/scc.c
index 8da1948026c6..ce9e7af020da 100644
--- a/drivers/net/hamradio/scc.c
+++ b/drivers/net/hamradio/scc.c
@@ -237,7 +237,7 @@ static io_port Vector_Latch;
/* These provide interrupt save 2-step access to the Z8530 registers */
-static spinlock_t iolock = SPIN_LOCK_UNLOCKED; /* Guards paired accesses */
+static DEFINE_SPINLOCK(iolock); /* Guards paired accesses */
static inline unsigned char InReg(io_port port, unsigned char reg)
{
diff --git a/drivers/net/ibm_emac/ibm_emac_mal.c b/drivers/net/ibm_emac/ibm_emac_mal.c
index 6597791a728f..e59f57f363ca 100644
--- a/drivers/net/ibm_emac/ibm_emac_mal.c
+++ b/drivers/net/ibm_emac/ibm_emac_mal.c
@@ -33,7 +33,7 @@
/* This lock protects the commac list. On today UP implementations, it's
* really only used as IRQ protection in mal_{register,unregister}_commac()
*/
-static rwlock_t mal_list_lock = RW_LOCK_UNLOCKED;
+static DEFINE_RWLOCK(mal_list_lock);
int mal_register_commac(struct ibm_ocp_mal *mal, struct mal_commac *commac)
{
diff --git a/drivers/net/irda/au1k_ir.c b/drivers/net/irda/au1k_ir.c
index a02a2a25aa07..e6b1985767c2 100644
--- a/drivers/net/irda/au1k_ir.c
+++ b/drivers/net/irda/au1k_ir.c
@@ -72,7 +72,7 @@ static char version[] __devinitdata =
static BCSR * const bcsr = (BCSR *)0xAE000000;
#endif
-static spinlock_t ir_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(ir_lock);
/*
* IrDA peripheral bug. You have to read the register
diff --git a/drivers/net/ppp_async.c b/drivers/net/ppp_async.c
index e98b527bfef0..a48e19391208 100644
--- a/drivers/net/ppp_async.c
+++ b/drivers/net/ppp_async.c
@@ -126,7 +126,7 @@ static struct ppp_channel_ops async_ops = {
* FIXME: this is no longer true. The _close path for the ldisc is
* now guaranteed to be sane.
*/
-static rwlock_t disc_data_lock = RW_LOCK_UNLOCKED;
+static DEFINE_RWLOCK(disc_data_lock);
static struct asyncppp *ap_get(struct tty_struct *tty)
{
diff --git a/drivers/net/ppp_generic.c b/drivers/net/ppp_generic.c
index c50980e8aea3..f5c918a7992d 100644
--- a/drivers/net/ppp_generic.c
+++ b/drivers/net/ppp_generic.c
@@ -210,7 +210,7 @@ static atomic_t ppp_unit_count = ATOMIC_INIT(0);
* and the atomicity of find a channel and updating its file.refcnt
* field.
*/
-static spinlock_t all_channels_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(all_channels_lock);
static LIST_HEAD(all_channels);
static LIST_HEAD(new_channels);
static int last_channel_index;
@@ -2218,7 +2218,7 @@ ppp_ccp_closed(struct ppp *ppp)
/* List of compressors. */
static LIST_HEAD(compressor_list);
-static spinlock_t compressor_list_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(compressor_list_lock);
struct compressor_entry {
struct list_head list;
diff --git a/drivers/net/ppp_synctty.c b/drivers/net/ppp_synctty.c
index 37bbfad7edf7..7d0150b4c629 100644
--- a/drivers/net/ppp_synctty.c
+++ b/drivers/net/ppp_synctty.c
@@ -178,7 +178,7 @@ ppp_print_buffer (const char *name, const __u8 *buf, int count)
*
* FIXME: Fixed in tty_io nowdays.
*/
-static rwlock_t disc_data_lock = RW_LOCK_UNLOCKED;
+static DEFINE_RWLOCK(disc_data_lock);
static struct syncppp *sp_get(struct tty_struct *tty)
{
diff --git a/drivers/net/pppoe.c b/drivers/net/pppoe.c
index 672e3cd2db92..44e182efb365 100644
--- a/drivers/net/pppoe.c
+++ b/drivers/net/pppoe.c
@@ -86,7 +86,7 @@ static int pppoe_xmit(struct ppp_channel *chan, struct sk_buff *skb);
static int __pppoe_xmit(struct sock *sk, struct sk_buff *skb);
static struct proto_ops pppoe_ops;
-static rwlock_t pppoe_hash_lock = RW_LOCK_UNLOCKED;
+static DEFINE_RWLOCK(pppoe_hash_lock);
static struct ppp_channel_ops pppoe_chan_ops;
diff --git a/drivers/net/sk_g16.c b/drivers/net/sk_g16.c
index 425012d48f07..134ae0e6495b 100644
--- a/drivers/net/sk_g16.c
+++ b/drivers/net/sk_g16.c
@@ -457,7 +457,7 @@ struct priv
/* static variables */
static SK_RAM *board; /* pointer to our memory mapped board components */
-static spinlock_t SK_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(SK_lock);
/* Macros */
diff --git a/drivers/net/via-velocity.c b/drivers/net/via-velocity.c
index 7964bc3d6971..3102c689f5c4 100644
--- a/drivers/net/via-velocity.c
+++ b/drivers/net/via-velocity.c
@@ -272,7 +272,7 @@ static struct notifier_block velocity_inetaddr_notifier = {
.notifier_call = velocity_netdev_event,
};
-static spinlock_t velocity_dev_list_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(velocity_dev_list_lock);
static LIST_HEAD(velocity_dev_list);
static void velocity_register_notifier(void)
diff --git a/drivers/net/wan/sdla.c b/drivers/net/wan/sdla.c
index 71f95462d585..3ac9a45b20fa 100644
--- a/drivers/net/wan/sdla.c
+++ b/drivers/net/wan/sdla.c
@@ -69,7 +69,7 @@ static unsigned int valid_mem[] __initdata = {
0xD0000, 0xD2000, 0xD4000, 0xD6000, 0xD8000, 0xDA000, 0xDC000, 0xDE000,
0xE0000, 0xE2000, 0xE4000, 0xE6000, 0xE8000, 0xEA000, 0xEC000, 0xEE000};
-static spinlock_t sdla_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(sdla_lock);
/*********************************************************
*
diff --git a/drivers/net/wan/syncppp.c b/drivers/net/wan/syncppp.c
index 2678648d825c..84b65c60c799 100644
--- a/drivers/net/wan/syncppp.c
+++ b/drivers/net/wan/syncppp.c
@@ -131,7 +131,7 @@ struct cisco_packet {
static struct sppp *spppq;
static struct timer_list sppp_keepalive_timer;
-static spinlock_t spppq_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(spppq_lock);
/* global xmit queue for sending packets while spinlock is held */
static struct sk_buff_head tx_queue;
diff --git a/drivers/net/wireless/strip.c b/drivers/net/wireless/strip.c
index b9cb7be40a95..0acb45971d57 100644
--- a/drivers/net/wireless/strip.c
+++ b/drivers/net/wireless/strip.c
@@ -437,7 +437,7 @@ static const long LongTime = 0x7FFFFFFF;
/* Global variables */
static LIST_HEAD(strip_list);
-static spinlock_t strip_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(strip_lock);
/************************************************************************/
/* Macros */