[
  [
    "drivers/stm/pio.c", 
    "drivers/stm/pio.c", 
    [
      "diff --git a/drivers/stm/pio.c b/drivers/stm/pio.c", 
      "index 427df0c..a180dfc 100644", 
      "--- drivers/stm/pio.c", 
      "+++ drivers/stm/pio.c", 
      "@@ -120,8 +120,9 @@ struct stpio_port {", 
      "struct platform_device *pdev;", 
      "unsigned int irq_comp;", 
      "unsigned char flags;", 
      "-#define PORT_IRQ_ENABLED\t\t0x1", 
      "-#define PORT_IRQ_DISABLED_ON_SUSPEND\t0x2", 
      "+#define PORT_IRQ_REGISTERED\t\t0x1", 
      "+#define PORT_IRQ_ENABLED\t\t0x2", 
      "+#define PORT_IRQ_DISABLED_ON_SUSPEND\t0x4", 
      "};", 
      "", 
      "", 
      "@@ -335,18 +336,22 @@ static irqreturn_t stpio_irq_wrapper(int irq, void *dev_id)", 
      "}", 
      "", 
      "", 
      "-void stpio_flagged_request_irq(struct stpio_pin *pin, int comp,", 
      "+int stpio_flagged_request_irq(struct stpio_pin *pin, int comp,", 
      "void (*handler)(struct stpio_pin *pin, void *dev),", 
      "void *dev, unsigned long flags)", 
      "{", 
      "-\tint irq = pin_to_irq(pin);", 
      "+\tint irq;", 
      "int ret;", 
      "", 
      "DPRINTK(\"called\\n\");", 
      "", 
      "+\tif (!(pin->port->flags & PORT_IRQ_REGISTERED))", 
      "+\t\treturn -EINVAL;", 
      "+", 
      "/* stpio style interrupt handling doesn't allow sharing. */", 
      "BUG_ON(pin->func);", 
      "", 
      "+\tirq = pin_to_irq(pin);", 
      "pin->func = handler;", 
      "pin->dev = dev;", 
      "", 
      "@@ -358,6 +363,8 @@ void stpio_flagged_request_irq(struct stpio_pin *pin, int comp,", 
      "disable_irq(irq);", 
      "pin->port->flags &= ~PORT_IRQ_ENABLED;", 
      "}", 
      "+", 
      "+\treturn 0;", 
      "}", 
      "EXPORT_SYMBOL(stpio_flagged_request_irq);", 
      "", 
      "@@ -697,6 +704,7 @@ static int stpio_init_port(struct platform_device *pdev, int early)", 
      "", 
      "set_irq_chained_handler(irq, stpio_irq_chip_handler);", 
      "set_irq_data(irq, port);", 
      "+\t\tport->flags |= PORT_IRQ_REGISTERED;", 
      "", 
      "irq = stpio_irq_base + (portno * STPIO_PINS_IN_PORT);", 
      "for (i = 0; i < STPIO_PINS_IN_PORT; i++) {"
    ]
  ], 
  [
    "include/linux/stm/pio.h", 
    "include/linux/stm/pio.h", 
    [
      "diff --git a/include/linux/stm/pio.h b/include/linux/stm/pio.h", 
      "index 09af59d..66534c0 100644", 
      "--- include/linux/stm/pio.h", 
      "+++ include/linux/stm/pio.h", 
      "@@ -53,14 +53,14 @@ void stpio_set_pin(struct stpio_pin* pin, unsigned int value);", 
      "unsigned int stpio_get_pin(struct stpio_pin* pin);", 
      "", 
      "/* Interrupt on external value change */", 
      "-void stpio_flagged_request_irq(struct stpio_pin *pin, int comp,", 
      "+int stpio_flagged_request_irq(struct stpio_pin *pin, int comp,", 
      "void (*handler)(struct stpio_pin *pin, void *dev),", 
      "void *dev, unsigned long irqflags);", 
      "-static inline void __deprecated stpio_request_irq(struct stpio_pin *pin, int comp,", 
      "+static inline int __deprecated stpio_request_irq(struct stpio_pin *pin, int comp,", 
      "void (*handler)(struct stpio_pin *pin, void *dev),", 
      "void *dev)", 
      "{", 
      "-        stpio_flagged_request_irq (pin, comp, handler, dev, 0);", 
      "+\treturn stpio_flagged_request_irq (pin, comp, handler, dev, 0);", 
      "}", 
      "void stpio_free_irq(struct stpio_pin* pin);", 
      "void stpio_enable_irq(struct stpio_pin* pin, int mode);"
    ]
  ]
]