diff options
author | Alex Elder <elder@linaro.org> | 2024-03-01 20:02:42 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2024-03-04 14:44:41 +0300 |
commit | 5245f4fd28d126cc13e32e77abc8a8fd287167b0 (patch) | |
tree | 9a359a6e46e0755c1a10eb499395d4b6ae08e415 /drivers/net/ipa/ipa_main.c | |
parent | 81d65f3413da3fe8158ac3ead6270035db1c0dde (diff) | |
download | linux-5245f4fd28d126cc13e32e77abc8a8fd287167b0.tar.xz |
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 <elder@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ipa/ipa_main.c')
-rw-r--r-- | drivers/net/ipa/ipa_main.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/net/ipa/ipa_main.c b/drivers/net/ipa/ipa_main.c index 3125aec88e6e..57b241417e8c 100644 --- a/drivers/net/ipa/ipa_main.c +++ b/drivers/net/ipa/ipa_main.c @@ -7,7 +7,6 @@ #include <linux/types.h> #include <linux/atomic.h> #include <linux/bitfield.h> -#include <linux/device.h> #include <linux/bug.h> #include <linux/io.h> #include <linux/firmware.h> @@ -114,7 +113,7 @@ int ipa_setup(struct ipa *ipa) { struct ipa_endpoint *exception_endpoint; struct ipa_endpoint *command_endpoint; - struct device *dev = &ipa->pdev->dev; + struct device *dev = ipa->dev; int ret; ret = gsi_setup(&ipa->gsi); @@ -858,7 +857,7 @@ static int ipa_probe(struct platform_device *pdev) goto err_power_exit; } - ipa->pdev = pdev; + ipa->dev = dev; dev_set_drvdata(dev, ipa); ipa->interrupt = interrupt; ipa->power = power; @@ -953,12 +952,16 @@ err_interrupt_exit: static void ipa_remove(struct platform_device *pdev) { - struct ipa *ipa = dev_get_drvdata(&pdev->dev); - struct device *dev = &pdev->dev; struct ipa_interrupt *interrupt; struct ipa_power *power; + struct device *dev; + struct ipa *ipa; int ret; + ipa = dev_get_drvdata(&pdev->dev); + dev = ipa->dev; + WARN_ON(dev != &pdev->dev); + power = ipa->power; interrupt = ipa->interrupt; |