]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
scsi: libfc: Replace ->rport_flush_queue callback with function call
authorHannes Reinecke <hare@suse.de>
Tue, 18 Oct 2016 08:01:46 +0000 (10:01 +0200)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 8 Nov 2016 22:29:55 +0000 (17:29 -0500)
The ->rport_flush_queue callback only ever had a single
implementation, so we can as well call it directly and
drop the callback.

Signed-off-by: Hannes Reinecke <hare@suse.com>
Acked-by: Johannes Thumshirn <jth@kernel.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/fcoe/fcoe_ctlr.c
drivers/scsi/libfc/fc_disc.c
drivers/scsi/libfc/fc_lport.c
drivers/scsi/libfc/fc_rport.c
include/scsi/libfc.h

index 12aecf3375403a3337ac779177c80fb6a2fefd9e..12efc1d5df78b266961aabd1dd93f4b672003fc6 100644 (file)
@@ -2215,7 +2215,7 @@ static void fcoe_ctlr_disc_stop(struct fc_lport *lport)
 static void fcoe_ctlr_disc_stop_final(struct fc_lport *lport)
 {
        fcoe_ctlr_disc_stop(lport);
-       lport->tt.rport_flush_queue();
+       fc_rport_flush_queue();
        synchronize_rcu();
 }
 
index 7efa5a66e92a408a453f160ee993582026f249ee..6103231104dadbc42f84217f274e5e90a3918fe3 100644 (file)
@@ -719,7 +719,7 @@ static void fc_disc_stop(struct fc_lport *lport)
 static void fc_disc_stop_final(struct fc_lport *lport)
 {
        fc_disc_stop(lport);
-       lport->tt.rport_flush_queue();
+       fc_rport_flush_queue();
 }
 
 /**
index 937a442cc70eb739ccf099c01a9cd1a714161d62..7315675d3e33f77a63e1c45249d1ac7de7a11fdf 100644 (file)
@@ -625,7 +625,7 @@ int fc_fabric_logoff(struct fc_lport *lport)
        if (lport->dns_rdata)
                fc_rport_logoff(lport->dns_rdata);
        mutex_unlock(&lport->lp_mutex);
-       lport->tt.rport_flush_queue();
+       fc_rport_flush_queue();
        mutex_lock(&lport->lp_mutex);
        fc_lport_enter_logo(lport);
        mutex_unlock(&lport->lp_mutex);
index feae7abf05c337abf7c44571d6088b45b66512d5..6e50226277777954f2b34510fce023ace3baa724 100644 (file)
@@ -2175,10 +2175,11 @@ static void fc_rport_recv_logo_req(struct fc_lport *lport, struct fc_frame *fp)
 /**
  * fc_rport_flush_queue() - Flush the rport_event_queue
  */
-static void fc_rport_flush_queue(void)
+void fc_rport_flush_queue(void)
 {
        flush_workqueue(rport_event_queue);
 }
+EXPORT_SYMBOL(fc_rport_flush_queue);
 
 /**
  * fc_rport_init() - Initialize the remote port layer for a local port
@@ -2186,9 +2187,6 @@ static void fc_rport_flush_queue(void)
  */
 int fc_rport_init(struct fc_lport *lport)
 {
-       if (!lport->tt.rport_flush_queue)
-               lport->tt.rport_flush_queue = fc_rport_flush_queue;
-
        return 0;
 }
 EXPORT_SYMBOL(fc_rport_init);
index 1e1dbc94d54a4f0940661a2c12c582a685e91bee..57630c5a7fc428c0fd7584f3cf4eed0d324ec817 100644 (file)
@@ -582,13 +582,6 @@ struct libfc_function_template {
         */
        void (*exch_mgr_reset)(struct fc_lport *, u32 s_id, u32 d_id);
 
-       /*
-        * Flush the rport work queue. Generally used before shutdown.
-        *
-        * STATUS: OPTIONAL
-        */
-       void (*rport_flush_queue)(void);
-
        /*
         * Set the local port FC_ID.
         *
@@ -994,6 +987,7 @@ void fc_rport_destroy(struct kref *kref);
 int fc_rport_login(struct fc_rport_priv *rdata);
 int fc_rport_logoff(struct fc_rport_priv *rdata);
 void fc_rport_recv_req(struct fc_lport *lport, struct fc_frame *fp);
+void fc_rport_flush_queue(void);
 
 /*
  * DISCOVERY LAYER