libata: initialize port_task when !CONFIG_ATA_SFF
authorTejun Heo <tj@kernel.org>
Mon, 20 Oct 2008 04:11:56 +0000 (13:11 +0900)
committerJeff Garzik <jgarzik@redhat.com>
Thu, 23 Oct 2008 00:40:01 +0000 (20:40 -0400)
ap->port_task was not initialized if !CONFIG_ATA_SFF later triggering
lockdep warning.  Make sure it's initialized.

Reported by Larry Finger.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
drivers/ata/libata-core.c

index 1ee9499bd343717ca95252a775c01d77ef3f892f..bbb3cae57492eb793b0b9944a57cf0a08be62ff5 100644 (file)
@@ -5373,6 +5373,8 @@ struct ata_port *ata_port_alloc(struct ata_host *host)
 
 #ifdef CONFIG_ATA_SFF
        INIT_DELAYED_WORK(&ap->port_task, ata_pio_task);
+#else
+       INIT_DELAYED_WORK(&ap->port_task, NULL);
 #endif
        INIT_DELAYED_WORK(&ap->hotplug_task, ata_scsi_hotplug);
        INIT_WORK(&ap->scsi_rescan_task, ata_scsi_dev_rescan);