aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/can/mcp251x.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/can/mcp251x.c')
-rw-r--r--drivers/net/can/mcp251x.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/net/can/mcp251x.c b/drivers/net/can/mcp251x.c
index f32b9fc6a983..9aa0c64c33c8 100644
--- a/drivers/net/can/mcp251x.c
+++ b/drivers/net/can/mcp251x.c
@@ -929,6 +929,7 @@ static int mcp251x_open(struct net_device *net)
929 struct mcp251x_priv *priv = netdev_priv(net); 929 struct mcp251x_priv *priv = netdev_priv(net);
930 struct spi_device *spi = priv->spi; 930 struct spi_device *spi = priv->spi;
931 struct mcp251x_platform_data *pdata = spi->dev.platform_data; 931 struct mcp251x_platform_data *pdata = spi->dev.platform_data;
932 unsigned long flags;
932 int ret; 933 int ret;
933 934
934 ret = open_candev(net); 935 ret = open_candev(net);
@@ -945,9 +946,14 @@ static int mcp251x_open(struct net_device *net)
945 priv->tx_skb = NULL; 946 priv->tx_skb = NULL;
946 priv->tx_len = 0; 947 priv->tx_len = 0;
947 948
949 flags = IRQF_ONESHOT;
950 if (pdata->irq_flags)
951 flags |= pdata->irq_flags;
952 else
953 flags |= IRQF_TRIGGER_FALLING;
954
948 ret = request_threaded_irq(spi->irq, NULL, mcp251x_can_ist, 955 ret = request_threaded_irq(spi->irq, NULL, mcp251x_can_ist,
949 pdata->irq_flags ? pdata->irq_flags : IRQF_TRIGGER_FALLING, 956 flags, DEVICE_NAME, priv);
950 DEVICE_NAME, priv);
951 if (ret) { 957 if (ret) {
952 dev_err(&spi->dev, "failed to acquire irq %d\n", spi->irq); 958 dev_err(&spi->dev, "failed to acquire irq %d\n", spi->irq);
953 if (pdata->transceiver_enable) 959 if (pdata->transceiver_enable)