* [PATCH 3/4] libata: Move ata_probe_ent_alloc to libata_core
@ 2006-08-07 19:27 Brian King
0 siblings, 0 replies; only message in thread
From: Brian King @ 2006-08-07 19:27 UTC (permalink / raw)
To: jgarzik; +Cc: linux-ide, linux-scsi, brking
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>
---
libata-dev-bjking1/drivers/scsi/libata-bmdma.c | 26 -------------------------
libata-dev-bjking1/drivers/scsi/libata-core.c | 25 ++++++++++++++++++++++++
libata-dev-bjking1/drivers/scsi/libata.h | 2 +
3 files changed, 27 insertions(+), 26 deletions(-)
diff -puN drivers/scsi/libata-bmdma.c~libata_move_probe_ent_alloc drivers/scsi/libata-bmdma.c
--- libata-dev/drivers/scsi/libata-bmdma.c~libata_move_probe_ent_alloc 2006-08-07 12:40:50.000000000 -0500
+++ libata-dev-bjking1/drivers/scsi/libata-bmdma.c 2006-08-07 12:40:50.000000000 -0500
@@ -797,32 +797,6 @@ void ata_bmdma_post_internal_cmd(struct
}
#ifdef CONFIG_PCI
-static struct ata_probe_ent *
-ata_probe_ent_alloc(struct device *dev, const struct ata_port_info *port)
-{
- struct ata_probe_ent *probe_ent;
-
- probe_ent = kzalloc(sizeof(*probe_ent), GFP_KERNEL);
- if (!probe_ent) {
- printk(KERN_ERR DRV_NAME "(%s): out of memory\n",
- kobject_name(&(dev->kobj)));
- return NULL;
- }
-
- INIT_LIST_HEAD(&probe_ent->node);
- probe_ent->dev = dev;
-
- probe_ent->sht = port->sht;
- probe_ent->host_flags = port->host_flags;
- probe_ent->pio_mask = port->pio_mask;
- probe_ent->mwdma_mask = port->mwdma_mask;
- probe_ent->udma_mask = port->udma_mask;
- probe_ent->port_ops = port->port_ops;
-
- return probe_ent;
-}
-
-
/**
* ata_pci_init_native_mode - Initialize native-mode driver
* @pdev: pci device to be initialized
diff -puN drivers/scsi/libata-core.c~libata_move_probe_ent_alloc drivers/scsi/libata-core.c
--- libata-dev/drivers/scsi/libata-core.c~libata_move_probe_ent_alloc 2006-08-07 12:40:50.000000000 -0500
+++ libata-dev-bjking1/drivers/scsi/libata-core.c 2006-08-07 12:40:50.000000000 -0500
@@ -5706,6 +5706,31 @@ int ata_scsi_release(struct Scsi_Host *h
return 1;
}
+struct ata_probe_ent *
+ata_probe_ent_alloc(struct device *dev, const struct ata_port_info *port)
+{
+ struct ata_probe_ent *probe_ent;
+
+ probe_ent = kzalloc(sizeof(*probe_ent), GFP_KERNEL);
+ if (!probe_ent) {
+ printk(KERN_ERR DRV_NAME "(%s): out of memory\n",
+ kobject_name(&(dev->kobj)));
+ return NULL;
+ }
+
+ INIT_LIST_HEAD(&probe_ent->node);
+ probe_ent->dev = dev;
+
+ probe_ent->sht = port->sht;
+ probe_ent->host_flags = port->host_flags;
+ probe_ent->pio_mask = port->pio_mask;
+ probe_ent->mwdma_mask = port->mwdma_mask;
+ probe_ent->udma_mask = port->udma_mask;
+ probe_ent->port_ops = port->port_ops;
+
+ return probe_ent;
+}
+
/**
* ata_std_ports - initialize ioaddr with standard port offsets.
* @ioaddr: IO address structure to be initialized
diff -puN drivers/scsi/libata.h~libata_move_probe_ent_alloc drivers/scsi/libata.h
--- libata-dev/drivers/scsi/libata.h~libata_move_probe_ent_alloc 2006-08-07 12:40:50.000000000 -0500
+++ libata-dev-bjking1/drivers/scsi/libata.h 2006-08-07 12:40:50.000000000 -0500
@@ -71,6 +71,8 @@ extern int ata_task_ioctl(struct scsi_de
extern int ata_cmd_ioctl(struct scsi_device *scsidev, void __user *arg);
extern void ata_port_init(struct ata_port *ap, struct ata_host_set *host_set,
const struct ata_probe_ent *ent, unsigned int port_no);
+extern struct ata_probe_ent *ata_probe_ent_alloc(struct device *dev,
+ const struct ata_port_info *port);
/* libata-scsi.c */
_
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-08-07 19:27 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-08-07 19:27 [PATCH 3/4] libata: Move ata_probe_ent_alloc to libata_core Brian King
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.