* [PATCH net-next 07/10] iwlwifi: Use dev_get_drvdata where possible
@ 2019-07-24 11:27 Chuhong Yuan
2019-08-23 5:09 ` Luciano Coelho
0 siblings, 1 reply; 2+ messages in thread
From: Chuhong Yuan @ 2019-07-24 11:27 UTC (permalink / raw)
Cc: Johannes Berg, Emmanuel Grumbach, Luca Coelho,
Intel Linux Wireless, Kalle Valo, David S . Miller,
linux-wireless, netdev, linux-kernel, Chuhong Yuan
Instead of using to_pci_dev + pci_get_drvdata,
use dev_get_drvdata to make code simpler.
Signed-off-by: Chuhong Yuan <hslester96@gmail.com>
---
drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c
index ea2a03d4bf55..fe76e1540d39 100644
--- a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c
+++ b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c
@@ -1248,8 +1248,7 @@ int iwl_pci_fw_exit_d0i3(struct iwl_trans *trans)
#ifdef CONFIG_IWLWIFI_PCIE_RTPM
static int iwl_pci_runtime_suspend(struct device *device)
{
- struct pci_dev *pdev = to_pci_dev(device);
- struct iwl_trans *trans = pci_get_drvdata(pdev);
+ struct iwl_trans *trans = dev_get_drvdata(device);
int ret;
IWL_DEBUG_RPM(trans, "entering runtime suspend\n");
@@ -1269,8 +1268,7 @@ static int iwl_pci_runtime_suspend(struct device *device)
static int iwl_pci_runtime_resume(struct device *device)
{
- struct pci_dev *pdev = to_pci_dev(device);
- struct iwl_trans *trans = pci_get_drvdata(pdev);
+ struct iwl_trans *trans = dev_get_drvdata(device);
enum iwl_d3_status d3_status;
IWL_DEBUG_RPM(trans, "exiting runtime suspend (resume)\n");
@@ -1285,8 +1283,7 @@ static int iwl_pci_runtime_resume(struct device *device)
static int iwl_pci_system_prepare(struct device *device)
{
- struct pci_dev *pdev = to_pci_dev(device);
- struct iwl_trans *trans = pci_get_drvdata(pdev);
+ struct iwl_trans *trans = dev_get_drvdata(device);
IWL_DEBUG_RPM(trans, "preparing for system suspend\n");
@@ -1308,8 +1305,7 @@ static int iwl_pci_system_prepare(struct device *device)
static void iwl_pci_system_complete(struct device *device)
{
- struct pci_dev *pdev = to_pci_dev(device);
- struct iwl_trans *trans = pci_get_drvdata(pdev);
+ struct iwl_trans *trans = dev_get_drvdata(device);
IWL_DEBUG_RPM(trans, "completing system suspend\n");
--
2.20.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next 07/10] iwlwifi: Use dev_get_drvdata where possible
2019-07-24 11:27 [PATCH net-next 07/10] iwlwifi: Use dev_get_drvdata where possible Chuhong Yuan
@ 2019-08-23 5:09 ` Luciano Coelho
0 siblings, 0 replies; 2+ messages in thread
From: Luciano Coelho @ 2019-08-23 5:09 UTC (permalink / raw)
To: Chuhong Yuan
Cc: Johannes Berg, Emmanuel Grumbach, Intel Linux Wireless,
Kalle Valo, David S . Miller, linux-wireless, netdev,
linux-kernel
On Wed, 2019-07-24 at 19:27 +0800, Chuhong Yuan wrote:
> Instead of using to_pci_dev + pci_get_drvdata,
> use dev_get_drvdata to make code simpler.
>
> Signed-off-by: Chuhong Yuan <hslester96@gmail.com>
> ---
This patch is not relevant anymore because we have removed all
D0i3/runtime PM code.
Thanks anyway!
--
Cheers,
Luca.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-08-23 5:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-24 11:27 [PATCH net-next 07/10] iwlwifi: Use dev_get_drvdata where possible Chuhong Yuan
2019-08-23 5:09 ` Luciano Coelho
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).