Commit 0271aaf3 authored by Thomas Gleixner's avatar Thomas Gleixner Committed by Linus Torvalds

[PATCH] Lock initializer cleanup: MTD

Use the new lock initializers DEFINE_SPIN_LOCK and DEFINE_RW_LOCK
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent fcb05259
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
#include <linux/mtd/mtd.h> #include <linux/mtd/mtd.h>
#include <linux/mtd/compatmac.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); static LIST_HEAD(chip_drvs_list);
void register_mtd_chip_driver(struct mtd_chip_driver *drv) void register_mtd_chip_driver(struct mtd_chip_driver *drv)
......
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
#if defined(CONFIG_MIPS_ITE8172) || defined(CONFIG_MIPS_IVR) #if defined(CONFIG_MIPS_ITE8172) || defined(CONFIG_MIPS_IVR)
void cstm_mips_ixx_set_vpp(struct map_info *map,int vpp) 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; static int vpp_count = 0;
unsigned long flags; unsigned long flags;
......
...@@ -197,7 +197,7 @@ static void dnpc_unmap_flash(void) ...@@ -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; static int vpp_counter = 0;
/* /*
** This is what has to be done for the DNP board .. ** This is what has to be done for the DNP board ..
......
...@@ -54,7 +54,7 @@ always fail. So we don't do it. I just hope it doesn't break anything. ...@@ -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 volatile int page_in_window = -1; // Current page in window.
static void __iomem *iomapadr; 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 /* 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 * single flash device into. If the size if zero we use up to the end of the
......
...@@ -143,7 +143,7 @@ static struct mtd_partition h3xxx_partitions_bank2[] = { ...@@ -143,7 +143,7 @@ static struct mtd_partition h3xxx_partitions_bank2[] = {
}; };
#endif #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) static void h3xxx_set_vpp(struct map_info *map, int vpp)
{ {
......
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
static volatile char page_n_dev = 0; static volatile char page_n_dev = 0;
static unsigned long iomapadr; 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. * We use map_priv_1 to identify which device we are.
......
...@@ -85,7 +85,7 @@ separate MTD devices. ...@@ -85,7 +85,7 @@ separate MTD devices.
static volatile int page_in_window = -1; // Current page in window. static volatile int page_in_window = -1; // Current page in window.
static void __iomem *iomapadr; 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 /* 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 * single flash device into. If the size if zero we use up to the end of the
......
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
the extra indirection from having one of the map->map_priv the extra indirection from having one of the map->map_priv
fields pointing to yet another private struct. 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) static void __vmax301_page(struct map_info *map, unsigned long page)
{ {
......
...@@ -523,7 +523,7 @@ int add_mtd_partitions(struct mtd_info *master, ...@@ -523,7 +523,7 @@ int add_mtd_partitions(struct mtd_info *master,
EXPORT_SYMBOL(add_mtd_partitions); EXPORT_SYMBOL(add_mtd_partitions);
EXPORT_SYMBOL(del_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 LIST_HEAD(part_parsers);
static struct mtd_part_parser *get_partition_parser(const char *name) static struct mtd_part_parser *get_partition_parser(const char *name)
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
#include "compr.h" #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 */ /* Available compressors are on this list */
static LIST_HEAD(jffs2_compressor_list); static LIST_HEAD(jffs2_compressor_list);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment