mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
[SCSI] libsas: make ATA functions selectable by a config option
Not everyone wants libsas automatically to pull in libata. This patch makes the behaviour configurable, so you can build libsas with or without ATA support. Signed-off-by: James Bottomley <[email protected]>
This commit is contained in:
parent
41e1703b9b
commit
b91421749a
6 changed files with 436 additions and 397 deletions
|
|
@ -28,6 +28,8 @@
|
|||
#include <linux/libata.h>
|
||||
#include <scsi/libsas.h>
|
||||
|
||||
#ifdef CONFIG_SCSI_SAS_ATA
|
||||
|
||||
static inline int dev_is_sata(struct domain_device *dev)
|
||||
{
|
||||
return (dev->rphy->identify.target_port_protocols & SAS_PROTOCOL_SATA);
|
||||
|
|
@ -38,4 +40,21 @@ int sas_ata_init_host_and_port(struct domain_device *found_dev,
|
|||
|
||||
void sas_ata_task_abort(struct sas_task *task);
|
||||
|
||||
#else
|
||||
|
||||
|
||||
static inline int dev_is_sata(struct domain_device *dev)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
int sas_ata_init_host_and_port(struct domain_device *found_dev,
|
||||
struct scsi_target *starget)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
void sas_ata_task_abort(struct sas_task *task)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _SAS_ATA_H_ */
|
||||
|
|
|
|||
Loading…
Reference in a new issue