mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-10-28 12:53:14 +01:00
ata: libata-transport: remove static variable ata_scsi_transport_template
Simplify the code by making struct ata_scsi_transportt public, instead of using separate variable ata_scsi_transport_template. Reviewed-by: Damien Le Moal <[email protected]> Signed-off-by: Heiner Kallweit <[email protected]> Signed-off-by: Niklas Cassel <[email protected]>
This commit is contained in:
1 parent
359942ba4c
commit
7bf6ddc334
3 files changed
+4
-9
No files matched your search
@@ -4624,7 +4624,7 @@ int ata_scsi_add_hosts(struct ata_host *host, const struct scsi_host_template *s
|
||||
*(struct ata_port **)&shost->hostdata[0] = ap;
|
||||
ap->scsi_host = shost;
|
||||
|
||||
shost->transportt = ata_scsi_transport_template;
|
||||
shost->transportt = &ata_scsi_transportt;
|
||||
shost->unique_id = ap->print_id;
|
||||
shost->max_id = 16;
|
||||
shost->max_lun = 1;
|
||||
|
||||
@@ -37,9 +37,6 @@
|
||||
#include "libata.h"
|
||||
#include "libata-transport.h"
|
||||
|
||||
struct scsi_transport_template;
|
||||
struct scsi_transport_template *ata_scsi_transport_template;
|
||||
|
||||
static int ata_tlink_match(struct attribute_container *cont,
|
||||
struct device *dev);
|
||||
static int ata_tdev_match(struct attribute_container *cont,
|
||||
@@ -224,7 +221,7 @@ static int ata_tport_match(struct attribute_container *cont,
|
||||
{
|
||||
if (!ata_is_port(dev))
|
||||
return 0;
|
||||
return &ata_scsi_transport_template->host_attrs.ac == cont;
|
||||
return &ata_scsi_transportt.host_attrs.ac == cont;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -722,7 +719,7 @@ int ata_tlink_add(struct ata_link *link)
|
||||
return error;
|
||||
}
|
||||
|
||||
static struct scsi_transport_template ata_scsi_transportt = {
|
||||
struct scsi_transport_template ata_scsi_transportt = {
|
||||
.eh_strategy_handler = ata_scsi_error,
|
||||
.user_scan = ata_scsi_user_scan,
|
||||
|
||||
@@ -783,8 +780,6 @@ __init int libata_transport_init(void)
|
||||
transport_container_register(&ata_link_attr_cont);
|
||||
transport_container_register(&ata_dev_attr_cont);
|
||||
|
||||
ata_scsi_transport_template = &ata_scsi_transportt;
|
||||
|
||||
return 0;
|
||||
|
||||
out_unregister_port:
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#define _LIBATA_TRANSPORT_H
|
||||
|
||||
|
||||
extern struct scsi_transport_template *ata_scsi_transport_template;
|
||||
extern struct scsi_transport_template ata_scsi_transportt;
|
||||
|
||||
int ata_tlink_add(struct ata_link *link);
|
||||
void ata_tlink_delete(struct ata_link *link);
|
||||
|
||||
Reference in new issue
Block a user