提交 a52fbcfc 编写于 作者: B Bartlomiej Zolnierkiewicz 提交者: Jens Axboe

ata: move EXPORT_SYMBOL_GPL()s close to exported code

Move EXPORT_SYMBOL_GPL()s close to exported code like it is
done in other kernel subsystems. As a nice side effect this
results in the removal of few ifdefs.
Reviewed-by: NChristoph Hellwig <hch@lst.de>
Signed-off-by: NBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: NJens Axboe <axboe@kernel.dk>
上级 c8fa4f8e
此差异已折叠。
...@@ -180,6 +180,7 @@ void __ata_ehi_push_desc(struct ata_eh_info *ehi, const char *fmt, ...) ...@@ -180,6 +180,7 @@ void __ata_ehi_push_desc(struct ata_eh_info *ehi, const char *fmt, ...)
__ata_ehi_pushv_desc(ehi, fmt, args); __ata_ehi_pushv_desc(ehi, fmt, args);
va_end(args); va_end(args);
} }
EXPORT_SYMBOL_GPL(__ata_ehi_push_desc);
/** /**
* ata_ehi_push_desc - push error description with separator * ata_ehi_push_desc - push error description with separator
...@@ -203,6 +204,7 @@ void ata_ehi_push_desc(struct ata_eh_info *ehi, const char *fmt, ...) ...@@ -203,6 +204,7 @@ void ata_ehi_push_desc(struct ata_eh_info *ehi, const char *fmt, ...)
__ata_ehi_pushv_desc(ehi, fmt, args); __ata_ehi_pushv_desc(ehi, fmt, args);
va_end(args); va_end(args);
} }
EXPORT_SYMBOL_GPL(ata_ehi_push_desc);
/** /**
* ata_ehi_clear_desc - clean error description * ata_ehi_clear_desc - clean error description
...@@ -218,6 +220,7 @@ void ata_ehi_clear_desc(struct ata_eh_info *ehi) ...@@ -218,6 +220,7 @@ void ata_ehi_clear_desc(struct ata_eh_info *ehi)
ehi->desc[0] = '\0'; ehi->desc[0] = '\0';
ehi->desc_len = 0; ehi->desc_len = 0;
} }
EXPORT_SYMBOL_GPL(ata_ehi_clear_desc);
/** /**
* ata_port_desc - append port description * ata_port_desc - append port description
...@@ -245,9 +248,9 @@ void ata_port_desc(struct ata_port *ap, const char *fmt, ...) ...@@ -245,9 +248,9 @@ void ata_port_desc(struct ata_port *ap, const char *fmt, ...)
__ata_ehi_pushv_desc(&ap->link.eh_info, fmt, args); __ata_ehi_pushv_desc(&ap->link.eh_info, fmt, args);
va_end(args); va_end(args);
} }
EXPORT_SYMBOL_GPL(ata_port_desc);
#ifdef CONFIG_PCI #ifdef CONFIG_PCI
/** /**
* ata_port_pbar_desc - append PCI BAR description * ata_port_pbar_desc - append PCI BAR description
* @ap: target ATA port * @ap: target ATA port
...@@ -284,7 +287,7 @@ void ata_port_pbar_desc(struct ata_port *ap, int bar, ssize_t offset, ...@@ -284,7 +287,7 @@ void ata_port_pbar_desc(struct ata_port *ap, int bar, ssize_t offset,
ata_port_desc(ap, "%s 0x%llx", name, ata_port_desc(ap, "%s 0x%llx", name,
start + (unsigned long long)offset); start + (unsigned long long)offset);
} }
EXPORT_SYMBOL_GPL(ata_port_pbar_desc);
#endif /* CONFIG_PCI */ #endif /* CONFIG_PCI */
static int ata_lookup_timeout_table(u8 cmd) static int ata_lookup_timeout_table(u8 cmd)
...@@ -969,6 +972,7 @@ void ata_port_schedule_eh(struct ata_port *ap) ...@@ -969,6 +972,7 @@ void ata_port_schedule_eh(struct ata_port *ap)
/* see: ata_std_sched_eh, unless you know better */ /* see: ata_std_sched_eh, unless you know better */
ap->ops->sched_eh(ap); ap->ops->sched_eh(ap);
} }
EXPORT_SYMBOL_GPL(ata_port_schedule_eh);
static int ata_do_link_abort(struct ata_port *ap, struct ata_link *link) static int ata_do_link_abort(struct ata_port *ap, struct ata_link *link)
{ {
...@@ -1011,6 +1015,7 @@ int ata_link_abort(struct ata_link *link) ...@@ -1011,6 +1015,7 @@ int ata_link_abort(struct ata_link *link)
{ {
return ata_do_link_abort(link->ap, link); return ata_do_link_abort(link->ap, link);
} }
EXPORT_SYMBOL_GPL(ata_link_abort);
/** /**
* ata_port_abort - abort all qc's on the port * ata_port_abort - abort all qc's on the port
...@@ -1028,6 +1033,7 @@ int ata_port_abort(struct ata_port *ap) ...@@ -1028,6 +1033,7 @@ int ata_port_abort(struct ata_port *ap)
{ {
return ata_do_link_abort(ap, NULL); return ata_do_link_abort(ap, NULL);
} }
EXPORT_SYMBOL_GPL(ata_port_abort);
/** /**
* __ata_port_freeze - freeze port * __ata_port_freeze - freeze port
...@@ -1084,6 +1090,7 @@ int ata_port_freeze(struct ata_port *ap) ...@@ -1084,6 +1090,7 @@ int ata_port_freeze(struct ata_port *ap)
return nr_aborted; return nr_aborted;
} }
EXPORT_SYMBOL_GPL(ata_port_freeze);
/** /**
* sata_async_notification - SATA async notification handler * sata_async_notification - SATA async notification handler
...@@ -1157,6 +1164,7 @@ int sata_async_notification(struct ata_port *ap) ...@@ -1157,6 +1164,7 @@ int sata_async_notification(struct ata_port *ap)
return 0; return 0;
} }
} }
EXPORT_SYMBOL_GPL(sata_async_notification);
/** /**
* ata_eh_freeze_port - EH helper to freeze port * ata_eh_freeze_port - EH helper to freeze port
...@@ -1178,6 +1186,7 @@ void ata_eh_freeze_port(struct ata_port *ap) ...@@ -1178,6 +1186,7 @@ void ata_eh_freeze_port(struct ata_port *ap)
__ata_port_freeze(ap); __ata_port_freeze(ap);
spin_unlock_irqrestore(ap->lock, flags); spin_unlock_irqrestore(ap->lock, flags);
} }
EXPORT_SYMBOL_GPL(ata_eh_freeze_port);
/** /**
* ata_port_thaw_port - EH helper to thaw port * ata_port_thaw_port - EH helper to thaw port
...@@ -1206,6 +1215,7 @@ void ata_eh_thaw_port(struct ata_port *ap) ...@@ -1206,6 +1215,7 @@ void ata_eh_thaw_port(struct ata_port *ap)
DPRINTK("ata%u port thawed\n", ap->print_id); DPRINTK("ata%u port thawed\n", ap->print_id);
} }
EXPORT_SYMBOL_GPL(ata_eh_thaw_port);
static void ata_eh_scsidone(struct scsi_cmnd *scmd) static void ata_eh_scsidone(struct scsi_cmnd *scmd)
{ {
...@@ -1240,6 +1250,7 @@ void ata_eh_qc_complete(struct ata_queued_cmd *qc) ...@@ -1240,6 +1250,7 @@ void ata_eh_qc_complete(struct ata_queued_cmd *qc)
scmd->retries = scmd->allowed; scmd->retries = scmd->allowed;
__ata_eh_qc_complete(qc); __ata_eh_qc_complete(qc);
} }
EXPORT_SYMBOL_GPL(ata_eh_qc_complete);
/** /**
* ata_eh_qc_retry - Tell midlayer to retry an ATA command after EH * ata_eh_qc_retry - Tell midlayer to retry an ATA command after EH
...@@ -1259,6 +1270,7 @@ void ata_eh_qc_retry(struct ata_queued_cmd *qc) ...@@ -1259,6 +1270,7 @@ void ata_eh_qc_retry(struct ata_queued_cmd *qc)
scmd->allowed++; scmd->allowed++;
__ata_eh_qc_complete(qc); __ata_eh_qc_complete(qc);
} }
EXPORT_SYMBOL_GPL(ata_eh_qc_retry);
/** /**
* ata_dev_disable - disable ATA device * ata_dev_disable - disable ATA device
...@@ -1285,6 +1297,7 @@ void ata_dev_disable(struct ata_device *dev) ...@@ -1285,6 +1297,7 @@ void ata_dev_disable(struct ata_device *dev)
*/ */
ata_ering_clear(&dev->ering); ata_ering_clear(&dev->ering);
} }
EXPORT_SYMBOL_GPL(ata_dev_disable);
/** /**
* ata_eh_detach_dev - detach ATA device * ata_eh_detach_dev - detach ATA device
...@@ -1727,6 +1740,7 @@ void ata_eh_analyze_ncq_error(struct ata_link *link) ...@@ -1727,6 +1740,7 @@ void ata_eh_analyze_ncq_error(struct ata_link *link)
ehc->i.err_mask &= ~AC_ERR_DEV; ehc->i.err_mask &= ~AC_ERR_DEV;
} }
EXPORT_SYMBOL_GPL(ata_eh_analyze_ncq_error);
/** /**
* ata_eh_analyze_tf - analyze taskfile of a failed qc * ata_eh_analyze_tf - analyze taskfile of a failed qc
...@@ -4027,6 +4041,7 @@ void ata_do_eh(struct ata_port *ap, ata_prereset_fn_t prereset, ...@@ -4027,6 +4041,7 @@ void ata_do_eh(struct ata_port *ap, ata_prereset_fn_t prereset,
ata_eh_finish(ap); ata_eh_finish(ap);
} }
EXPORT_SYMBOL_GPL(ata_do_eh);
/** /**
* ata_std_error_handler - standard error handler * ata_std_error_handler - standard error handler
...@@ -4048,6 +4063,7 @@ void ata_std_error_handler(struct ata_port *ap) ...@@ -4048,6 +4063,7 @@ void ata_std_error_handler(struct ata_port *ap)
ata_do_eh(ap, ops->prereset, ops->softreset, hardreset, ops->postreset); ata_do_eh(ap, ops->prereset, ops->softreset, hardreset, ops->postreset);
} }
EXPORT_SYMBOL_GPL(ata_std_error_handler);
#ifdef CONFIG_PM #ifdef CONFIG_PM
/** /**
......
...@@ -502,6 +502,7 @@ int ata_std_bios_param(struct scsi_device *sdev, struct block_device *bdev, ...@@ -502,6 +502,7 @@ int ata_std_bios_param(struct scsi_device *sdev, struct block_device *bdev,
return 0; return 0;
} }
EXPORT_SYMBOL_GPL(ata_std_bios_param);
/** /**
* ata_scsi_unlock_native_capacity - unlock native capacity * ata_scsi_unlock_native_capacity - unlock native capacity
...@@ -531,6 +532,7 @@ void ata_scsi_unlock_native_capacity(struct scsi_device *sdev) ...@@ -531,6 +532,7 @@ void ata_scsi_unlock_native_capacity(struct scsi_device *sdev)
spin_unlock_irqrestore(ap->lock, flags); spin_unlock_irqrestore(ap->lock, flags);
ata_port_wait_eh(ap); ata_port_wait_eh(ap);
} }
EXPORT_SYMBOL_GPL(ata_scsi_unlock_native_capacity);
/** /**
* ata_get_identity - Handler for HDIO_GET_IDENTITY ioctl * ata_get_identity - Handler for HDIO_GET_IDENTITY ioctl
...@@ -1347,6 +1349,7 @@ int ata_scsi_slave_config(struct scsi_device *sdev) ...@@ -1347,6 +1349,7 @@ int ata_scsi_slave_config(struct scsi_device *sdev)
return rc; return rc;
} }
EXPORT_SYMBOL_GPL(ata_scsi_slave_config);
/** /**
* ata_scsi_slave_destroy - SCSI device is about to be destroyed * ata_scsi_slave_destroy - SCSI device is about to be destroyed
...@@ -1386,6 +1389,7 @@ void ata_scsi_slave_destroy(struct scsi_device *sdev) ...@@ -1386,6 +1389,7 @@ void ata_scsi_slave_destroy(struct scsi_device *sdev)
q->dma_drain_buffer = NULL; q->dma_drain_buffer = NULL;
q->dma_drain_size = 0; q->dma_drain_size = 0;
} }
EXPORT_SYMBOL_GPL(ata_scsi_slave_destroy);
/** /**
* __ata_change_queue_depth - helper for ata_scsi_change_queue_depth * __ata_change_queue_depth - helper for ata_scsi_change_queue_depth
...@@ -1429,6 +1433,7 @@ int __ata_change_queue_depth(struct ata_port *ap, struct scsi_device *sdev, ...@@ -1429,6 +1433,7 @@ int __ata_change_queue_depth(struct ata_port *ap, struct scsi_device *sdev,
return scsi_change_queue_depth(sdev, queue_depth); return scsi_change_queue_depth(sdev, queue_depth);
} }
EXPORT_SYMBOL_GPL(__ata_change_queue_depth);
/** /**
* ata_scsi_change_queue_depth - SCSI callback for queue depth config * ata_scsi_change_queue_depth - SCSI callback for queue depth config
...@@ -1451,6 +1456,7 @@ int ata_scsi_change_queue_depth(struct scsi_device *sdev, int queue_depth) ...@@ -1451,6 +1456,7 @@ int ata_scsi_change_queue_depth(struct scsi_device *sdev, int queue_depth)
return __ata_change_queue_depth(ap, sdev, queue_depth); return __ata_change_queue_depth(ap, sdev, queue_depth);
} }
EXPORT_SYMBOL_GPL(ata_scsi_change_queue_depth);
/** /**
* ata_scsi_start_stop_xlat - Translate SCSI START STOP UNIT command * ata_scsi_start_stop_xlat - Translate SCSI START STOP UNIT command
...@@ -4406,6 +4412,7 @@ int ata_scsi_queuecmd(struct Scsi_Host *shost, struct scsi_cmnd *cmd) ...@@ -4406,6 +4412,7 @@ int ata_scsi_queuecmd(struct Scsi_Host *shost, struct scsi_cmnd *cmd)
return rc; return rc;
} }
EXPORT_SYMBOL_GPL(ata_scsi_queuecmd);
/** /**
* ata_scsi_simulate - simulate SCSI command on ATA device * ata_scsi_simulate - simulate SCSI command on ATA device
...@@ -4529,6 +4536,7 @@ void ata_scsi_simulate(struct ata_device *dev, struct scsi_cmnd *cmd) ...@@ -4529,6 +4536,7 @@ void ata_scsi_simulate(struct ata_device *dev, struct scsi_cmnd *cmd)
cmd->scsi_done(cmd); cmd->scsi_done(cmd);
} }
EXPORT_SYMBOL_GPL(ata_scsi_simulate);
int ata_scsi_add_hosts(struct ata_host *host, struct scsi_host_template *sht) int ata_scsi_add_hosts(struct ata_host *host, struct scsi_host_template *sht)
{ {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册