pinctrl: at91-pio4: use dedicated lock class for IRQ
[linux-2.6-block.git] / drivers / pinctrl / pinctrl-at91-pio4.c
index 383309e533c3d7c1a9bb5d1f6d9d9d1c586f8fac..a27c01fcbb47edc545f118db546d5448735bacf1 100644 (file)
@@ -1068,6 +1068,13 @@ static const struct of_device_id atmel_pctrl_of_match[] = {
        }
 };
 
+/*
+ * This lock class allows to tell lockdep that parent IRQ and children IRQ do
+ * not share the same class so it does not raise false positive
+ */
+static struct lock_class_key atmel_lock_key;
+static struct lock_class_key atmel_request_key;
+
 static int atmel_pinctrl_probe(struct platform_device *pdev)
 {
        struct device *dev = &pdev->dev;
@@ -1214,6 +1221,7 @@ static int atmel_pinctrl_probe(struct platform_device *pdev)
                irq_set_chip_and_handler(irq, &atmel_gpio_irq_chip,
                                         handle_simple_irq);
                irq_set_chip_data(irq, atmel_pioctrl);
+               irq_set_lockdep_class(irq, &atmel_lock_key, &atmel_request_key);
                dev_dbg(dev,
                        "atmel gpio irq domain: hwirq: %d, linux irq: %d\n",
                        i, irq);