From patchwork Tue Oct 14 02:03:12 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Ungerer X-Patchwork-Id: 5077671 Return-Path: X-Original-To: patchwork-linux-spi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id E64C6C11AC for ; Tue, 14 Oct 2014 02:03:29 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 83E5220176 for ; Tue, 14 Oct 2014 02:03:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id AF02720154 for ; Tue, 14 Oct 2014 02:03:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754037AbaJNCDX (ORCPT ); Mon, 13 Oct 2014 22:03:23 -0400 Received: from icp-osb-irony-out4.external.iinet.net.au ([203.59.1.220]:19271 "EHLO icp-osb-irony-out4.external.iinet.net.au" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753966AbaJNCDW (ORCPT ); Mon, 13 Oct 2014 22:03:22 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: An8DAOWDPFSVhxBY/2dsb2JhbAANToc/tRgGl2iDIQKBLgGFAAEBBCMEUQEQCw0LAgIFFgsCAgkDAgECAUUGDQEHAQG4A3iVBgEBAQEBAQEBAgEBAQEBAQEbgSyEdIolB4J3gVQBBKVakguDJAEBAQ X-IronPort-AV: E=Sophos;i="5.04,714,1406563200"; d="scan'208";a="370924459" Received: from unknown (HELO [172.16.0.22]) ([149.135.16.88]) by icp-osb-irony-out4.iinet.net.au with ESMTP; 14 Oct 2014 10:03:14 +0800 Message-ID: <543C8460.1060508@uclinux.org> Date: Tue, 14 Oct 2014 12:03:12 +1000 From: Greg Ungerer User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.2 MIME-Version: 1.0 To: Karl Beldan CC: broonie@kernel.org, linux-spi@vger.kernel.org, devicetree@vger.kernel.org Subject: Re: [v3] spi: orion: support armada extended baud rates References: <20141011144857.GA17350@gobelin> In-Reply-To: <20141011144857.GA17350@gobelin> Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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. 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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);