From patchwork Tue Feb 11 14:10:19 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Axel Lin X-Patchwork-Id: 3627361 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 43F3CBF418 for ; Tue, 11 Feb 2014 14:10:35 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 39E862015D for ; Tue, 11 Feb 2014 14:10:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 091F220117 for ; Tue, 11 Feb 2014 14:10:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751065AbaBKOKc (ORCPT ); Tue, 11 Feb 2014 09:10:32 -0500 Received: from mail-pb0-f46.google.com ([209.85.160.46]:57788 "EHLO mail-pb0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750984AbaBKOKb (ORCPT ); Tue, 11 Feb 2014 09:10:31 -0500 Received: by mail-pb0-f46.google.com with SMTP id um1so7676888pbc.5 for ; Tue, 11 Feb 2014 06:10:31 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:subject:from:to:cc:date:content-type :mime-version:content-transfer-encoding; bh=7thPAaBKaRZx9eV4W3JVtvgq2NUVJCiF6qc55RTgiu4=; b=F3BFTvZsLBVb0V/XUb/WrFCNV+59n9vX2hXO+uVaiJR1bNqYsqoy7UIQ2qIHI5CAX4 UtylfJHD3suic+D60OWPjvtTK/YJoaEe60IU00bNkpqucr8VIrJE2zpKsilM3YAg2gDB 2ROFnWtgNLlGc6T3iKieAnJXEmP08WsBNIq0WUzBCwmlRC+jpDmq2FY78TccUzdVJemL SP2aid5qqxImDqj1SGFr4UflUMi4UGzsyGAJ5kXu5uG3jsDLlQqW4uiEEdqOs1dm2ept Q0X/eDFzAdSKIsIOSOLGfrOxKdgIpvXxfMpfD4gtzgL1B12aIKFMcDIJUqQ7whjNgStl p11w== X-Gm-Message-State: ALoCoQlGLlKWocgm2NmVqo35KaDmDEGaybCedHciF/dhLfu6MKNIuIe/OBWncPvLb1/4vyDtJQXR X-Received: by 10.66.26.176 with SMTP id m16mr16126216pag.142.1392127831187; Tue, 11 Feb 2014 06:10:31 -0800 (PST) Received: from [10.145.55.56] ([60.245.65.194]) by mx.google.com with ESMTPSA id pe3sm53474825pbc.23.2014.02.11.06.10.27 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 11 Feb 2014 06:10:30 -0800 (PST) Message-ID: <1392127819.9833.3.camel@phoenix> Subject: [PATCH] spi: Remove explictly set bus_num and num_chipselect to default setting From: Axel Lin To: Mark Brown Cc: Chris Boot , Uwe =?ISO-8859-1?Q?Kleine-K=F6nig?= , Thomas Langer , David Daney , Kuninori Morimoto , Laxman Dewangan , Stephen Warren , Sourav Poddar , linux-spi@vger.kernel.org Date: Tue, 11 Feb 2014 22:10:19 +0800 X-Mailer: Evolution 3.6.4-0ubuntu1 Mime-Version: 1.0 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 The purpose of commit 1e8a52e18cfb "spi: By default setup spi_masters with 1 chipselect and dynamics bus number" is to avoid setting default value for bus_num and num_chipselect in spi master drivers. So let's remove the duplicate code. Cc: Chris Boot Cc: Uwe Kleine-König Cc: Thomas Langer Cc: David Daney Cc: Kuninori Morimoto Cc: Laxman Dewangan Cc: Stephen Warren Cc: Sourav Poddar Signed-off-by: Axel Lin Acked-by: Uwe Kleine-König Acked-By: David Daney --- drivers/spi/spi-bcm2835.c | 1 - drivers/spi/spi-efm32.c | 4 ---- drivers/spi/spi-falcon.c | 2 -- drivers/spi/spi-octeon.c | 2 -- drivers/spi/spi-sh-hspi.c | 1 - drivers/spi/spi-tegra114.c | 1 - drivers/spi/spi-tegra20-sflash.c | 1 - drivers/spi/spi-tegra20-slink.c | 1 - drivers/spi/spi-ti-qspi.c | 1 - 9 files changed, 14 deletions(-) diff --git a/drivers/spi/spi-bcm2835.c b/drivers/spi/spi-bcm2835.c index 8a89dd1..6916745 100644 --- a/drivers/spi/spi-bcm2835.c +++ b/drivers/spi/spi-bcm2835.c @@ -315,7 +315,6 @@ static int bcm2835_spi_probe(struct platform_device *pdev) master->mode_bits = BCM2835_SPI_MODE_BITS; master->bits_per_word_mask = SPI_BPW_MASK(8); - master->bus_num = -1; master->num_chipselect = 3; master->transfer_one_message = bcm2835_spi_transfer_one; master->dev.of_node = pdev->dev.of_node; diff --git a/drivers/spi/spi-efm32.c b/drivers/spi/spi-efm32.c index 03cbb5e..f53bbea 100644 --- a/drivers/spi/spi-efm32.c +++ b/drivers/spi/spi-efm32.c @@ -308,10 +308,6 @@ static int efm32_spi_probe_dt(struct platform_device *pdev, } ddata->pdata.location = location; - - /* spi core takes care about the bus number using an alias */ - master->bus_num = -1; - return 0; } diff --git a/drivers/spi/spi-falcon.c b/drivers/spi/spi-falcon.c index 0ae7f45..09965f0 100644 --- a/drivers/spi/spi-falcon.c +++ b/drivers/spi/spi-falcon.c @@ -419,9 +419,7 @@ static int falcon_sflash_probe(struct platform_device *pdev) priv->master = master; master->mode_bits = SPI_MODE_3; - master->num_chipselect = 1; master->flags = SPI_MASTER_HALF_DUPLEX; - master->bus_num = -1; master->setup = falcon_sflash_setup; master->prepare_transfer_hardware = falcon_sflash_prepare_xfer; master->transfer_one_message = falcon_sflash_xfer_one; diff --git a/drivers/spi/spi-octeon.c b/drivers/spi/spi-octeon.c index cf88974..a4805f2 100644 --- a/drivers/spi/spi-octeon.c +++ b/drivers/spi/spi-octeon.c @@ -257,8 +257,6 @@ static int octeon_spi_probe(struct platform_device *pdev) p->register_base = (u64)devm_ioremap(&pdev->dev, res_mem->start, resource_size(res_mem)); - /* Dynamic bus numbering */ - master->bus_num = -1; master->num_chipselect = 4; master->mode_bits = SPI_CPHA | SPI_CPOL | diff --git a/drivers/spi/spi-sh-hspi.c b/drivers/spi/spi-sh-hspi.c index 82d2f92..755d7cc 100644 --- a/drivers/spi/spi-sh-hspi.c +++ b/drivers/spi/spi-sh-hspi.c @@ -298,7 +298,6 @@ static int hspi_probe(struct platform_device *pdev) pm_runtime_enable(&pdev->dev); - master->num_chipselect = 1; master->bus_num = pdev->id; master->setup = hspi_setup; master->cleanup = hspi_cleanup; diff --git a/drivers/spi/spi-tegra114.c b/drivers/spi/spi-tegra114.c index 3d10ece..4006495 100644 --- a/drivers/spi/spi-tegra114.c +++ b/drivers/spi/spi-tegra114.c @@ -1042,7 +1042,6 @@ static int tegra_spi_probe(struct platform_device *pdev) master->setup = tegra_spi_setup; master->transfer_one_message = tegra_spi_transfer_one_message; master->num_chipselect = MAX_CHIP_SELECT; - master->bus_num = -1; master->auto_runtime_pm = true; tspi->master = master; diff --git a/drivers/spi/spi-tegra20-sflash.c b/drivers/spi/spi-tegra20-sflash.c index 5db73c0..47869ea 100644 --- a/drivers/spi/spi-tegra20-sflash.c +++ b/drivers/spi/spi-tegra20-sflash.c @@ -450,7 +450,6 @@ static int tegra_sflash_probe(struct platform_device *pdev) master->transfer_one_message = tegra_sflash_transfer_one_message; master->auto_runtime_pm = true; master->num_chipselect = MAX_CHIP_SELECT; - master->bus_num = -1; platform_set_drvdata(pdev, master); tsd = spi_master_get_devdata(master); diff --git a/drivers/spi/spi-tegra20-slink.c b/drivers/spi/spi-tegra20-slink.c index 8e21651..e3c1b93 100644 --- a/drivers/spi/spi-tegra20-slink.c +++ b/drivers/spi/spi-tegra20-slink.c @@ -1038,7 +1038,6 @@ static int tegra_slink_probe(struct platform_device *pdev) master->unprepare_message = tegra_slink_unprepare_message; master->auto_runtime_pm = true; master->num_chipselect = MAX_CHIP_SELECT; - master->bus_num = -1; platform_set_drvdata(pdev, master); tspi = spi_master_get_devdata(master); diff --git a/drivers/spi/spi-ti-qspi.c b/drivers/spi/spi-ti-qspi.c index 7eb2cef..49ddfc7 100644 --- a/drivers/spi/spi-ti-qspi.c +++ b/drivers/spi/spi-ti-qspi.c @@ -429,7 +429,6 @@ static int ti_qspi_probe(struct platform_device *pdev) master->mode_bits = SPI_CPOL | SPI_CPHA | SPI_RX_DUAL | SPI_RX_QUAD; - master->bus_num = -1; master->flags = SPI_MASTER_HALF_DUPLEX; master->setup = ti_qspi_setup; master->auto_runtime_pm = true;