diff options
Diffstat (limited to 'drivers/firewire/fw-device.c')
-rw-r--r-- | drivers/firewire/fw-device.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/firewire/fw-device.c b/drivers/firewire/fw-device.c index 4ea8d4d08a61..85b6f2cfa414 100644 --- a/drivers/firewire/fw-device.c +++ b/drivers/firewire/fw-device.c | |||
@@ -494,7 +494,7 @@ static void fw_device_init(struct work_struct *work) | |||
494 | * necessary. We have to use the atomic cmpxchg here to avoid | 494 | * necessary. We have to use the atomic cmpxchg here to avoid |
495 | * racing with the FW_NODE_DESTROYED case in | 495 | * racing with the FW_NODE_DESTROYED case in |
496 | * fw_node_event(). */ | 496 | * fw_node_event(). */ |
497 | if (cmpxchg(&device->state, | 497 | if (atomic_cmpxchg(&device->state, |
498 | FW_DEVICE_INITIALIZING, | 498 | FW_DEVICE_INITIALIZING, |
499 | FW_DEVICE_RUNNING) == FW_DEVICE_SHUTDOWN) | 499 | FW_DEVICE_RUNNING) == FW_DEVICE_SHUTDOWN) |
500 | fw_device_shutdown(&device->work.work); | 500 | fw_device_shutdown(&device->work.work); |
@@ -551,7 +551,7 @@ void fw_node_event(struct fw_card *card, struct fw_node *node, int event) | |||
551 | * device_for_each_child() in FW_NODE_UPDATED is | 551 | * device_for_each_child() in FW_NODE_UPDATED is |
552 | * doesn't freak out. */ | 552 | * doesn't freak out. */ |
553 | device_initialize(&device->device); | 553 | device_initialize(&device->device); |
554 | device->state = FW_DEVICE_INITIALIZING; | 554 | atomic_set(&device->state, FW_DEVICE_INITIALIZING); |
555 | device->card = fw_card_get(card); | 555 | device->card = fw_card_get(card); |
556 | device->node = fw_node_get(node); | 556 | device->node = fw_node_get(node); |
557 | device->node_id = node->node_id; | 557 | device->node_id = node->node_id; |
@@ -596,7 +596,7 @@ void fw_node_event(struct fw_card *card, struct fw_node *node, int event) | |||
596 | * the device in shutdown state to have that code fail | 596 | * the device in shutdown state to have that code fail |
597 | * to create the device. */ | 597 | * to create the device. */ |
598 | device = node->data; | 598 | device = node->data; |
599 | if (xchg(&device->state, | 599 | if (atomic_xchg(&device->state, |
600 | FW_DEVICE_SHUTDOWN) == FW_DEVICE_RUNNING) { | 600 | FW_DEVICE_SHUTDOWN) == FW_DEVICE_RUNNING) { |
601 | INIT_DELAYED_WORK(&device->work, fw_device_shutdown); | 601 | INIT_DELAYED_WORK(&device->work, fw_device_shutdown); |
602 | schedule_delayed_work(&device->work, 0); | 602 | schedule_delayed_work(&device->work, 0); |