From patchwork Thu Jan 23 13:05:56 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baruch Siach X-Patchwork-Id: 3528681 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 383B5C02DC for ; Thu, 23 Jan 2014 13:07:16 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9DEC1200F0 for ; Thu, 23 Jan 2014 13:07:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 06A3E20115 for ; Thu, 23 Jan 2014 13:07:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753869AbaAWNGl (ORCPT ); Thu, 23 Jan 2014 08:06:41 -0500 Received: from guitar.tcltek.co.il ([192.115.133.116]:36969 "EHLO mx.tkos.co.il" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753891AbaAWNGf (ORCPT ); Thu, 23 Jan 2014 08:06:35 -0500 Received: from tarshish.tkos.co.il (unknown [10.0.8.6]) by mx.tkos.co.il (Postfix) with ESMTPSA id DF1D7440AEB; Thu, 23 Jan 2014 15:06:32 +0200 (IST) From: Baruch Siach To: Mark Brown Cc: linux-spi@vger.kernel.org, Feng Tang , Baruch Siach , Jean-Hugues Deschenes Subject: [PATCH RFC 1/4] spi: dw-mmio: allow multiple instances Date: Thu, 23 Jan 2014 15:05:56 +0200 Message-Id: <74a507ce4370729cbc31c7e8d182821287ffcca1.1390481413.git.baruch@tkos.co.il> X-Mailer: git-send-email 1.8.5.2 In-Reply-To: References: Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 Use the platform_device id to uniquely identify each SPI master instance. Cc: Jean-Hugues Deschenes Signed-off-by: Baruch Siach --- drivers/spi/spi-dw-mmio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/spi/spi-dw-mmio.c b/drivers/spi/spi-dw-mmio.c index 9af56cdf1540..1492f5ee9aaa 100644 --- a/drivers/spi/spi-dw-mmio.c +++ b/drivers/spi/spi-dw-mmio.c @@ -66,7 +66,7 @@ static int dw_spi_mmio_probe(struct platform_device *pdev) if (ret) return ret; - dws->bus_num = 0; + dws->bus_num = pdev->id; dws->num_cs = 4; dws->max_freq = clk_get_rate(dwsmmio->clk);