diff options
| author | Tejun Heo <htejun@gmail.com> | 2007-01-20 02:00:28 -0500 |
|---|---|---|
| committer | Jeff Garzik <jeff@garzik.org> | 2007-02-09 17:39:37 -0500 |
| commit | b878ca5d37953ad1c4578b225a13a3c3e7e743b7 (patch) | |
| tree | 5a2b3e8bf35f0eb2f2dbc760a9cc66dbb961cf0e | |
| parent | 24dc5f33ea4b504cfbd23fa159a4cacba8e4d800 (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>
| -rw-r--r-- | drivers/ata/libata-core.c | 81 | ||||
| -rw-r--r-- | include/linux/libata.h | 4 |
2 files changed, 6 insertions, 79 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 | */ | ||
| 5519 | void 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 | |||
| 5527 | void 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 | */ | ||
| 6037 | void ata_host_remove(struct ata_host *host) | ||
| 6038 | { | ||
| 6039 | ata_host_detach(host); | ||
| 6040 | devres_release_group(host->dev, ata_device_add); | ||
| 6041 | } | ||
| 6042 | |||
| 6043 | struct ata_probe_ent * | 6002 | struct ata_probe_ent * |
| 6044 | ata_probe_ent_alloc(struct device *dev, const struct ata_port_info *port) | 6003 | ata_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 | ||
| 6102 | void 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); | |||
| 6373 | EXPORT_SYMBOL_GPL(ata_host_init); | 6308 | EXPORT_SYMBOL_GPL(ata_host_init); |
| 6374 | EXPORT_SYMBOL_GPL(ata_device_add); | 6309 | EXPORT_SYMBOL_GPL(ata_device_add); |
| 6375 | EXPORT_SYMBOL_GPL(ata_host_detach); | 6310 | EXPORT_SYMBOL_GPL(ata_host_detach); |
| 6376 | EXPORT_SYMBOL_GPL(ata_host_remove); | ||
| 6377 | EXPORT_SYMBOL_GPL(ata_sg_init); | 6311 | EXPORT_SYMBOL_GPL(ata_sg_init); |
| 6378 | EXPORT_SYMBOL_GPL(ata_sg_init_one); | 6312 | EXPORT_SYMBOL_GPL(ata_sg_init_one); |
| 6379 | EXPORT_SYMBOL_GPL(ata_hsm_move); | 6313 | EXPORT_SYMBOL_GPL(ata_hsm_move); |
| @@ -6390,8 +6324,6 @@ EXPORT_SYMBOL_GPL(ata_check_status); | |||
| 6390 | EXPORT_SYMBOL_GPL(ata_altstatus); | 6324 | EXPORT_SYMBOL_GPL(ata_altstatus); |
| 6391 | EXPORT_SYMBOL_GPL(ata_exec_command); | 6325 | EXPORT_SYMBOL_GPL(ata_exec_command); |
| 6392 | EXPORT_SYMBOL_GPL(ata_port_start); | 6326 | EXPORT_SYMBOL_GPL(ata_port_start); |
| 6393 | EXPORT_SYMBOL_GPL(ata_port_stop); | ||
| 6394 | EXPORT_SYMBOL_GPL(ata_host_stop); | ||
| 6395 | EXPORT_SYMBOL_GPL(ata_interrupt); | 6327 | EXPORT_SYMBOL_GPL(ata_interrupt); |
| 6396 | EXPORT_SYMBOL_GPL(ata_mmio_data_xfer); | 6328 | EXPORT_SYMBOL_GPL(ata_mmio_data_xfer); |
| 6397 | EXPORT_SYMBOL_GPL(ata_pio_data_xfer); | 6329 | EXPORT_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 |
| 6454 | EXPORT_SYMBOL_GPL(pci_test_config_bits); | 6386 | EXPORT_SYMBOL_GPL(pci_test_config_bits); |
| 6455 | EXPORT_SYMBOL_GPL(ata_pci_host_stop); | ||
| 6456 | EXPORT_SYMBOL_GPL(ata_pci_init_native_mode); | 6387 | EXPORT_SYMBOL_GPL(ata_pci_init_native_mode); |
| 6457 | EXPORT_SYMBOL_GPL(ata_pci_init_one); | 6388 | EXPORT_SYMBOL_GPL(ata_pci_init_one); |
| 6458 | EXPORT_SYMBOL_GPL(ata_pci_remove_one); | 6389 | EXPORT_SYMBOL_GPL(ata_pci_remove_one); |
diff --git a/include/linux/libata.h b/include/linux/libata.h index f96277ed184f..cebbcc8d45fd 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
| @@ -722,7 +722,6 @@ extern int ata_device_add(const struct ata_probe_ent *ent); | |||
| 722 | extern void ata_host_detach(struct ata_host *host); | 722 | extern void ata_host_detach(struct ata_host *host); |
| 723 | extern void ata_host_init(struct ata_host *, struct device *, | 723 | extern void ata_host_init(struct ata_host *, struct device *, |
| 724 | unsigned long, const struct ata_port_operations *); | 724 | unsigned long, const struct ata_port_operations *); |
| 725 | extern void ata_host_remove(struct ata_host *host); | ||
| 726 | extern int ata_scsi_detect(struct scsi_host_template *sht); | 725 | extern int ata_scsi_detect(struct scsi_host_template *sht); |
| 727 | extern int ata_scsi_ioctl(struct scsi_device *dev, int cmd, void __user *arg); | 726 | extern int ata_scsi_ioctl(struct scsi_device *dev, int cmd, void __user *arg); |
| 728 | extern int ata_scsi_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *)); | 727 | extern int ata_scsi_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *)); |
| @@ -768,8 +767,6 @@ extern u8 ata_check_status(struct ata_port *ap); | |||
| 768 | extern u8 ata_altstatus(struct ata_port *ap); | 767 | extern u8 ata_altstatus(struct ata_port *ap); |
| 769 | extern void ata_exec_command(struct ata_port *ap, const struct ata_taskfile *tf); | 768 | extern void ata_exec_command(struct ata_port *ap, const struct ata_taskfile *tf); |
| 770 | extern int ata_port_start (struct ata_port *ap); | 769 | extern int ata_port_start (struct ata_port *ap); |
| 771 | extern void ata_port_stop (struct ata_port *ap); | ||
| 772 | extern void ata_host_stop (struct ata_host *host); | ||
| 773 | extern irqreturn_t ata_interrupt (int irq, void *dev_instance); | 770 | extern irqreturn_t ata_interrupt (int irq, void *dev_instance); |
| 774 | extern void ata_mmio_data_xfer(struct ata_device *adev, unsigned char *buf, | 771 | extern void ata_mmio_data_xfer(struct ata_device *adev, unsigned char *buf, |
| 775 | unsigned int buflen, int write_data); | 772 | unsigned int buflen, int write_data); |
| @@ -856,7 +853,6 @@ struct pci_bits { | |||
| 856 | unsigned long val; | 853 | unsigned long val; |
| 857 | }; | 854 | }; |
| 858 | 855 | ||
| 859 | extern void ata_pci_host_stop (struct ata_host *host); | ||
| 860 | extern struct ata_probe_ent * | 856 | extern struct ata_probe_ent * |
| 861 | ata_pci_init_native_mode(struct pci_dev *pdev, struct ata_port_info **port, int portmask); | 857 | ata_pci_init_native_mode(struct pci_dev *pdev, struct ata_port_info **port, int portmask); |
| 862 | extern int pci_test_config_bits(struct pci_dev *pdev, const struct pci_bits *bits); | 858 | extern int pci_test_config_bits(struct pci_dev *pdev, const struct pci_bits *bits); |
