[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAOesGMjtur-yf1+Sgn-Gb1AufSZyo8cUAkb4x_6TNvtBXdnE=g@mail.gmail.com>
Date: Tue, 13 May 2014 13:37:17 -0700
From: Olof Johansson <olof@...om.net>
To: Frank Rowand <frowand.list@...il.com>
Cc: Rob Herring <robherring2@...il.com>,
Grant Likely <grant.likely@...aro.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
"Ivan T. Ivanov" <iivanov@...sol.com>,
Josh Cartwright <joshc@...eaurora.org>,
Courtney Cavin <courtney.cavin@...ymobile.com>,
Bjorn Andersson <bjorn@...o.se>, Rob Herring <robh@...nel.org>
Subject: Re: [PATCH 2/4] of/platform: return error on of_platform_device_create_pdata
failure
On Tue, May 13, 2014 at 1:32 PM, Frank Rowand <frowand.list@...il.com> wrote:
> On 5/13/2014 10:56 AM, Olof Johansson wrote:
>> On Wed, May 07, 2014 at 04:48:16PM -0500, Rob Herring wrote:
>>> From: Rob Herring <robh@...nel.org>
>>>
>>> of_platform_populate does not return an error if creating the platform
>>> device fails. This means almost any error from driver core cannot be
>>> detected by the caller. Fix this.
>>>
>>> Signed-off-by: Rob Herring <robh@...nel.org>
>>> ---
>>> drivers/of/platform.c | 4 +++-
>>> 1 file changed, 3 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/of/platform.c b/drivers/of/platform.c
>>> index 404d1da..622aeb3 100644
>>> --- a/drivers/of/platform.c
>>> +++ b/drivers/of/platform.c
>>> @@ -391,7 +391,9 @@ static int of_platform_bus_create(struct device_node *bus,
>>> }
>>>
>>> dev = of_platform_device_create_pdata(bus, bus_id, platform_data, parent);
>>> - if (!dev || !of_match_node(matches, bus))
>>> + if (!dev)
>>> + return -ENODEV;
>>> + if (!of_match_node(matches, bus))
>>> return 0;
>>>
>>> for_each_child_of_node(bus, child) {
>>
>> This patch caused every single MMC driver to break on OF platforms, as far
>> as I can tell. Reverting it on last night's -next seems to resolve it.
>>
>> The problem seems to be that of_platform_populate() will bail on the
>> first device that fails this.
>>
>> How did you test this code, Frank? On what platform? Practically all my
>> targets here failed to mount rootfs from eMMC or SD card...
>
> I tested on a dragonboard, but without a working sdhci driver. Thus I would not
> have hit the error.
Yeah, or more generically: Without a device that would have been
probed after the first status = "disabled" device that was found.
Makes sense, especially since dragonboard support is still not quite
there.
Ah well, it means the -next process is working, after all. :)
-Olof
--
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