diff options
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 f785b100528..3f8661a52ac 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; |