aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/libata-core.c
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2007-01-20 02:00:28 -0500
committerJeff Garzik <jeff@garzik.org>2007-02-09 17:39:37 -0500
commitb878ca5d37953ad1c4578b225a13a3c3e7e743b7 (patch)
tree5a2b3e8bf35f0eb2f2dbc760a9cc66dbb961cf0e /drivers/ata/libata-core.c
parent24dc5f33ea4b504cfbd23fa159a4cacba8e4d800 (diff)
libata: remove unused functions
Now that all LLDs are converted to use devres, default stop callbacks are unused. Remove them. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/ata/libata-core.c')
-rw-r--r--drivers/ata/libata-core.c81
1 files changed, 6 insertions, 75 deletions
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 20b2409a0d20..b3091de894c2 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -5506,31 +5506,6 @@ int ata_port_start(struct ata_port *ap)
5506} 5506}
5507 5507
5508/** 5508/**
5509 * ata_port_stop - Undo ata_port_start()
5510 * @ap: Port to shut down
5511 *
5512 * Frees the PRD table.
5513 *
5514 * May be used as the port_stop() entry in ata_port_operations.
5515 *
5516 * LOCKING:
5517 * Inherited from caller.
5518 */
5519void ata_port_stop (struct ata_port *ap)
5520{
5521 struct device *dev = ap->dev;
5522
5523 dmam_free_coherent(dev, ATA_PRD_TBL_SZ, ap->prd, ap->prd_dma);
5524 ata_pad_free(ap, dev);
5525}
5526
5527void ata_host_stop (struct ata_host *host)
5528{
5529 if (host->mmio_base)
5530 iounmap(host->mmio_base);
5531}
5532
5533/**
5534 * ata_dev_init - Initialize an ata_device structure 5509 * ata_dev_init - Initialize an ata_device structure
5535 * @dev: Device structure to initialize 5510 * @dev: Device structure to initialize
5536 * 5511 *
@@ -5869,7 +5844,7 @@ int ata_device_add(const struct ata_probe_ent *ent)
5869 } 5844 }
5870 5845
5871 /* resource acquisition complete */ 5846 /* resource acquisition complete */
5872 devres_close_group(dev, ata_device_add); 5847 devres_remove_group(dev, ata_device_add);
5873 5848
5874 /* perform each probe synchronously */ 5849 /* perform each probe synchronously */
5875 DPRINTK("probe begin\n"); 5850 DPRINTK("probe begin\n");
@@ -6024,22 +5999,6 @@ void ata_host_detach(struct ata_host *host)
6024 ata_port_detach(host->ports[i]); 5999 ata_port_detach(host->ports[i]);
6025} 6000}
6026 6001
6027/**
6028 * ata_host_remove - PCI layer callback for device removal
6029 * @host: ATA host set that was removed
6030 *
6031 * Unregister all objects associated with this host set. Free those
6032 * objects.
6033 *
6034 * LOCKING:
6035 * Inherited from calling layer (may sleep).
6036 */
6037void ata_host_remove(struct ata_host *host)
6038{
6039 ata_host_detach(host);
6040 devres_release_group(host->dev, ata_device_add);
6041}
6042
6043struct ata_probe_ent * 6002struct ata_probe_ent *
6044ata_probe_ent_alloc(struct device *dev, const struct ata_port_info *port) 6003ata_probe_ent_alloc(struct device *dev, const struct ata_port_info *port)
6045{ 6004{
@@ -6099,26 +6058,13 @@ void ata_std_ports(struct ata_ioports *ioaddr)
6099 6058
6100#ifdef CONFIG_PCI 6059#ifdef CONFIG_PCI
6101 6060
6102void ata_pci_host_stop (struct ata_host *host)
6103{
6104 struct pci_dev *pdev = to_pci_dev(host->dev);
6105
6106 /* XXX - the following if can go away once all LLDs are managed */
6107 if (!list_empty(&host->dev->devres_head))
6108 pcim_iounmap(pdev, host->mmio_base);
6109 else
6110 pci_iounmap(pdev, host->mmio_base);
6111}
6112
6113/** 6061/**
6114 * ata_pci_remove_one - PCI layer callback for device removal 6062 * ata_pci_remove_one - PCI layer callback for device removal
6115 * @pdev: PCI device that was removed 6063 * @pdev: PCI device that was removed
6116 * 6064 *
6117 * PCI layer indicates to libata via this hook that 6065 * PCI layer indicates to libata via this hook that hot-unplug or
6118 * hot-unplug or module unload event has occurred. 6066 * module unload event has occurred. Detach all ports. Resource
6119 * Handle this by unregistering all objects associated 6067 * release is handled via devres.
6120 * with this PCI device. Free those objects. Then finally
6121 * release PCI resources and disable device.
6122 * 6068 *
6123 * LOCKING: 6069 * LOCKING:
6124 * Inherited from PCI layer (may sleep). 6070 * Inherited from PCI layer (may sleep).
@@ -6128,14 +6074,7 @@ void ata_pci_remove_one(struct pci_dev *pdev)
6128 struct device *dev = pci_dev_to_dev(pdev); 6074 struct device *dev = pci_dev_to_dev(pdev);
6129 struct ata_host *host = dev_get_drvdata(dev); 6075 struct ata_host *host = dev_get_drvdata(dev);
6130 6076
6131 /* XXX - the following if can go away once all LLDs are managed */ 6077 ata_host_detach(host);
6132 if (!list_empty(&host->dev->devres_head)) {
6133 ata_host_remove(host);
6134 pci_release_regions(pdev);
6135 pci_disable_device(pdev);
6136 dev_set_drvdata(dev, NULL);
6137 } else
6138 ata_host_detach(host);
6139} 6078}
6140 6079
6141/* move to PCI subsystem */ 6080/* move to PCI subsystem */
@@ -6189,11 +6128,7 @@ int ata_pci_device_do_resume(struct pci_dev *pdev)
6189 pci_set_power_state(pdev, PCI_D0); 6128 pci_set_power_state(pdev, PCI_D0);
6190 pci_restore_state(pdev); 6129 pci_restore_state(pdev);
6191 6130
6192 /* XXX - the following if can go away once all LLDs are managed */ 6131 rc = pcim_enable_device(pdev);
6193 if (!list_empty(&pdev->dev.devres_head))
6194 rc = pcim_enable_device(pdev);
6195 else
6196 rc = pci_enable_device(pdev);
6197 if (rc) { 6132 if (rc) {
6198 dev_printk(KERN_ERR, &pdev->dev, 6133 dev_printk(KERN_ERR, &pdev->dev,
6199 "failed to enable device after resume (%d)\n", rc); 6134 "failed to enable device after resume (%d)\n", rc);
@@ -6373,7 +6308,6 @@ EXPORT_SYMBOL_GPL(ata_std_ports);
6373EXPORT_SYMBOL_GPL(ata_host_init); 6308EXPORT_SYMBOL_GPL(ata_host_init);
6374EXPORT_SYMBOL_GPL(ata_device_add); 6309EXPORT_SYMBOL_GPL(ata_device_add);
6375EXPORT_SYMBOL_GPL(ata_host_detach); 6310EXPORT_SYMBOL_GPL(ata_host_detach);
6376EXPORT_SYMBOL_GPL(ata_host_remove);
6377EXPORT_SYMBOL_GPL(ata_sg_init); 6311EXPORT_SYMBOL_GPL(ata_sg_init);
6378EXPORT_SYMBOL_GPL(ata_sg_init_one); 6312EXPORT_SYMBOL_GPL(ata_sg_init_one);
6379EXPORT_SYMBOL_GPL(ata_hsm_move); 6313EXPORT_SYMBOL_GPL(ata_hsm_move);
@@ -6390,8 +6324,6 @@ EXPORT_SYMBOL_GPL(ata_check_status);
6390EXPORT_SYMBOL_GPL(ata_altstatus); 6324EXPORT_SYMBOL_GPL(ata_altstatus);
6391EXPORT_SYMBOL_GPL(ata_exec_command); 6325EXPORT_SYMBOL_GPL(ata_exec_command);
6392EXPORT_SYMBOL_GPL(ata_port_start); 6326EXPORT_SYMBOL_GPL(ata_port_start);
6393EXPORT_SYMBOL_GPL(ata_port_stop);
6394EXPORT_SYMBOL_GPL(ata_host_stop);
6395EXPORT_SYMBOL_GPL(ata_interrupt); 6327EXPORT_SYMBOL_GPL(ata_interrupt);
6396EXPORT_SYMBOL_GPL(ata_mmio_data_xfer); 6328EXPORT_SYMBOL_GPL(ata_mmio_data_xfer);
6397EXPORT_SYMBOL_GPL(ata_pio_data_xfer); 6329EXPORT_SYMBOL_GPL(ata_pio_data_xfer);
@@ -6452,7 +6384,6 @@ EXPORT_SYMBOL_GPL(ata_timing_merge);
6452 6384
6453#ifdef CONFIG_PCI 6385#ifdef CONFIG_PCI
6454EXPORT_SYMBOL_GPL(pci_test_config_bits); 6386EXPORT_SYMBOL_GPL(pci_test_config_bits);
6455EXPORT_SYMBOL_GPL(ata_pci_host_stop);
6456EXPORT_SYMBOL_GPL(ata_pci_init_native_mode); 6387EXPORT_SYMBOL_GPL(ata_pci_init_native_mode);
6457EXPORT_SYMBOL_GPL(ata_pci_init_one); 6388EXPORT_SYMBOL_GPL(ata_pci_init_one);
6458EXPORT_SYMBOL_GPL(ata_pci_remove_one); 6389EXPORT_SYMBOL_GPL(ata_pci_remove_one);