I'm trying to get sja1000_platfrom.c on a arm based device. The SJA1000 shares 
interrupt line with some other peripherals, so I need add IRQF_SHARED to the 
priv->irq_flags. If I define this in my platform definition file, it will be 
overwritten by priv->irq_flags = res_irq->flags & IRQF_TRIGGER_MASK, so I added 
IRQF_SHARED to the AND mask. What do you think about it?

Regards,
Yeogr

---------------------------------------------------------------------------------------------------
SJA1000: allow shared interrupt definition

Signed-off-by: Yegor Yefremov <[email protected]>

diff --git a/drivers/net/can/sja1000/sja1000_platform.c 
b/drivers/net/can/sja1000/sja1000_platform.c
index 628374c..bec0d3d 100644
--- a/drivers/net/can/sja1000/sja1000_platform.c
+++ b/drivers/net/can/sja1000/sja1000_platform.c
@@ -90,7 +90,7 @@ static int sp_probe(struct platform_device *pdev)
        priv = netdev_priv(dev);
 
        dev->irq = res_irq->start;
-       priv->irq_flags = res_irq->flags & IRQF_TRIGGER_MASK;
+       priv->irq_flags = res_irq->flags & (IRQF_TRIGGER_MASK | IRQF_SHARED);
        priv->reg_base = addr;
        priv->read_reg = sp_read_reg;
        priv->write_reg = sp_write_reg
_______________________________________________
Socketcan-core mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/socketcan-core

Reply via email to