diff options
author | Jens Axboe <axboe@kernel.dk> | 2013-07-02 02:31:48 -0400 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2013-07-02 02:31:48 -0400 |
commit | 5f0e5afa0de4522abb3ea7d1369039b94e740ec5 (patch) | |
tree | 6a5be3db9ecfed8ef2150c6146f6d1e0d658ac8b /drivers/misc/dummy-irq.c | |
parent | d752b2696072ed52fd5afab08b601e2220a3b87e (diff) | |
parent | 9e895ace5d82df8929b16f58e9f515f6d54ab82d (diff) |
Merge tag 'v3.10-rc7' into for-3.11/drivers
Linux 3.10-rc7
Pull this in early to avoid doing it with the bcache merge,
since there are a number of changes to bcache between my old
base (3.10-rc1) and the new pull request.
Diffstat (limited to 'drivers/misc/dummy-irq.c')
-rw-r--r-- | drivers/misc/dummy-irq.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/misc/dummy-irq.c b/drivers/misc/dummy-irq.c index 7014167e2c61..c37eeedfe215 100644 --- a/drivers/misc/dummy-irq.c +++ b/drivers/misc/dummy-irq.c | |||
@@ -19,7 +19,7 @@ | |||
19 | #include <linux/irq.h> | 19 | #include <linux/irq.h> |
20 | #include <linux/interrupt.h> | 20 | #include <linux/interrupt.h> |
21 | 21 | ||
22 | static int irq; | 22 | static int irq = -1; |
23 | 23 | ||
24 | static irqreturn_t dummy_interrupt(int irq, void *dev_id) | 24 | static irqreturn_t dummy_interrupt(int irq, void *dev_id) |
25 | { | 25 | { |
@@ -36,6 +36,10 @@ static irqreturn_t dummy_interrupt(int irq, void *dev_id) | |||
36 | 36 | ||
37 | static int __init dummy_irq_init(void) | 37 | static int __init dummy_irq_init(void) |
38 | { | 38 | { |
39 | if (irq < 0) { | ||
40 | printk(KERN_ERR "dummy-irq: no IRQ given. Use irq=N\n"); | ||
41 | return -EIO; | ||
42 | } | ||
39 | if (request_irq(irq, &dummy_interrupt, IRQF_SHARED, "dummy_irq", &irq)) { | 43 | if (request_irq(irq, &dummy_interrupt, IRQF_SHARED, "dummy_irq", &irq)) { |
40 | printk(KERN_ERR "dummy-irq: cannot register IRQ %d\n", irq); | 44 | printk(KERN_ERR "dummy-irq: cannot register IRQ %d\n", irq); |
41 | return -EIO; | 45 | return -EIO; |