From patchwork Tue Oct 27 15:48:16 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 7497561 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.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 4BB45BEEA4 for ; Tue, 27 Oct 2015 15:48:55 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 49C7420862 for ; Tue, 27 Oct 2015 15:48:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 67F6320864 for ; Tue, 27 Oct 2015 15:48:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964838AbbJ0Psw (ORCPT ); Tue, 27 Oct 2015 11:48:52 -0400 Received: from mga09.intel.com ([134.134.136.24]:48761 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964831AbbJ0Psv (ORCPT ); Tue, 27 Oct 2015 11:48:51 -0400 Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga102.jf.intel.com with ESMTP; 27 Oct 2015 08:48:50 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,205,1444719600"; d="scan'208";a="589000240" Received: from black.fi.intel.com ([10.237.72.93]) by FMSMGA003.fm.intel.com with ESMTP; 27 Oct 2015 08:48:50 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 36C6FA8; Tue, 27 Oct 2015 17:48:17 +0200 (EET) From: Andy Shevchenko To: linux-spi@vger.kernel.org, Mark Brown Cc: Andy Shevchenko Subject: [PATCH v1 1/1] spi: dw: replace magic constant by DW_SPI_DR Date: Tue, 27 Oct 2015 17:48:16 +0200 Message-Id: <1445960896-118379-1-git-send-email-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.6.1 Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 The offset 0x60 is the offset of the data register defined as DW_SPI_DR in the header file. Use it. Signed-off-by: Andy Shevchenko --- drivers/spi/spi-dw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/spi/spi-dw.c b/drivers/spi/spi-dw.c index cc2e980..882cd66 100644 --- a/drivers/spi/spi-dw.c +++ b/drivers/spi/spi-dw.c @@ -483,7 +483,7 @@ int dw_spi_add_host(struct device *dev, struct dw_spi *dws) dws->master = master; dws->type = SSI_MOTO_SPI; dws->dma_inited = 0; - dws->dma_addr = (dma_addr_t)(dws->paddr + 0x60); + dws->dma_addr = (dma_addr_t)(dws->paddr + DW_SPI_DR); snprintf(dws->name, sizeof(dws->name), "dw_spi%d", dws->bus_num); ret = request_irq(dws->irq, dw_spi_irq, IRQF_SHARED, dws->name, master);