mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-06 22:58:29 +00:00
iwlwifi: trans: move ref/unref code to the common part of the transport
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>
This commit is contained in:
parent
3669cd3192
commit
d621d3c733
2 changed files with 18 additions and 12 deletions
|
@ -6,6 +6,7 @@
|
||||||
* GPL LICENSE SUMMARY
|
* GPL LICENSE SUMMARY
|
||||||
*
|
*
|
||||||
* Copyright(c) 2015 Intel Mobile Communications GmbH
|
* 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
|
* 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
|
* it under the terms of version 2 of the GNU General Public License as
|
||||||
|
@ -31,6 +32,7 @@
|
||||||
* BSD LICENSE
|
* BSD LICENSE
|
||||||
*
|
*
|
||||||
* Copyright(c) 2015 Intel Mobile Communications GmbH
|
* Copyright(c) 2015 Intel Mobile Communications GmbH
|
||||||
|
* Copyright(c) 2016 - 2017 Intel Deutschland GmbH
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* 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;
|
return 0;
|
||||||
}
|
}
|
||||||
IWL_EXPORT_SYMBOL(iwl_cmd_groups_verify_sorted);
|
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);
|
||||||
|
|
|
@ -875,18 +875,6 @@ static inline int iwl_trans_d3_resume(struct iwl_trans *trans,
|
||||||
return trans->ops->d3_resume(trans, status, test, reset);
|
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)
|
static inline int iwl_trans_suspend(struct iwl_trans *trans)
|
||||||
{
|
{
|
||||||
if (!trans->ops->suspend)
|
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_cfg *cfg,
|
||||||
const struct iwl_trans_ops *ops);
|
const struct iwl_trans_ops *ops);
|
||||||
void iwl_trans_free(struct iwl_trans *trans);
|
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
|
* driver (transport) register/unregister functions
|
||||||
|
|
Loading…
Add table
Reference in a new issue