From: Luca Coelho <luca@coelho.fi>
To: kvalo@codeaurora.org
Cc: linux-wireless@vger.kernel.org, Luca Coelho <luciano.coelho@intel.com>
Subject: [PATCH 02/10] iwlwifi: trans: move ref/unref code to the common part of the transport
Date: Fri, 15 Sep 2017 15:46:56 +0300 [thread overview]
Message-ID: <20170915124704.9032-3-luca@coelho.fi> (raw)
In-Reply-To: <20170915124704.9032-1-luca@coelho.fi>
From: Luca Coelho <luciano.coelho@intel.com>
De-inline iwl_trans_ref/unref and move it to common transport code
in preparation for more common code to come to these functions.
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
drivers/net/wireless/intel/iwlwifi/iwl-trans.c | 16 ++++++++++++++++
drivers/net/wireless/intel/iwlwifi/iwl-trans.h | 14 ++------------
2 files changed, 18 insertions(+), 12 deletions(-)
diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-trans.c b/drivers/net/wireless/intel/iwlwifi/iwl-trans.c
index 784bdd0ed233..7e9c924e1220 100644
--- a/drivers/net/wireless/intel/iwlwifi/iwl-trans.c
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-trans.c
@@ -6,6 +6,7 @@
* GPL LICENSE SUMMARY
*
* Copyright(c) 2015 Intel Mobile Communications GmbH
+ * Copyright(c) 2016 - 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
@@ -31,6 +32,7 @@
* BSD LICENSE
*
* Copyright(c) 2015 Intel Mobile Communications GmbH
+ * Copyright(c) 2016 - 2017 Intel Deutschland GmbH
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -205,3 +207,17 @@ int iwl_cmd_groups_verify_sorted(const struct iwl_trans_config *trans)
return 0;
}
IWL_EXPORT_SYMBOL(iwl_cmd_groups_verify_sorted);
+
+void iwl_trans_ref(struct iwl_trans *trans)
+{
+ if (trans->ops->ref)
+ trans->ops->ref(trans);
+}
+IWL_EXPORT_SYMBOL(iwl_trans_ref);
+
+void iwl_trans_unref(struct iwl_trans *trans)
+{
+ if (trans->ops->unref)
+ trans->ops->unref(trans);
+}
+IWL_EXPORT_SYMBOL(iwl_trans_unref);
diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-trans.h b/drivers/net/wireless/intel/iwlwifi/iwl-trans.h
index e90abbfba718..91ec077900f6 100644
--- a/drivers/net/wireless/intel/iwlwifi/iwl-trans.h
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-trans.h
@@ -875,18 +875,6 @@ static inline int iwl_trans_d3_resume(struct iwl_trans *trans,
return trans->ops->d3_resume(trans, status, test, reset);
}
-static inline void iwl_trans_ref(struct iwl_trans *trans)
-{
- if (trans->ops->ref)
- trans->ops->ref(trans);
-}
-
-static inline void iwl_trans_unref(struct iwl_trans *trans)
-{
- if (trans->ops->unref)
- trans->ops->unref(trans);
-}
-
static inline int iwl_trans_suspend(struct iwl_trans *trans)
{
if (!trans->ops->suspend)
@@ -1191,6 +1179,8 @@ struct iwl_trans *iwl_trans_alloc(unsigned int priv_size,
const struct iwl_cfg *cfg,
const struct iwl_trans_ops *ops);
void iwl_trans_free(struct iwl_trans *trans);
+void iwl_trans_ref(struct iwl_trans *trans);
+void iwl_trans_unref(struct iwl_trans *trans);
/*****************************************************
* driver (transport) register/unregister functions
--
2.14.1
next prev parent reply other threads:[~2017-09-15 12:47 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-15 12:46 [PATCH 00/10] iwlwifi: updates intended for v4.15 2017-09-15 Luca Coelho
2017-09-15 12:46 ` [PATCH 01/10] iwlwifi: mvm: add dbgfs entry for fw info Luca Coelho
2017-09-15 12:46 ` Luca Coelho [this message]
2017-09-15 12:46 ` [PATCH 03/10] iwlwifi: fix wrong struct for a000 device Luca Coelho
2017-09-15 12:46 ` [PATCH 04/10] iwlwifi: add a new " Luca Coelho
2017-09-15 12:46 ` [PATCH 05/10] iwlwifi: mvm: Add new quota command API Luca Coelho
2017-09-15 12:47 ` [PATCH 06/10] iwlwifi: mvm: remove support for Link Quality Measurements Luca Coelho
2017-09-15 12:47 ` [PATCH 07/10] iwlwifi: mvm: support firmware debug trigger on frame reorder timeout Luca Coelho
2017-09-15 12:47 ` [PATCH 08/10] iwlwifi: Add few debug prints to the WRT dump flow Luca Coelho
2017-09-15 12:47 ` [PATCH 09/10] iwlwifi: pcie: dynamic Tx command queue size Luca Coelho
2017-09-15 12:47 ` [PATCH 10/10] iwlwifi: remove redundant reading from NVM file Luca Coelho
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170915124704.9032-3-luca@coelho.fi \
--to=luca@coelho.fi \
--cc=kvalo@codeaurora.org \
--cc=linux-wireless@vger.kernel.org \
--cc=luciano.coelho@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox