From patchwork Tue Jul 10 09:44:22 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Wang X-Patchwork-Id: 1177031 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 61B7ADFF34 for ; Tue, 10 Jul 2012 11:15:59 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=sfs-ml-2.v29.ch3.sourceforge.com) by sfs-ml-2.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1SoYQA-00022E-IN; Tue, 10 Jul 2012 11:15:58 +0000 Received: from sog-mx-4.v43.ch3.sourceforge.com ([172.29.43.194] helo=mx.sourceforge.net) by sfs-ml-2.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1SoYQ8-000228-Mz for spi-devel-general@lists.sourceforge.net; Tue, 10 Jul 2012 11:15:56 +0000 Received-SPF: neutral (sog-mx-4.v43.ch3.sourceforge.com: 147.11.1.11 is neither permitted nor denied by domain of gmail.com) client-ip=147.11.1.11; envelope-from=jason77.wang@gmail.com; helo=mail.windriver.com; Received: from mail.windriver.com ([147.11.1.11]) by sog-mx-4.v43.ch3.sourceforge.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) id 1SoYQ2-0006lg-UF for spi-devel-general@lists.sourceforge.net; Tue, 10 Jul 2012 11:15:56 +0000 Received: from ALA-HCA.corp.ad.wrs.com (ala-hca [147.11.189.40]) by mail.windriver.com (8.14.3/8.14.3) with ESMTP id q6A9iMFH019435 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL); Tue, 10 Jul 2012 02:44:22 -0700 (PDT) Received: from localhost.localdomain (128.224.163.220) by ALA-HCA.corp.ad.wrs.com (147.11.189.50) with Microsoft SMTP Server id 14.1.255.0; Tue, 10 Jul 2012 02:44:21 -0700 From: Hui Wang To: , Subject: [PATCH 1/2] spi/imx: remove redundant config.speed_hz setting Date: Tue, 10 Jul 2012 17:44:22 +0800 Message-ID: <1341913463-10128-2-git-send-email-jason77.wang@gmail.com> X-Mailer: git-send-email 1.5.6.5 In-Reply-To: <1341913463-10128-1-git-send-email-jason77.wang@gmail.com> References: <1341913463-10128-1-git-send-email-jason77.wang@gmail.com> MIME-Version: 1.0 X-Spam-Score: 0.9 (/) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (jason77.wang[at]gmail.com) 0.0 DKIM_ADSP_CUSTOM_MED No valid author signature, adsp_override is CUSTOM_MED 0.7 SPF_NEUTRAL SPF: sender does not match SPF record (neutral) 1.2 NML_ADSP_CUSTOM_MED ADSP custom_med hit, and not from a mailing list -0.9 AWL AWL: From: address is in the auto white-list X-Headers-End: 1SoYQ2-0006lg-UF Cc: spi-devel-general@lists.sourceforge.net 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: , Errors-To: spi-devel-general-bounces@lists.sourceforge.net The config.speed_hz is just setted at the two lines ahead of it, obviously we don't need to copy the code to set the config.speed_hz again. Remove it for a cleanup. Cc: Sascha Hauer Cc: Grant Likely Signed-off-by: Hui Wang --- drivers/spi/spi-imx.c | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/drivers/spi/spi-imx.c b/drivers/spi/spi-imx.c index 47877d6..c12052f 100644 --- a/drivers/spi/spi-imx.c +++ b/drivers/spi/spi-imx.c @@ -688,8 +688,6 @@ static int spi_imx_setupxfer(struct spi_device *spi, config.speed_hz = spi->max_speed_hz; if (!config.bpw) config.bpw = spi->bits_per_word; - if (!config.speed_hz) - config.speed_hz = spi->max_speed_hz; /* Initialize the functions for transfer */ if (config.bpw <= 8) {