mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-07-28 12:39:33 -04:00
scsi: libsas: Factor out sas_ata_add_dev()
Factor out sas_ata_add_dev() and put it in sas_ata.c since it is a SATA related interface. Also follow the standard coding style to define an inline empty function when CONFIG_SCSI_SAS_ATA is not enabled. Cc: John Garry <john.g.garry@oracle.com> Signed-off-by: Jason Yan <yanaijie@huawei.com> Reviewed-by: John Garry <john.g.garry@oracle.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
committed by
Martin K. Petersen
parent
8d2c9d25b7
commit
7cc7646b4b
@@ -37,6 +37,8 @@ int sas_execute_ata_cmd(struct domain_device *device, u8 *fis,
|
||||
int force_phy_id);
|
||||
int smp_ata_check_ready_type(struct ata_link *link);
|
||||
int sas_discover_sata(struct domain_device *dev);
|
||||
int sas_ata_add_dev(struct domain_device *parent, struct ex_phy *phy,
|
||||
struct domain_device *child, int phy_id);
|
||||
#else
|
||||
|
||||
static inline void sas_ata_disabled_notice(void)
|
||||
@@ -114,6 +116,13 @@ static inline int sas_discover_sata(struct domain_device *dev)
|
||||
sas_ata_disabled_notice();
|
||||
return -ENXIO;
|
||||
}
|
||||
|
||||
static inline int sas_ata_add_dev(struct domain_device *parent, struct ex_phy *phy,
|
||||
struct domain_device *child, int phy_id)
|
||||
{
|
||||
sas_ata_disabled_notice();
|
||||
return -ENODEV;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _SAS_ATA_H_ */
|
||||
|
||||
Reference in New Issue
Block a user