Skip to content

Commit

Permalink
[SCSI] qla2xxx: remove a transport #include
Browse files Browse the repository at this point in the history
Make transport-functions structure non-static.  Replace #include of
scsi_transport.h with a forward declaration.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
  • Loading branch information
Andrew Vasquez authored and James Bottomley committed Apr 21, 2005
1 parent 40b7bc0 commit 1c97a12
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
8 changes: 1 addition & 7 deletions drivers/scsi/qla2xxx/qla_attr.c
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ qla2x00_set_rport_loss_tmo(struct fc_rport *rport, uint32_t timeout)
rport->dev_loss_tmo = ha->port_down_retry_count + 5;
}

static struct fc_function_template qla2xxx_transport_functions = {
struct fc_function_template qla2xxx_transport_functions = {

.show_host_node_name = 1,
.show_host_port_name = 1,
Expand All @@ -322,12 +322,6 @@ static struct fc_function_template qla2xxx_transport_functions = {

};

struct scsi_transport_template *
qla2x00_alloc_transport_tmpl(void)
{
return (fc_attach_transport(&qla2xxx_transport_functions));
}

void
qla2x00_init_host_attr(scsi_qla_host_t *ha)
{
Expand Down
4 changes: 2 additions & 2 deletions drivers/scsi/qla2xxx/qla_gbl.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
#define __QLA_GBL_H

#include <linux/interrupt.h>
#include <scsi/scsi_transport.h>

extern void qla2x00_remove_one(struct pci_dev *);
extern int qla2x00_probe_one(struct pci_dev *, struct qla_board_info *);
Expand Down Expand Up @@ -248,9 +247,10 @@ extern void qla2x00_cancel_io_descriptors(scsi_qla_host_t *);
/*
* Global Function Prototypes in qla_attr.c source file.
*/
struct fc_function_template;
extern struct fc_function_template qla2xxx_transport_functions;
extern void qla2x00_alloc_sysfs_attr(scsi_qla_host_t *);
extern void qla2x00_free_sysfs_attr(scsi_qla_host_t *);
extern struct scsi_transport_template *qla2x00_alloc_transport_tmpl(void);
extern void qla2x00_init_host_attr(scsi_qla_host_t *);
extern void qla2x00_alloc_sysfs_attr(scsi_qla_host_t *);
extern void qla2x00_free_sysfs_attr(scsi_qla_host_t *);
Expand Down
3 changes: 2 additions & 1 deletion drivers/scsi/qla2xxx/qla_os.c
Original file line number Diff line number Diff line change
Expand Up @@ -2350,7 +2350,8 @@ qla2x00_module_init(void)
#if DEBUG_QLA2100
strcat(qla2x00_version_str, "-debug");
#endif
qla2xxx_transport_template = qla2x00_alloc_transport_tmpl();
qla2xxx_transport_template =
fc_attach_transport(&qla2xxx_transport_functions);
if (!qla2xxx_transport_template)
return -ENODEV;

Expand Down

0 comments on commit 1c97a12

Please sign in to comment.