From patchwork Mon Nov 26 10:09:47 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Roese X-Patchwork-Id: 1801421 Return-Path: X-Original-To: patchwork-spi-devel-general@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from lists.sourceforge.net (lists.sourceforge.net [216.34.181.88]) by patchwork2.kernel.org (Postfix) with ESMTP id 05E98DF230 for ; Mon, 26 Nov 2012 10:28:20 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=sfs-ml-4.v29.ch3.sourceforge.com) by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1TcvvC-0005of-UT; Mon, 26 Nov 2012 10:28:14 +0000 Received: from sog-mx-1.v43.ch3.sourceforge.com ([172.29.43.191] helo=mx.sourceforge.net) by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1TcvvB-0005oQ-4k for spi-devel-general@lists.sourceforge.net; Mon, 26 Nov 2012 10:28:13 +0000 X-ACL-Warn: Received: from mo-p05-ob.rzone.de ([81.169.146.180]) by sog-mx-1.v43.ch3.sourceforge.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) id 1Tcvv7-0001mk-OB for spi-devel-general@lists.sourceforge.net; Mon, 26 Nov 2012 10:28:13 +0000 X-RZG-AUTH: :IW0NeWC7b/q2i6W/qstXb1SBUuFnrGohdvpEkce+Ub4+ReKfHD+mCZ6G5UE49A== X-RZG-CLASS-ID: mo05 Received: from ubuntu-2012.fritz.box (p57B944DE.dip.t-dialin.net [87.185.68.222]) by smtp.strato.de (joses mo47) (RZmta 31.5 DYNA|AUTH) with ESMTPA id K0351doAQ97KML ; Mon, 26 Nov 2012 11:09:54 +0100 (CET) From: Stefan Roese To: spi-devel-general@lists.sourceforge.net Subject: [PATCH] spi: spi-mpc52xx.c: Init bus_num to 0 as this driver only supports one bus Date: Mon, 26 Nov 2012 11:09:47 +0100 Message-Id: <1353924587-31339-1-git-send-email-sr@denx.de> X-Mailer: git-send-email 1.8.0 X-Spam-Score: -0.2 (/) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [81.169.146.180 listed in list.dnswl.org] -0.2 AWL AWL: From: address is in the auto white-list X-Headers-End: 1Tcvv7-0001mk-OB Cc: Anatolij Gustschin X-BeenThere: spi-devel-general@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: Linux SPI core/device drivers discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: spi-devel-general-bounces@lists.sourceforge.net By setting bus_num to 0 the resulting device is named "spi0". Otherwise the name was "spi32766" (dynamic numbering) which was a bit confusing. Using 0 is correct as this driver (and the MPC5200 SPI controller) only supports one SPI bus. Signed-off-by: Stefan Roese Cc: Anatolij Gustschin Cc: grant.likely@secretlab.ca --- drivers/spi/spi-mpc52xx.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/spi/spi-mpc52xx.c b/drivers/spi/spi-mpc52xx.c index 0454106..b40370c 100644 --- a/drivers/spi/spi-mpc52xx.c +++ b/drivers/spi/spi-mpc52xx.c @@ -438,6 +438,9 @@ static int __devinit mpc52xx_spi_probe(struct platform_device *op) master->mode_bits = SPI_CPOL | SPI_CPHA | SPI_LSB_FIRST; master->dev.of_node = op->dev.of_node; + /* Only one SPI bus from this driver possible */ + master->bus_num = 0; + dev_set_drvdata(&op->dev, master); ms = spi_master_get_devdata(master);