diff options
author | Brian King <brking@us.ibm.com> | 2006-08-07 15:27:24 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-08-09 00:08:38 -0400 |
commit | f6d950e2a5209bd7e3fb1a238f43f24f3697f5b0 (patch) | |
tree | acdcb6deba03af3255c6e4bd76593ffa570e1698 | |
parent | 155a8a9c8f4084016d9e27bf03ba1f19201438f4 (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>
-rw-r--r-- | drivers/scsi/libata-bmdma.c | 26 | ||||
-rw-r--r-- | drivers/scsi/libata-core.c | 25 | ||||
-rw-r--r-- | drivers/scsi/libata.h | 2 |
3 files changed, 27 insertions, 26 deletions
diff --git a/drivers/scsi/libata-bmdma.c b/drivers/scsi/libata-bmdma.c index 9ce221f25954..3268cf5375ea 100644 --- a/drivers/scsi/libata-bmdma.c +++ b/drivers/scsi/libata-bmdma.c | |||
@@ -797,32 +797,6 @@ void ata_bmdma_post_internal_cmd(struct ata_queued_cmd *qc) | |||
797 | } | 797 | } |
798 | 798 | ||
799 | #ifdef CONFIG_PCI | 799 | #ifdef CONFIG_PCI |
800 | static struct ata_probe_ent * | ||
801 | ata_probe_ent_alloc(struct device *dev, const struct ata_port_info *port) | ||
802 | { | ||
803 | struct ata_probe_ent *probe_ent; | ||
804 | |||
805 | probe_ent = kzalloc(sizeof(*probe_ent), GFP_KERNEL); | ||
806 | if (!probe_ent) { | ||
807 | printk(KERN_ERR DRV_NAME "(%s): out of memory\n", | ||
808 | kobject_name(&(dev->kobj))); | ||
809 | return NULL; | ||
810 | } | ||
811 | |||
812 | INIT_LIST_HEAD(&probe_ent->node); | ||
813 | probe_ent->dev = dev; | ||
814 | |||
815 | probe_ent->sht = port->sht; | ||
816 | probe_ent->host_flags = port->host_flags; | ||
817 | probe_ent->pio_mask = port->pio_mask; | ||
818 | probe_ent->mwdma_mask = port->mwdma_mask; | ||
819 | probe_ent->udma_mask = port->udma_mask; | ||
820 | probe_ent->port_ops = port->port_ops; | ||
821 | |||
822 | return probe_ent; | ||
823 | } | ||
824 | |||
825 | |||
826 | /** | 800 | /** |
827 | * ata_pci_init_native_mode - Initialize native-mode driver | 801 | * ata_pci_init_native_mode - Initialize native-mode driver |
828 | * @pdev: pci device to be initialized | 802 | * @pdev: pci device to be initialized |
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 | ||
5691 | struct ata_probe_ent * | ||
5692 | ata_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 |
diff --git a/drivers/scsi/libata.h b/drivers/scsi/libata.h index b38aa4a286be..0b7a37c2785d 100644 --- a/drivers/scsi/libata.h +++ b/drivers/scsi/libata.h | |||
@@ -71,6 +71,8 @@ extern int ata_task_ioctl(struct scsi_device *scsidev, void __user *arg); | |||
71 | extern int ata_cmd_ioctl(struct scsi_device *scsidev, void __user *arg); | 71 | extern int ata_cmd_ioctl(struct scsi_device *scsidev, void __user *arg); |
72 | extern void ata_port_init(struct ata_port *ap, struct ata_host_set *host_set, | 72 | extern void ata_port_init(struct ata_port *ap, struct ata_host_set *host_set, |
73 | const struct ata_probe_ent *ent, unsigned int port_no); | 73 | const struct ata_probe_ent *ent, unsigned int port_no); |
74 | extern struct ata_probe_ent *ata_probe_ent_alloc(struct device *dev, | ||
75 | const struct ata_port_info *port); | ||
74 | 76 | ||
75 | 77 | ||
76 | /* libata-scsi.c */ | 78 | /* libata-scsi.c */ |