From: Tejun Heo Date: Mon, 20 Oct 2008 04:11:56 +0000 (+0900) Subject: libata: initialize port_task when !CONFIG_ATA_SFF X-Git-Tag: v2.6.27.5~46 X-Git-Url: https://git.fsl.cs.sunysb.edu/?a=commitdiff_plain;h=052b0b637259e81fb17fbebd45db5098aef49c72;p=unionfs-2.6.39.y.git libata: initialize port_task when !CONFIG_ATA_SFF commit f667fdbbbea8bcce6cf9f7acb51b7cb4c264cc61 upstream 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 Cc: Larry Finger Signed-off-by: Jeff Garzik Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 79e3a8e7a84..8228ae3f8a1 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c @@ -5259,6 +5259,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);