lkml.org 
[lkml]   [2006]   [Jul]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: request_irq() return value
    Date
    On Thu, 27 Jul 2006 19:50:03 +0200
    Mariusz Kozlowski <m.kozlowski@tuxland.pl> wrote:

    > Hello,
    >
    > I'm looking at the source code of different drivers and wondering about
    > request_irq() return value. It is used mostly in 'open' routine of struct
    > net_device. If request_irq() fails some drivers return -EAGAIN, some -EBUSY
    > and some the return value of request_irq(). Is this intentional? Sample
    > drivers code:

    Correct practice is to propagate the error code of request_irq out to be
    the return value of the open routine. This allows the request_irq to return
    different values for overlapping irqs, or out of memory, etc.

    > Besides request_irq() is arch dependent so depending on arch it has different
    > set of possible return values. So ... does the return value matter or I
    > misunderstood something here?

    Each architecture should return something sane. If it doesn't then it a problem
    that should be addressed there.
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2006-07-27 20:17    [W:3.832 / U:0.008 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site