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;
packet->callback(packet, card, -ENODEV);
}
+static int
+dummy_cancel_packet(struct fw_card *card, struct fw_packet *packet)
+{
+ return -ENOENT;
+}
+
static int
dummy_enable_phys_dma(struct fw_card *card,
int node_id, int generation)
.update_phy_reg = dummy_update_phy_reg,
.set_config_rom = dummy_set_config_rom,
.send_request = dummy_send_request,
+ .cancel_packet = dummy_cancel_packet,
.send_response = dummy_send_response,
.enable_phys_dma = dummy_enable_phys_dma,
};