diff options
author | Alex Elder <elder@linaro.org> | 2024-03-01 20:02:38 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2024-03-04 14:44:40 +0300 |
commit | a47956e72a3e724f88c696944d197f7bf8442273 (patch) | |
tree | 8f7ffa85324b859ab8cfe812117b4c3aa9ce862c /drivers/net/ipa/ipa_reg.c | |
parent | ad1be80d75827aad9582541ecc9d7953d354634f (diff) | |
download | linux-a47956e72a3e724f88c696944d197f7bf8442273.tar.xz |
net: ipa: pass a platform device to ipa_reg_init()
Rather than using the platform device pointer field in the IPA
pointer, pass a platform device pointer to ipa_reg_init(). Use
that pointer throughout that function.
Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ipa/ipa_reg.c')
-rw-r--r-- | drivers/net/ipa/ipa_reg.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/ipa/ipa_reg.c b/drivers/net/ipa/ipa_reg.c index 6a3203ae6f1e..98625956e0bb 100644 --- a/drivers/net/ipa/ipa_reg.c +++ b/drivers/net/ipa/ipa_reg.c @@ -4,6 +4,7 @@ * Copyright (C) 2019-2023 Linaro Ltd. */ +#include <linux/platform_device.h> #include <linux/io.h> #include "ipa.h" @@ -132,9 +133,9 @@ static const struct regs *ipa_regs(enum ipa_version version) } } -int ipa_reg_init(struct ipa *ipa) +int ipa_reg_init(struct ipa *ipa, struct platform_device *pdev) { - struct device *dev = &ipa->pdev->dev; + struct device *dev = &pdev->dev; const struct regs *regs; struct resource *res; @@ -146,8 +147,7 @@ int ipa_reg_init(struct ipa *ipa) return -EINVAL; /* Setup IPA register memory */ - res = platform_get_resource_byname(ipa->pdev, IORESOURCE_MEM, - "ipa-reg"); + res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "ipa-reg"); if (!res) { dev_err(dev, "DT error getting \"ipa-reg\" memory property\n"); return -ENODEV; |