diff options
author | Kristian Høgsberg <krh@redhat.com> | 2007-04-17 17:51:57 +0200 |
---|---|---|
committer | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2007-04-17 21:14:32 +0200 |
commit | dde2b954302d143deee6dbd931ba2aa21413bb0a (patch) | |
tree | 783ecd8fffecaae521540ad533c5aeb343778ac0 /drivers/firewire/fw-card.c | |
parent | firewire: Do an agent reset on error recovery. (diff) | |
download | linux-dde2b954302d143deee6dbd931ba2aa21413bb0a.tar.xz linux-dde2b954302d143deee6dbd931ba2aa21413bb0a.zip |
firewire: Don't use subsystem rwsem, it's going away.
Signed-off-by: Kristian Høgsberg <krh@redhat.com>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'drivers/firewire/fw-card.c')
-rw-r--r-- | drivers/firewire/fw-card.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/drivers/firewire/fw-card.c b/drivers/firewire/fw-card.c index 3eb06556a0c1..a2de680d9d52 100644 --- a/drivers/firewire/fw-card.c +++ b/drivers/firewire/fw-card.c @@ -22,6 +22,7 @@ #include <linux/module.h> #include <linux/errno.h> #include <linux/device.h> +#include <linux/rwsem.h> #include "fw-transaction.h" #include "fw-topology.h" #include "fw-device.h" @@ -49,6 +50,7 @@ crc16_itu_t(const u32 *buffer, size_t length) return crc; } +static DECLARE_RWSEM(card_rwsem); static LIST_HEAD(card_list); static LIST_HEAD(descriptor_list); @@ -162,7 +164,7 @@ fw_core_add_descriptor (struct fw_descriptor *desc) if (i != desc->length) return -EINVAL; - down_write(&fw_bus_type.subsys.rwsem); + down_write(&card_rwsem); list_add_tail (&desc->link, &descriptor_list); descriptor_count++; @@ -170,7 +172,7 @@ fw_core_add_descriptor (struct fw_descriptor *desc) descriptor_count++; update_config_roms(); - up_write(&fw_bus_type.subsys.rwsem); + up_write(&card_rwsem); return 0; } @@ -179,7 +181,7 @@ EXPORT_SYMBOL(fw_core_add_descriptor); void fw_core_remove_descriptor (struct fw_descriptor *desc) { - down_write(&fw_bus_type.subsys.rwsem); + down_write(&card_rwsem); list_del(&desc->link); descriptor_count--; @@ -187,7 +189,7 @@ fw_core_remove_descriptor (struct fw_descriptor *desc) descriptor_count--; update_config_roms(); - up_write(&fw_bus_type.subsys.rwsem); + up_write(&card_rwsem); } EXPORT_SYMBOL(fw_core_remove_descriptor); @@ -404,10 +406,10 @@ fw_card_add(struct fw_card *card, * drops it when the driver calls fw_core_remove_card. */ fw_card_get(card); - down_write(&fw_bus_type.subsys.rwsem); + down_write(&card_rwsem); config_rom = generate_config_rom (card, &length); list_add_tail(&card->link, &card_list); - up_write(&fw_bus_type.subsys.rwsem); + up_write(&card_rwsem); return card->driver->enable(card, config_rom, length); } @@ -487,9 +489,9 @@ fw_core_remove_card(struct fw_card *card) PHY_LINK_ACTIVE | PHY_CONTENDER, 0); fw_core_initiate_bus_reset(card, 1); - down_write(&fw_bus_type.subsys.rwsem); + down_write(&card_rwsem); list_del(&card->link); - up_write(&fw_bus_type.subsys.rwsem); + up_write(&card_rwsem); /* Set up the dummy driver. */ card->driver = &dummy_driver; |