From patchwork Thu Aug 25 04:51:43 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 9298651 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 8166160757 for ; Thu, 25 Aug 2016 04:55:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 71A4F291C0 for ; Thu, 25 Aug 2016 04:55:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 66AAF291C8; Thu, 25 Aug 2016 04:55:34 +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=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, 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 07481291C0 for ; Thu, 25 Aug 2016 04:55:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755375AbcHYEym (ORCPT ); Thu, 25 Aug 2016 00:54:42 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:34887 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754718AbcHYExg (ORCPT ); Thu, 25 Aug 2016 00:53:36 -0400 Received: by mail-wm0-f65.google.com with SMTP id i5so5640530wmg.2 for ; Wed, 24 Aug 2016 21:53:35 -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=otCkv3yvJFphDXS1ng4A60ZuVrCQzmpUvL4izABSdz0=; b=aDzataCBPl7dvgucIsS0j4FqeVq5366Dbo2XvIuLLw4OdG6RW9vJ+DpGicHf2Ei84Y /Cl7JzKC3yGpEXvigA4jmAofeNjbkwJ6Q5CUbdpR99ADr/yf64pViyd3i0JNeqfZMy3/ Xg4jqVSmjYQwVq1NOdfsWcGxDu2tEqXiMPIjRLdoUYGFy2gBavZpuKTC99Y7PzyehNvP LNiG9rvwYliLYDUgomzmhT+yNywjOY4K0HBQsH01FEp0mDmfHWVMcQFwOH4iD6aSQHyf ZH7syTK4jf00SVD4C2C+7YhctUhn0ZN5nIe6ZvWXMEYIfXYwtrBkBr+uSlbph0oM+wCl GETQ== 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=otCkv3yvJFphDXS1ng4A60ZuVrCQzmpUvL4izABSdz0=; b=Hm6ASOx1PjTN0cBGvkv1wXPNjqRw88MyW6GUrcrpmns/SmXbV0ftJ0LowqHVdbxNm/ BTK0Z7BevHTvRuswUiEygx91a9zCi4+5RlWkExNkLRUECeCIMvXoG2ByWK2S684OUqwX XnxP9KTKUz0BNAJQEUEQ6NIiP9fo3tRImie8btOhlvAUzzpstm3Cwns10YOTiDQYjJbL hkNmHYchlhFKm6XrxnUGi1HxXbQAEa3SzqalxrppuNmn57KU8VHhroRl33/tLwZyP4HS p5fLD5tacuRbhefTbru069U8H4WdnC78GR3s8nblN6CfoSv5IjOhWMUWAKDULrny7SLq d7Fw== X-Gm-Message-State: AEkoouuyTUDjl49wluVvNTowLqmeLQtHf82SGY/z2EAaFAgWTn3pN3KNH6oPD0iR8+Y/cQ== X-Received: by 10.194.145.103 with SMTP id st7mr5501586wjb.61.1472100814837; Wed, 24 Aug 2016 21:53:34 -0700 (PDT) Received: from ?IPv6:2003:62:5f43:9500:dd82:2805:e44f:720e? (p200300625F439500DD822805E44F720E.dip0.t-ipconnect.de. [2003:62:5f43:9500:dd82:2805:e44f:720e]) by smtp.googlemail.com with ESMTPSA id bj8sm13070164wjc.49.2016.08.24.21.53.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 24 Aug 2016 21:53:34 -0700 (PDT) From: Heiner Kallweit Subject: [PATCH 21/23] spi: fsl-espi: simplify fsl_espi_setup_transfer To: Mark Brown References: Cc: "linux-spi@vger.kernel.org" Message-ID: Date: Thu, 25 Aug 2016 06:51:43 +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 --- 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 d348a66..a5a67ce 100644 --- a/drivers/spi/spi-fsl-espi.c +++ b/drivers/spi/spi-fsl-espi.c @@ -210,12 +210,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;