From: Greg Ungerer <gerg-JBU5SbJe1FlAfugRpC6u6w@public.gmane.org>
To: Karl Beldan <karl.beldan-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [v3] spi: orion: support armada extended baud rates
Date: Tue, 14 Oct 2014 12:03:12 +1000 [thread overview]
Message-ID: <543C8460.1060508@uclinux.org> (raw)
In-Reply-To: <20141011144857.GA17350@gobelin>
Hi Karl,
On 12/10/14 00:52, Karl Beldan wrote:
> On 28/09/14 23:24:04, Greg Ungerer wrote:
>> @@ -378,6 +452,10 @@ static int orion_spi_probe(struct platform_device *pdev)
>> spi = spi_master_get_devdata(master);
>> spi->master = master;
>>
>> + of_id = of_match_device(orion_spi_of_match_table, &pdev->dev);
>> + devdata = of_id->data;
>> + spi->devdata = devdata;
>> +
> Won't of_match_device return NULL on non-DT systems, and further
> references oops ?
Yes, sure enough.
So I propose to fix with this change.
diff --git a/drivers/spi/spi-orion.c b/drivers/spi/spi-orion.c
index acf8e48..c069ccd 100644
--- a/drivers/spi/spi-orion.c
+++ b/drivers/spi/spi-orion.c
@@ -453,7 +453,7 @@ static int orion_spi_probe(struct platform_device *pdev)
spi->master = master;
of_id = of_match_device(orion_spi_of_match_table, &pdev->dev);
- devdata = of_id->data;
+ devdata = (of_id) ? of_id->data : &orion_spi_dev_data;
spi->devdata = devdata;
spi->clk = devm_clk_get(&pdev->dev, NULL);
Mark: This was generated on linux-3.17-rc7 with the first spi-orion
patch applied. What do you want it generated against?
Regards
Greg
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2014-10-14 2:03 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-28 13:24 [PATCH v3] spi: orion: support armada extended baud rates gerg-JBU5SbJe1FlAfugRpC6u6w
[not found] ` <1411910644-7174-1-git-send-email-gerg-JBU5SbJe1FlAfugRpC6u6w@public.gmane.org>
2014-10-01 18:22 ` Mark Brown
2014-10-11 14:52 ` [v3] " Karl Beldan
2014-10-13 12:48 ` Mark Brown
2014-10-14 2:03 ` Greg Ungerer [this message]
[not found] ` <543C8460.1060508-JBU5SbJe1FlAfugRpC6u6w@public.gmane.org>
2014-10-15 13:10 ` Karl Beldan
2014-10-17 4:53 ` Greg Ungerer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=543C8460.1060508@uclinux.org \
--to=gerg-jbu5sbje1flafugrpc6u6w@public.gmane.org \
--cc=broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=karl.beldan-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).