From patchwork Sun Sep 4 07:56:57 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 9312403 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 BAF4160865 for ; Sun, 4 Sep 2016 08:07:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A94082881F for ; Sun, 4 Sep 2016 08:07:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8CF28288F0; Sun, 4 Sep 2016 08:07:28 +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=-4.4 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 6A0F72881F for ; Sun, 4 Sep 2016 08:07:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751495AbcIDIH0 (ORCPT ); Sun, 4 Sep 2016 04:07:26 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:36437 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751015AbcIDIHY (ORCPT ); Sun, 4 Sep 2016 04:07:24 -0400 Received: by mail-wm0-f67.google.com with SMTP id l65so895259wmf.3 for ; Sun, 04 Sep 2016 01:07:24 -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=357nztjPtbFJyHEDDd9tS3v2A1i2nElh+CfcyoED4b4=; b=MNxGBolQayBj1/1iMAmNsZmLMvUvw42liToUDn7ntNho8FU4vW0NyWqR0tGvoYi8Vv Hv1mKs0KcNVimYUL8n/6IBLl/AbJtviQM4/vAsLwbCMVRDBlUGyM7T03YSlwrrvzhqqj VC/rZ0Kz1oQrBtHyGIA7/pcikTFC3yUP6M8WmM2XEc5lskYSqfpvur0Zw8Vc4DjPj+qu 46xPSBnY2N3W974uG+0AkqFz/ClY8Ctk4wJg18VxRzMTR/99jMv0eh6ecvu3KzUuklBi f8VYiK7bPpYrjzRrW97zFheHo7OzVCSY4xIVIrMq+7Gk5h7RDWAfkJcNgkCwFBhj9ubz Ma/A== 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=357nztjPtbFJyHEDDd9tS3v2A1i2nElh+CfcyoED4b4=; b=WZLjMvGZ303i/nVa6LCJ2Og942Z3Qii4W7ike/SmGacMKL6g/NFYdh4vSAVAyAmkJz 8YqyZDtMbq0TTuJlXPZ2w1Y8aY47Gqp/Ikgxz6/xbZyYMgX6OM1h0C4OdXcj19Zxfeps J9lTHx+Xx1Ix1H9OP6E9qJFp2KkK8TrH1Xjles5fggr43JMzCKusrPcrnM8BPRNwitj+ K6beGxtia3XkjBU3JQA68k+4zz1y5YDnWqOpcjFFI/97aDUxX6+pXPDK5v257SlQM+ec VUkHVKQ0SXGGxc6vPydD1V5U3kjjkO1P/34qdENFDMosiimPrRimw/rdXJrI/TqZDSa0 l/GA== X-Gm-Message-State: AE9vXwONG3d0zI1m+Fwd1rPB/JDDy96toBX4j0TQgMo4H7my8aS0dhPSaGzSP2E+l3ByCQ== X-Received: by 10.194.94.225 with SMTP id df1mr1008507wjb.51.1472976443347; Sun, 04 Sep 2016 01:07:23 -0700 (PDT) Received: from ?IPv6:2003:62:5f43:9500:c1f5:c528:a3d:f8c4? (p200300625F439500C1F5C5280A3DF8C4.dip0.t-ipconnect.de. [2003:62:5f43:9500:c1f5:c528:a3d:f8c4]) by smtp.googlemail.com with ESMTPSA id f4sm13037178wmf.8.2016.09.04.01.07.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 04 Sep 2016 01:07:22 -0700 (PDT) From: Heiner Kallweit Subject: [PATCH v2 02/18] spi: fsl-espi: simplify fsl_espi_setup_transfer To: Mark Brown References: Cc: "linux-spi@vger.kernel.org" Message-ID: Date: Sun, 4 Sep 2016 09:56:57 +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 --- 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;