From patchwork Wed Feb 5 13:59:18 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Axel Lin X-Patchwork-Id: 3586431 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 D4D60C02DC for ; Wed, 5 Feb 2014 13:59:26 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0E3592012E for ; Wed, 5 Feb 2014 13:59:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3C54720121 for ; Wed, 5 Feb 2014 13:59:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751339AbaBEN7Y (ORCPT ); Wed, 5 Feb 2014 08:59:24 -0500 Received: from mail-pa0-f48.google.com ([209.85.220.48]:53212 "EHLO mail-pa0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751170AbaBEN7Y (ORCPT ); Wed, 5 Feb 2014 08:59:24 -0500 Received: by mail-pa0-f48.google.com with SMTP id kx10so392668pab.35 for ; Wed, 05 Feb 2014 05:59:23 -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=P1878EfPYQbQVrbyz1fSUijCK3FRnoWmMA493k74/Nc=; b=A/6TKRFIqkc3doT5eReLwGTL6QFmXrw7uVK1tkoxZKBTLTFZXJ9Du9oD3gK59qKcBr jl0aditzlsYZdQXtOfWVttwJUA97uAEQIZvsb+JzF+kAT0iojrzkqNEZjmCQ7JS18V5Q 3WMEBp17nBigykJx3aeaGReA+18JU+mlObrMhF7Zz9moshidraXUo122A8oq7u88Ak6z 2F/+UP70UQmbALh3ITQMyllB+HkdtVgFPgiAV01jHnN6N5FP8MgFxl0DFbJ+O0HUlhmY Zzsadr9gbMZRvvXMb+7A1MJ3lEflUScKmAcp7k5QPLzPVyY7IUWSibS/DPY1LZkFkr8R sC0Q== X-Gm-Message-State: ALoCoQnUazp7bThWaXwSG6yGLpsWiZBo/DOFmqBbsAqQPalUA6mxfAm8+cwynaqvmzwWEubnb0F/ X-Received: by 10.68.183.228 with SMTP id ep4mr1847335pbc.67.1391608763469; Wed, 05 Feb 2014 05:59:23 -0800 (PST) Received: from [192.168.0.102] (218-164-132-53.dynamic.hinet.net. [218.164.132.53]) by mx.google.com with ESMTPSA id qh2sm49059952pab.13.2014.02.05.05.59.21 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 05 Feb 2014 05:59:22 -0800 (PST) Message-ID: <1391608758.5368.1.camel@phoenix> Subject: [PATCH] spi: Use SPI_BPW_MASK macro at appropriate places From: Axel Lin To: Mark Brown Cc: Scott Jiang , Sourav Poddar , linux-spi@vger.kernel.org Date: Wed, 05 Feb 2014 21:59:18 +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.4 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 Signed-off-by: Axel Lin --- drivers/spi/spi-bfin-v3.c | 3 ++- drivers/spi/spi-ti-qspi.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/spi/spi-bfin-v3.c b/drivers/spi/spi-bfin-v3.c index 8f85988..4089d0e 100644 --- a/drivers/spi/spi-bfin-v3.c +++ b/drivers/spi/spi-bfin-v3.c @@ -822,7 +822,8 @@ static int bfin_spi_probe(struct platform_device *pdev) master->cleanup = bfin_spi_cleanup; master->setup = bfin_spi_setup; master->transfer_one_message = bfin_spi_transfer_one_message; - master->bits_per_word_mask = BIT(32 - 1) | BIT(16 - 1) | BIT(8 - 1); + master->bits_per_word_mask = SPI_BPW_MASK(32) | SPI_BPW_MASK(16) | + SPI_BPW_MASK(8); drv_data = spi_master_get_devdata(master); drv_data->master = master; diff --git a/drivers/spi/spi-ti-qspi.c b/drivers/spi/spi-ti-qspi.c index 3d09265..7eb2cef 100644 --- a/drivers/spi/spi-ti-qspi.c +++ b/drivers/spi/spi-ti-qspi.c @@ -435,7 +435,8 @@ static int ti_qspi_probe(struct platform_device *pdev) master->auto_runtime_pm = true; master->transfer_one_message = ti_qspi_start_transfer_one; master->dev.of_node = pdev->dev.of_node; - master->bits_per_word_mask = BIT(32 - 1) | BIT(16 - 1) | BIT(8 - 1); + master->bits_per_word_mask = SPI_BPW_MASK(32) | SPI_BPW_MASK(16) | + SPI_BPW_MASK(8); if (!of_property_read_u32(np, "num-cs", &num_cs)) master->num_chipselect = num_cs;