From 5245f4fd28d126cc13e32e77abc8a8fd287167b0 Mon Sep 17 00:00:00 2001 From: Alex Elder Date: Fri, 1 Mar 2024 11:02:42 -0600 Subject: net: ipa: don't save the platform device The IPA platform device is now only used as the structure containing the IPA device structure. Replace the platform device pointer with a pointer to the device structure. Signed-off-by: Alex Elder Signed-off-by: David S. Miller --- drivers/net/ipa/ipa_smp2p.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'drivers/net/ipa/ipa_smp2p.c') diff --git a/drivers/net/ipa/ipa_smp2p.c b/drivers/net/ipa/ipa_smp2p.c index 831268551d9a..aeccce9fab72 100644 --- a/drivers/net/ipa/ipa_smp2p.c +++ b/drivers/net/ipa/ipa_smp2p.c @@ -84,15 +84,13 @@ struct ipa_smp2p { */ static void ipa_smp2p_notify(struct ipa_smp2p *smp2p) { - struct device *dev; u32 value; u32 mask; if (smp2p->notified) return; - dev = &smp2p->ipa->pdev->dev; - smp2p->power_on = pm_runtime_get_if_active(dev, true) > 0; + smp2p->power_on = pm_runtime_get_if_active(smp2p->ipa->dev, true) > 0; /* Signal whether the IPA power is enabled */ mask = BIT(smp2p->enabled_bit); @@ -152,15 +150,16 @@ static void ipa_smp2p_panic_notifier_unregister(struct ipa_smp2p *smp2p) static irqreturn_t ipa_smp2p_modem_setup_ready_isr(int irq, void *dev_id) { struct ipa_smp2p *smp2p = dev_id; + struct ipa *ipa = smp2p->ipa; struct device *dev; int ret; /* Ignore any (spurious) interrupts received after the first */ - if (smp2p->ipa->setup_complete) + if (ipa->setup_complete) return IRQ_HANDLED; /* Power needs to be active for setup */ - dev = &smp2p->ipa->pdev->dev; + dev = ipa->dev; ret = pm_runtime_get_sync(dev); if (ret < 0) { dev_err(dev, "error %d getting power for setup\n", ret); @@ -168,7 +167,7 @@ static irqreturn_t ipa_smp2p_modem_setup_ready_isr(int irq, void *dev_id) } /* An error here won't cause driver shutdown, so warn if one occurs */ - ret = ipa_setup(smp2p->ipa); + ret = ipa_setup(ipa); WARN(ret != 0, "error %d from ipa_setup()\n", ret); out_power_put: @@ -209,7 +208,7 @@ static void ipa_smp2p_irq_exit(struct ipa_smp2p *smp2p, u32 irq) /* Drop the power reference if it was taken in ipa_smp2p_notify() */ static void ipa_smp2p_power_release(struct ipa *ipa) { - struct device *dev = &ipa->pdev->dev; + struct device *dev = ipa->dev; if (!ipa->smp2p->power_on) return; -- cgit