From patchwork Fri Sep 2 20:24:08 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 9311593 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 65A7360772 for ; Fri, 2 Sep 2016 20:24:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5691E29306 for ; Fri, 2 Sep 2016 20:24:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4AF7E2985E; Fri, 2 Sep 2016 20:24:23 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DF2CD29306 for ; Fri, 2 Sep 2016 20:24:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751488AbcIBUYW (ORCPT ); Fri, 2 Sep 2016 16:24:22 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:35486 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751124AbcIBUYV (ORCPT ); Fri, 2 Sep 2016 16:24:21 -0400 Received: by mail-wm0-f66.google.com with SMTP id c133so4221109wmd.2 for ; Fri, 02 Sep 2016 13:24:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:subject:to:references:cc:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=kpT4pMZ4pkc9M79wNCzXaBn4Kc+Sn3DsG+gXFQFuOSY=; b=Fo2Oj4nfl9Lf72z5yzzEwuRLPna92/j0mF7vQNdfQdmWkrmsqjq9y7dM6JlMSWkpzj 0FUi1W2j3EpCV020xa8bOKfVLlu26M6XMMsTbL0DjkVLe+cxOGuksZGT4ZisJnNI1nCf psBGkZUL5NQYQ4duhIyq3PZMSaHFtlANRZhgMRfz7dYmRSKUJvH5w/r8hHZIIS9yexM6 OqxgNf9XS/cZe8Dx3G/om5AWYsMtSKtHdE0jndIN2DY9+gQZlbId5Glvuk0ulKodxEOw gzY36Mk23PzfBRaWHNSaWImTUYvQVvf4wbUMfcTabXLSq5M/ocwgMIkgb9zix9XwO3kl 3jIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:subject:to:references:cc:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=kpT4pMZ4pkc9M79wNCzXaBn4Kc+Sn3DsG+gXFQFuOSY=; b=I8QEQevaKLXADbfX+CKQD0YvDV1UnxZAAu5gYJHvnqAiQSTSB+825ALNseD1Nx29oT LlzREdTpLxVXkNDS+zdTK9Bkz2gYApuUh0sxRtRT5lYS4L6OM256WqNJd8lv6STXLd0e nu8UDkdI8HHEjE1TRFW9gPQrDU+xEahqRKsAwfnkacaqidaFYkchnBb4BrkHvQvdRNYD dla2FuIlAiPlDKUphQf5r9YgE+4DzUJqlNaH7PmCXjYl8lQQl6eDVZbsvdLoCihl91qk jRnoAijkYG4jePNcH3MlV55ZlmvIpQ3CqPkQtvlLYgsuZnljTXu5LokKYkIqdZDF0FXx I+iw== X-Gm-Message-State: AE9vXwMDK8EIoNURfvv48pEek3sOob7S6ENtKYcN48Xly4UnK/i/ppIh2fhNKOaRQbeEXA== X-Received: by 10.194.95.36 with SMTP id dh4mr22819234wjb.149.1472847859819; Fri, 02 Sep 2016 13:24:19 -0700 (PDT) Received: from ?IPv6:2003:62:5f43:9500:39ed:a1fb:9a43:e02d? (p200300625F43950039EDA1FB9A43E02D.dip0.t-ipconnect.de. [2003:62:5f43:9500:39ed:a1fb:9a43:e02d]) by smtp.googlemail.com with ESMTPSA id lv9sm12071288wjb.22.2016.09.02.13.24.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 02 Sep 2016 13:24:19 -0700 (PDT) From: Heiner Kallweit Subject: [PATCH v2 09/23] spi: fsl-espi: simplify fsl_espi_setup_transfer To: Mark Brown References: Cc: "linux-spi@vger.kernel.org" Message-ID: Date: Fri, 2 Sep 2016 22:24:08 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Simplify fsl_espi_setup_transfer a little. Signed-off-by: Heiner Kallweit --- v2: - changed order of patches to do trivial changes first (was patch 21 of the series before) --- drivers/spi/spi-fsl-espi.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/spi/spi-fsl-espi.c b/drivers/spi/spi-fsl-espi.c index c0023c0..51696a6 100644 --- a/drivers/spi/spi-fsl-espi.c +++ b/drivers/spi/spi-fsl-espi.c @@ -187,12 +187,10 @@ static void fsl_espi_setup_transfer(struct spi_device *spi, mpc8xxx_spi->get_rx = cs->get_rx; mpc8xxx_spi->get_tx = cs->get_tx; - bits_per_word = bits_per_word - 1; - /* mask out bits we are going to set */ cs->hw_mode &= ~(CSMODE_LEN(0xF) | CSMODE_DIV16 | CSMODE_PM(0xF)); - cs->hw_mode |= CSMODE_LEN(bits_per_word); + cs->hw_mode |= CSMODE_LEN(bits_per_word - 1); if ((mpc8xxx_spi->spibrg / hz) > 64) { cs->hw_mode |= CSMODE_DIV16;