lkml.org 
[lkml]   [2016]   [Sep]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH] mfd: ucb1x00: remove NO_IRQ check
    Date
    probe_irq_off() returns '0' on failure, not NO_IRQ, so the check
    in this driver is clearly wrong. This replaces it with the
    regular '!irq' check used in other drivers.

    The sa1100 platform that this driver is used on originally numbered
    all its interrupts starting at '0', which would have conflicted with
    this change, but as of commit 18f3aec ("ARM: 8230/1: sa1100: shift
    IRQs by one"), this is not a problem any more.

    Signed-off-by: Arnd Bergmann <arnd@arndb.de>
    ---
    drivers/mfd/ucb1x00-core.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    diff --git a/drivers/mfd/ucb1x00-core.c b/drivers/mfd/ucb1x00-core.c
    index 48bea5038654..d6fb2e1a759a 100644
    --- a/drivers/mfd/ucb1x00-core.c
    +++ b/drivers/mfd/ucb1x00-core.c
    @@ -537,7 +537,7 @@ static int ucb1x00_probe(struct mcp *mcp)
    ucb1x00_enable(ucb);
    ucb->irq = ucb1x00_detect_irq(ucb);
    ucb1x00_disable(ucb);
    - if (ucb->irq == NO_IRQ) {
    + if (!ucb->irq) {
    dev_err(&ucb->dev, "IRQ probe failed\n");
    ret = -ENODEV;
    goto err_no_irq;
    --
    2.9.0
    \
     
     \ /
      Last update: 2016-09-17 09:58    [W:5.782 / U:0.148 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site