[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <63386a3d0905311227v5bb5c278r306e8ae429e77691@mail.gmail.com>
Date: Sun, 31 May 2009 21:27:56 +0200
From: Linus Walleij <linus.ml.walleij@...il.com>
To: gregkh@...e.de, Baruch Siach <baruch@...s.co.il>
Cc: spi-devel-general@...ts.sourceforge.net,
David Brownell <dbrownell@...rs.sourceforge.net>,
linux-kernel@...r.kernel.org
Subject: Re: [spi-devel-general] [PATCH] spi: driver for the Synopsys
DesignWare SPI controller
2009/5/31 Baruch Siach <baruch@...s.co.il>:
>> > + r = platform_get_resource(dev, IORESOURCE_MEM, 0);
>> > + if (r == NULL) {
>> > + ret = -ENODEV;
>>
>> -ENOENT
>
> A quick search in the drivers tree showed no -ENOENT in this situation. Of the
> 10 first results of grep -ENODEV is the most popular as follows:
[The other: 3x -EINVAL one -ENXIO]
Wowsers! And I felt -ENOENT was so intuitive, well if I'm going against
common practice, no good. So let's ask the maintainer of the platform bus
what shall be returned in this situation:
Greg (or some other wise person from linux-kernel) what would you return if
platform_get_resource() returns NULL for an expected resource?
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists