]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
iwlwifi: call iwl_remove_notification from iwl_wait_notification
authorLuca Coelho <luciano.coelho@intel.com>
Mon, 24 Jul 2017 13:04:47 +0000 (16:04 +0300)
committerLuca Coelho <luciano.coelho@intel.com>
Fri, 18 Aug 2017 13:03:22 +0000 (16:03 +0300)
The iwl_wait_notification() function removes the wait entry from the
list.  To make it clearer that it's doing the same thing as
iwl_remove_notification(), call the latter instead of having duplicate
code.

Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
drivers/net/wireless/intel/iwlwifi/fw/notif-wait.c

index 29bb92e3df5922d9bae992da437187ef1fcf89b1..1096c945a68bc023556b756bb02b82ef92150e38 100644 (file)
@@ -6,7 +6,7 @@
  * GPL LICENSE SUMMARY
  *
  * Copyright(c) 2007 - 2014 Intel Corporation. All rights reserved.
- * Copyright(c) 2015 Intel Deutschland GmbH
+ * Copyright(c) 2015 - 2017 Intel Deutschland GmbH
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of version 2 of the GNU General Public License as
@@ -32,6 +32,7 @@
  * BSD LICENSE
  *
  * Copyright(c) 2005 - 2014 Intel Corporation. All rights reserved.
+ * Copyright(c) 2015 - 2017 Intel Deutschland GmbH
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -161,6 +162,15 @@ iwl_init_notification_wait(struct iwl_notif_wait_data *notif_wait,
 }
 IWL_EXPORT_SYMBOL(iwl_init_notification_wait);
 
+void iwl_remove_notification(struct iwl_notif_wait_data *notif_wait,
+                            struct iwl_notification_wait *wait_entry)
+{
+       spin_lock_bh(&notif_wait->notif_wait_lock);
+       list_del(&wait_entry->list);
+       spin_unlock_bh(&notif_wait->notif_wait_lock);
+}
+IWL_EXPORT_SYMBOL(iwl_remove_notification);
+
 int iwl_wait_notification(struct iwl_notif_wait_data *notif_wait,
                          struct iwl_notification_wait *wait_entry,
                          unsigned long timeout)
@@ -171,9 +181,7 @@ int iwl_wait_notification(struct iwl_notif_wait_data *notif_wait,
                                 wait_entry->triggered || wait_entry->aborted,
                                 timeout);
 
-       spin_lock_bh(&notif_wait->notif_wait_lock);
-       list_del(&wait_entry->list);
-       spin_unlock_bh(&notif_wait->notif_wait_lock);
+       iwl_remove_notification(notif_wait, wait_entry);
 
        if (wait_entry->aborted)
                return -EIO;
@@ -184,12 +192,3 @@ int iwl_wait_notification(struct iwl_notif_wait_data *notif_wait,
        return 0;
 }
 IWL_EXPORT_SYMBOL(iwl_wait_notification);
-
-void iwl_remove_notification(struct iwl_notif_wait_data *notif_wait,
-                            struct iwl_notification_wait *wait_entry)
-{
-       spin_lock_bh(&notif_wait->notif_wait_lock);
-       list_del(&wait_entry->list);
-       spin_unlock_bh(&notif_wait->notif_wait_lock);
-}
-IWL_EXPORT_SYMBOL(iwl_remove_notification);