title: Interrupt-handling within kernel-module: request_irq() returns -22, Invalid Parameter
body: <p>I'm trying to set up an interrupt-handler within a kernel-module that gets triggered by a gpio-interrupt, but it seems that I don't use the <code>request_irq()</code>-function right...
  I'm getting my irq-number via <code>gpio_to_irq()</code> and this seems to work.
  Then I'm calling</p>
  
  <pre><code>request_irq(irqNumber, handler, 0, "GPIO_Test", NULL);
  </code></pre>
  
  <p>but It returns -22, Invalid parameters.
  I think it might be the handler-function because I'm not sure about it's signature - Sometimes it's defined as <code>void handler (int irq, void *dev_id, struct pt_regs *regs)</code>, sometimes as <code>static irqreturn_t handler(int irq, void *data)</code> - Which one is the correct one to use in this case and why are there these two totally different variations?
  I tried both, but always got the same Invalid-parameters-error.</p>
  
  <p>The compiler gives me a warning about the return-type of my handler-function: 
  when using:</p>
  
  <pre><code>static irqreturn_t handler(int irq, void *data)
  {
      /*interrupt-handling*/
  
      return IRQ_HANDLED;
  }
  </code></pre>
  
  <blockquote>
    <p>»irq_handler_t« expected, but argument has type »enum irqreturn_t (* (*)(int,  void *))(int,  void *)«</p>
  </blockquote>
  
  <p>...and when using:</p>
  
  <pre><code>void handler (int irq, void *dev_id, struct pt_regs *regs){/*interrupt-handling*/}
  </code></pre>
  
  <blockquote>
    <p>»irq_handler_t« expected, but argument has type »void (*)(int,  void *, struct pt_regs *)«</p>
  </blockquote>
  
  <p>Thank you for your support ;)</p>