diff options
author | Kristian Høgsberg <krh@redhat.com> | 2007-02-06 14:49:38 -0500 |
---|---|---|
committer | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2007-03-09 22:02:54 +0100 |
commit | bbf19db37e8be3fa6d6fe3e26e50da068b44a0e8 (patch) | |
tree | d324cb9e52aeea485ce1c6293c51800bb4e4deeb /drivers/firewire/fw-card.c | |
parent | 362c2c8ca4a2f33f6e23a85c3b4caf64f1ce4bf9 (diff) | |
download | blackbird-op-linux-bbf19db37e8be3fa6d6fe3e26e50da068b44a0e8.tar.gz blackbird-op-linux-bbf19db37e8be3fa6d6fe3e26e50da068b44a0e8.zip |
firewire: Use atomic_t's for serial numbers.
Signed-off-by: Kristian Høgsberg <krh@redhat.com>
Use atomic_inc_return.
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 | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/firewire/fw-card.c b/drivers/firewire/fw-card.c index f785b1005284..3f8661a52acc 100644 --- a/drivers/firewire/fw-card.c +++ b/drivers/firewire/fw-card.c @@ -367,9 +367,9 @@ void fw_card_initialize(struct fw_card *card, const struct fw_card_driver *driver, struct device *device) { - static int index; + static atomic_t index = ATOMIC_INIT(-1); - card->index = index++; + card->index = atomic_inc_return(&index); card->driver = driver; card->device = device; card->current_tlabel = 0; |