aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/libata-core.c
diff options
context:
space:
mode:
authorBrian King <brking@us.ibm.com>2006-08-07 15:27:24 -0400
committerJeff Garzik <jeff@garzik.org>2006-08-09 00:08:38 -0400
commitf6d950e2a5209bd7e3fb1a238f43f24f3697f5b0 (patch)
treeacdcb6deba03af3255c6e4bd76593ffa570e1698 /drivers/scsi/libata-core.c
parent155a8a9c8f4084016d9e27bf03ba1f19201438f4 (diff)
[PATCH] libata: Move ata_probe_ent_alloc to libata_core
Move ata_probe_ent_alloc to libata-core. It will also be used by future SAS/SATA integration patches. Signed-off-by: Brian King <brking@us.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/scsi/libata-core.c')
-rw-r--r--drivers/scsi/libata-core.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c
index f553c9dd962d..dc35cccd2898 100644
--- a/drivers/scsi/libata-core.c
+++ b/drivers/scsi/libata-core.c
@@ -5688,6 +5688,31 @@ int ata_scsi_release(struct Scsi_Host *host)
5688 return 1; 5688 return 1;
5689} 5689}
5690 5690
5691struct ata_probe_ent *
5692ata_probe_ent_alloc(struct device *dev, const struct ata_port_info *port)
5693{
5694 struct ata_probe_ent *probe_ent;
5695
5696 probe_ent = kzalloc(sizeof(*probe_ent), GFP_KERNEL);
5697 if (!probe_ent) {
5698 printk(KERN_ERR DRV_NAME "(%s): out of memory\n",
5699 kobject_name(&(dev->kobj)));
5700 return NULL;
5701 }
5702
5703 INIT_LIST_HEAD(&probe_ent->node);
5704 probe_ent->dev = dev;
5705
5706 probe_ent->sht = port->sht;
5707 probe_ent->host_flags = port->host_flags;
5708 probe_ent->pio_mask = port->pio_mask;
5709 probe_ent->mwdma_mask = port->mwdma_mask;
5710 probe_ent->udma_mask = port->udma_mask;
5711 probe_ent->port_ops = port->port_ops;
5712
5713 return probe_ent;
5714}
5715
5691/** 5716/**
5692 * ata_std_ports - initialize ioaddr with standard port offsets. 5717 * ata_std_ports - initialize ioaddr with standard port offsets.
5693 * @ioaddr: IO address structure to be initialized 5718 * @ioaddr: IO address structure to be initialized