diff options
Diffstat (limited to 'drivers/firewire')
-rw-r--r-- | drivers/firewire/init_ohci1394_dma.c | 4 | ||||
-rw-r--r-- | drivers/firewire/net.c | 21 | ||||
-rw-r--r-- | drivers/firewire/sbp2.c | 4 |
3 files changed, 15 insertions, 14 deletions
diff --git a/drivers/firewire/init_ohci1394_dma.c b/drivers/firewire/init_ohci1394_dma.c index 659256927b42..48b879e9e831 100644 --- a/drivers/firewire/init_ohci1394_dma.c +++ b/drivers/firewire/init_ohci1394_dma.c @@ -251,7 +251,7 @@ static inline void __init init_ohci1394_controller(int num, int slot, int func) } /** - * debug_init_ohci1394_dma - scan for OHCI1394 controllers and init DMA on them + * init_ohci1394_dma_on_all_controllers - scan for OHCI1394 controllers and init DMA on them * Scans the whole PCI space for OHCI1394 controllers and inits DMA on them */ void __init init_ohci1394_dma_on_all_controllers(void) @@ -283,7 +283,7 @@ void __init init_ohci1394_dma_on_all_controllers(void) } /** - * setup_init_ohci1394_early - enables early OHCI1394 DMA initialization + * setup_ohci1394_dma - enables early OHCI1394 DMA initialization */ static int __init setup_ohci1394_dma(char *opt) { diff --git a/drivers/firewire/net.c b/drivers/firewire/net.c index af22be84034b..538bd677c254 100644 --- a/drivers/firewire/net.c +++ b/drivers/firewire/net.c @@ -706,21 +706,22 @@ static void fwnet_receive_packet(struct fw_card *card, struct fw_request *r, int rcode; if (destination == IEEE1394_ALL_NODES) { - kfree(r); - - return; - } - - if (offset != dev->handler.offset) + // Although the response to the broadcast packet is not necessarily required, the + // fw_send_response() function should still be called to maintain the reference + // counting of the object. In the case, the call of function just releases the + // object as a result to decrease the reference counting. + rcode = RCODE_COMPLETE; + } else if (offset != dev->handler.offset) { rcode = RCODE_ADDRESS_ERROR; - else if (tcode != TCODE_WRITE_BLOCK_REQUEST) + } else if (tcode != TCODE_WRITE_BLOCK_REQUEST) { rcode = RCODE_TYPE_ERROR; - else if (fwnet_incoming_packet(dev, payload, length, - source, generation, false) != 0) { + } else if (fwnet_incoming_packet(dev, payload, length, + source, generation, false) != 0) { dev_err(&dev->netdev->dev, "incoming packet failure\n"); rcode = RCODE_CONFLICT_ERROR; - } else + } else { rcode = RCODE_COMPLETE; + } fw_send_response(card, r, rcode); } diff --git a/drivers/firewire/sbp2.c b/drivers/firewire/sbp2.c index 60051c0cabea..26db5b8dfc1e 100644 --- a/drivers/firewire/sbp2.c +++ b/drivers/firewire/sbp2.c @@ -1117,7 +1117,7 @@ static void sbp2_init_workarounds(struct sbp2_target *tgt, u32 model, tgt->workarounds = w; } -static struct scsi_host_template scsi_driver_template; +static const struct scsi_host_template scsi_driver_template; static void sbp2_remove(struct fw_unit *unit); static int sbp2_probe(struct fw_unit *unit, const struct ieee1394_device_id *id) @@ -1586,7 +1586,7 @@ static struct attribute *sbp2_scsi_sysfs_attrs[] = { ATTRIBUTE_GROUPS(sbp2_scsi_sysfs); -static struct scsi_host_template scsi_driver_template = { +static const struct scsi_host_template scsi_driver_template = { .module = THIS_MODULE, .name = "SBP-2 IEEE-1394", .proc_name = "sbp2", |