Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2005-01-20 16:21:26 -0800
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-01-20 16:21:26 -0800
commit0271aaf3767004b44753be9f03c81e3b167f8a7a (patch)
treef96edafcd71656bb712de4537562fa555e7c2b07
parentfcb05259f46edf35e5f04f2588bfb7f5bfffc58c (diff)
[PATCH] Lock initializer cleanup: MTD
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/mtd/chips/chipreg.c2
-rw-r--r--drivers/mtd/maps/cstm_mips_ixx.c2
-rw-r--r--drivers/mtd/maps/dilnetpc.c2
-rw-r--r--drivers/mtd/maps/elan-104nc.c2
-rw-r--r--drivers/mtd/maps/ipaq-flash.c2
-rw-r--r--drivers/mtd/maps/octagon-5066.c2
-rw-r--r--drivers/mtd/maps/sbc_gxx.c2
-rw-r--r--drivers/mtd/maps/vmax301.c2
-rw-r--r--drivers/mtd/mtdpart.c2
-rw-r--r--fs/jffs2/compr.c2
10 files changed, 10 insertions, 10 deletions
diff --git a/drivers/mtd/chips/chipreg.c b/drivers/mtd/chips/chipreg.c
index cd699cb3c7da..d7d739a108ae 100644
--- a/drivers/mtd/chips/chipreg.c
+++ b/drivers/mtd/chips/chipreg.c
@@ -15,7 +15,7 @@
#include <linux/mtd/mtd.h>
#include <linux/mtd/compatmac.h>
-static spinlock_t chip_drvs_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(chip_drvs_lock);
static LIST_HEAD(chip_drvs_list);
void register_mtd_chip_driver(struct mtd_chip_driver *drv)
diff --git a/drivers/mtd/maps/cstm_mips_ixx.c b/drivers/mtd/maps/cstm_mips_ixx.c
index 5258c641bab2..ae9252fbf176 100644
--- a/drivers/mtd/maps/cstm_mips_ixx.c
+++ b/drivers/mtd/maps/cstm_mips_ixx.c
@@ -58,7 +58,7 @@
#if defined(CONFIG_MIPS_ITE8172) || defined(CONFIG_MIPS_IVR)
void cstm_mips_ixx_set_vpp(struct map_info *map,int vpp)
{
- static spinlock_t vpp_lock = SPIN_LOCK_UNLOCKED;
+ static DEFINE_SPINLOCK(vpp_lock);
static int vpp_count = 0;
unsigned long flags;
diff --git a/drivers/mtd/maps/dilnetpc.c b/drivers/mtd/maps/dilnetpc.c
index 2bac6a6bbde6..0bc79c93a584 100644
--- a/drivers/mtd/maps/dilnetpc.c
+++ b/drivers/mtd/maps/dilnetpc.c
@@ -197,7 +197,7 @@ static void dnpc_unmap_flash(void)
************************************************************
*/
-static spinlock_t dnpc_spin = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(dnpc_spin);
static int vpp_counter = 0;
/*
** This is what has to be done for the DNP board ..
diff --git a/drivers/mtd/maps/elan-104nc.c b/drivers/mtd/maps/elan-104nc.c
index 05d19bc01bbc..e9465f5c069e 100644
--- a/drivers/mtd/maps/elan-104nc.c
+++ b/drivers/mtd/maps/elan-104nc.c
@@ -54,7 +54,7 @@ always fail. So we don't do it. I just hope it doesn't break anything.
static volatile int page_in_window = -1; // Current page in window.
static void __iomem *iomapadr;
-static spinlock_t elan_104nc_spin = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(elan_104nc_spin);
/* partition_info gives details on the logical partitions that the split the
* single flash device into. If the size if zero we use up to the end of the
diff --git a/drivers/mtd/maps/ipaq-flash.c b/drivers/mtd/maps/ipaq-flash.c
index 914c0f5733f7..712401810841 100644
--- a/drivers/mtd/maps/ipaq-flash.c
+++ b/drivers/mtd/maps/ipaq-flash.c
@@ -143,7 +143,7 @@ static struct mtd_partition h3xxx_partitions_bank2[] = {
};
#endif
-static spinlock_t ipaq_vpp_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(ipaq_vpp_lock);
static void h3xxx_set_vpp(struct map_info *map, int vpp)
{
diff --git a/drivers/mtd/maps/octagon-5066.c b/drivers/mtd/maps/octagon-5066.c
index 10bd8901e851..e5ff83de420e 100644
--- a/drivers/mtd/maps/octagon-5066.c
+++ b/drivers/mtd/maps/octagon-5066.c
@@ -41,7 +41,7 @@
static volatile char page_n_dev = 0;
static unsigned long iomapadr;
-static spinlock_t oct5066_spin = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(oct5066_spin);
/*
* We use map_priv_1 to identify which device we are.
diff --git a/drivers/mtd/maps/sbc_gxx.c b/drivers/mtd/maps/sbc_gxx.c
index 064c14635e62..65add28bde14 100644
--- a/drivers/mtd/maps/sbc_gxx.c
+++ b/drivers/mtd/maps/sbc_gxx.c
@@ -85,7 +85,7 @@ separate MTD devices.
static volatile int page_in_window = -1; // Current page in window.
static void __iomem *iomapadr;
-static spinlock_t sbc_gxx_spin = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(sbc_gxx_spin);
/* partition_info gives details on the logical partitions that the split the
* single flash device into. If the size if zero we use up to the end of the
diff --git a/drivers/mtd/maps/vmax301.c b/drivers/mtd/maps/vmax301.c
index 9cf2629b8de9..c8c74110ed1b 100644
--- a/drivers/mtd/maps/vmax301.c
+++ b/drivers/mtd/maps/vmax301.c
@@ -38,7 +38,7 @@
the extra indirection from having one of the map->map_priv
fields pointing to yet another private struct.
*/
-static spinlock_t vmax301_spin = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(vmax301_spin);
static void __vmax301_page(struct map_info *map, unsigned long page)
{
diff --git a/drivers/mtd/mtdpart.c b/drivers/mtd/mtdpart.c
index d4547651dfe7..96ebb52f24b1 100644
--- a/drivers/mtd/mtdpart.c
+++ b/drivers/mtd/mtdpart.c
@@ -523,7 +523,7 @@ int add_mtd_partitions(struct mtd_info *master,
EXPORT_SYMBOL(add_mtd_partitions);
EXPORT_SYMBOL(del_mtd_partitions);
-static spinlock_t part_parser_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(part_parser_lock);
static LIST_HEAD(part_parsers);
static struct mtd_part_parser *get_partition_parser(const char *name)
diff --git a/fs/jffs2/compr.c b/fs/jffs2/compr.c
index 01ff57458ef1..48732546dc03 100644
--- a/fs/jffs2/compr.c
+++ b/fs/jffs2/compr.c
@@ -15,7 +15,7 @@
#include "compr.h"
-static spinlock_t jffs2_compressor_list_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(jffs2_compressor_list_lock);
/* Available compressors are on this list */
static LIST_HEAD(jffs2_compressor_list);