brcm2708: switch to linux 4.4 and update patches
[openwrt.git] / target / linux / brcm2708 / patches-4.1 / 0059-pinctrl-bcm2835-Only-request-the-interrupts-listed-i.patch
1 From 61d33c34725708e626c5c33cf9429fc54709b1c4 Mon Sep 17 00:00:00 2001
2 From: Phil Elwell <phil@raspberrypi.org>
3 Date: Thu, 26 Feb 2015 09:58:22 +0000
4 Subject: [PATCH 059/222] pinctrl-bcm2835: Only request the interrupts listed
5  in the DTB
6
7 Although the GPIO controller can generate three interrupts (four counting
8 the common one), the device tree files currently only specify two. In the
9 absence of the third, simply don't register that interrupt (as opposed to
10 registering 0), which has the effect of making it impossible to generate
11 interrupts for GPIOs 46-53 which, since they share pins with the SD card
12 interface, is unlikely to be a problem.
13 ---
14  drivers/pinctrl/bcm/pinctrl-bcm2835.c | 2 ++
15  1 file changed, 2 insertions(+)
16
17 --- a/drivers/pinctrl/bcm/pinctrl-bcm2835.c
18 +++ b/drivers/pinctrl/bcm/pinctrl-bcm2835.c
19 @@ -1044,6 +1044,8 @@ static int bcm2835_pinctrl_probe(struct
20                 int len;
21                 char *name;
22                 pc->irq[i] = irq_of_parse_and_map(np, i);
23 +               if (pc->irq[i] == 0)
24 +                       break;
25                 pc->irq_data[i].pc = pc;
26                 pc->irq_data[i].irqgroup = i;
27