title: Failed to request_irq for kernel module
body: <p>I am trying to port drivers from old kernel to new one on ARM based platform. While porting one of the drivers I have noticed that <strong>request_irq</strong> fails on new kernel. Actually, what this driver have is a number of hard coded irq numbers, and it tries to <strong>request_irq</strong> for this HW lines. I started to search what is the reason of request_irq failure, - the reason is that the appropriate IRQ descriptor (<strong>irq_desc</strong>) have <strong>IRQ_NOREQUEST</strong> flag set.</p>
  
  <p>I started to search where this flag is cleared, and found that it happens here:</p>
  
  <pre><code>of_platform_populate
            |
           ...
            |
     of_device_alloc
            |
           ...
            |
   irq_of_parse_and_map
  (some levels below this flag is dropped)
  </code></pre>
  
  <p>So that code is invoked from mach init code and parse DTB, all interrupt numbers that are mentioned in DTB would be mapped to irq virtual space and will be accessible through appropriate devices structures, for example:</p>
  
  <pre><code>irq = platform_get_irq(pdev, 0);
  </code></pre>
  
  <p>As I already said, this old - fashion drivers just have hard-coded irq numbers in include files, and they don't have no appropriate dtb entries.</p>
  
  <p>The question is what is the right way, from the kernel perspective of view, to port this? Do I need to make this old driver a platform device (now it is just a char device) and create appropriate dtb description for it? Or I can just use some kernel API to mark this interrupts as available? Is it a common/normal style?</p>