diff options
author | Dan Williams <dan.j.williams@intel.com> | 2009-09-09 02:55:21 +0200 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2009-09-09 02:55:21 +0200 |
commit | bbb20089a3275a19e475dbc21320c3742e3ca423 (patch) | |
tree | 216fdc1cbef450ca688135c5b8969169482d9a48 /drivers/i2c/i2c-boardinfo.c | |
parent | Merge branch 'iop-raid6' into async-tx-next (diff) | |
parent | dmaengine: Move all map_sg/unmap_sg for slave channel to its client (diff) | |
download | linux-bbb20089a3275a19e475dbc21320c3742e3ca423.tar.xz linux-bbb20089a3275a19e475dbc21320c3742e3ca423.zip |
Merge branch 'dmaengine' into async-tx-next
Conflicts:
crypto/async_tx/async_xor.c
drivers/dma/ioat/dma_v2.h
drivers/dma/ioat/pci.c
drivers/md/raid5.c
Diffstat (limited to 'drivers/i2c/i2c-boardinfo.c')
-rw-r--r-- | drivers/i2c/i2c-boardinfo.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/i2c/i2c-boardinfo.c b/drivers/i2c/i2c-boardinfo.c index ffb35f09df03..a26a34a06641 100644 --- a/drivers/i2c/i2c-boardinfo.c +++ b/drivers/i2c/i2c-boardinfo.c @@ -18,6 +18,7 @@ #include <linux/kernel.h> #include <linux/i2c.h> +#include <linux/rwsem.h> #include "i2c-core.h" @@ -25,7 +26,7 @@ /* These symbols are exported ONLY FOR the i2c core. * No other users will be supported. */ -DEFINE_MUTEX(__i2c_board_lock); +DECLARE_RWSEM(__i2c_board_lock); EXPORT_SYMBOL_GPL(__i2c_board_lock); LIST_HEAD(__i2c_board_list); @@ -63,7 +64,7 @@ i2c_register_board_info(int busnum, { int status; - mutex_lock(&__i2c_board_lock); + down_write(&__i2c_board_lock); /* dynamic bus numbers will be assigned after the last static one */ if (busnum >= __i2c_first_dynamic_bus_num) @@ -84,7 +85,7 @@ i2c_register_board_info(int busnum, list_add_tail(&devinfo->list, &__i2c_board_list); } - mutex_unlock(&__i2c_board_lock); + up_write(&__i2c_board_lock); return status; } |