net: ipa: pass a platform device to ipa_smp2p_irq_init()
Rather than using the platform device pointer field in the IPA pointer, pass a platform device pointer to ipa_smp2p_irq_init(). Use that pointer throughout that function (without assuming it's the same as the IPA platform device pointer). Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>pull/981/head
parent
95c54a963b
commit
59622a8fb4
|
|
@ -5,7 +5,7 @@
|
|||
*/
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <linux/device.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/notifier.h>
|
||||
#include <linux/panic_notifier.h>
|
||||
|
|
@ -179,14 +179,15 @@ out_power_put:
|
|||
}
|
||||
|
||||
/* Initialize SMP2P interrupts */
|
||||
static int ipa_smp2p_irq_init(struct ipa_smp2p *smp2p, const char *name,
|
||||
irq_handler_t handler)
|
||||
static int ipa_smp2p_irq_init(struct ipa_smp2p *smp2p,
|
||||
struct platform_device *pdev,
|
||||
const char *name, irq_handler_t handler)
|
||||
{
|
||||
struct device *dev = &smp2p->ipa->pdev->dev;
|
||||
struct device *dev = &pdev->dev;
|
||||
unsigned int irq;
|
||||
int ret;
|
||||
|
||||
ret = platform_get_irq_byname(smp2p->ipa->pdev, name);
|
||||
ret = platform_get_irq_byname(pdev, name);
|
||||
if (ret <= 0)
|
||||
return ret ? : -EINVAL;
|
||||
irq = ret;
|
||||
|
|
@ -261,7 +262,7 @@ int ipa_smp2p_init(struct ipa *ipa, bool modem_init)
|
|||
/* We have enough information saved to handle notifications */
|
||||
ipa->smp2p = smp2p;
|
||||
|
||||
ret = ipa_smp2p_irq_init(smp2p, "ipa-clock-query",
|
||||
ret = ipa_smp2p_irq_init(smp2p, smp2p->ipa->pdev, "ipa-clock-query",
|
||||
ipa_smp2p_modem_clk_query_isr);
|
||||
if (ret < 0)
|
||||
goto err_null_smp2p;
|
||||
|
|
@ -273,7 +274,8 @@ int ipa_smp2p_init(struct ipa *ipa, bool modem_init)
|
|||
|
||||
if (modem_init) {
|
||||
/* Result will be non-zero (negative for error) */
|
||||
ret = ipa_smp2p_irq_init(smp2p, "ipa-setup-ready",
|
||||
ret = ipa_smp2p_irq_init(smp2p, smp2p->ipa->pdev,
|
||||
"ipa-setup-ready",
|
||||
ipa_smp2p_modem_setup_ready_isr);
|
||||
if (ret < 0)
|
||||
goto err_notifier_unregister;
|
||||
|
|
|
|||
Loading…
Reference in New Issue