lkml.org 
[lkml]   [2006]   [Jan]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[DRIVER CORE] platform_get_irq*(): return NO_IRQ on error
    platform_get_irq*() cannot return 0 on error as 0 is a valid IRQ on some
    platforms, return NO_IRQ (-1) instead.

    Signed-off-by: David Vrabel <dvrabel@arcom.com>
    --
    David Vrabel, Design Engineer

    Arcom, Clifton Road Tel: +44 (0)1223 411200 ext. 3233
    Cambridge CB1 7EA, UK Web: http://www.arcom.com/
    Index: linux-2.6-working/drivers/base/platform.c
    ===================================================================
    --- linux-2.6-working.orig/drivers/base/platform.c 2006-01-05 16:49:23.000000000 +0000
    +++ linux-2.6-working/drivers/base/platform.c 2006-01-05 17:10:18.000000000 +0000
    @@ -59,7 +59,7 @@
    {
    struct resource *r = platform_get_resource(dev, IORESOURCE_IRQ, num);

    - return r ? r->start : 0;
    + return r ? r->start : NO_IRQ;
    }

    /**
    @@ -94,7 +94,7 @@
    {
    struct resource *r = platform_get_resource_byname(dev, IORESOURCE_IRQ, name);

    - return r ? r->start : 0;
    + return r ? r->start : NO_IRQ;
    }

    /**
    \
     
     \ /
      Last update: 2006-01-05 18:15    [W:0.032 / U:30.424 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site