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>
This commit is contained in:

committed by
Stefan Richter

parent
362c2c8ca4
commit
bbf19db37e
@@ -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;
|
||||
|
Reference in New Issue
Block a user