From patchwork Fri Jul 25 13:31:44 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 4623021 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@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 15521C0338 for ; Fri, 25 Jul 2014 13:32:16 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 596A12020E for ; Fri, 25 Jul 2014 13:32:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8C311201FE for ; Fri, 25 Jul 2014 13:32:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759908AbaGYNcN (ORCPT ); Fri, 25 Jul 2014 09:32:13 -0400 Received: from mga09.intel.com ([134.134.136.24]:36683 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752599AbaGYNcM (ORCPT ); Fri, 25 Jul 2014 09:32:12 -0400 Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP; 25 Jul 2014 06:26:29 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.01,731,1400050800"; d="scan'208";a="578915594" Received: from smile.fi.intel.com (HELO smile) ([10.237.72.73]) by orsmga002.jf.intel.com with ESMTP; 25 Jul 2014 06:31:46 -0700 Received: from andy by smile with local (Exim 4.82_1-5b7a7c0-XX) (envelope-from ) id 1XAfb7-0005Ek-3N; Fri, 25 Jul 2014 16:31:45 +0300 From: Andy Shevchenko To: Alex Williamson , linux-pci@vger.kernel.org, Bjorn Helgaas , Mark Brown , Greg Kroah-Hartman , linux-spi@vger.kernel.org, linux-serial@vger.kernel.org Cc: Andy Shevchenko Subject: [PATCH v1 3/3] spi: topcliff-pch: use pci_get_dma_device() helper Date: Fri, 25 Jul 2014 16:31:44 +0300 Message-Id: <1406295104-20082-3-git-send-email-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.0.1 In-Reply-To: <1406295104-20082-1-git-send-email-andriy.shevchenko@linux.intel.com> References: <1406295104-20082-1-git-send-email-andriy.shevchenko@linux.intel.com> Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@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 Since we have pci_get_dma_device() public we may use it in the drivers. It considers the function 0 as a DMA controller. Signed-off-by: Andy Shevchenko --- drivers/spi/spi-topcliff-pch.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/spi/spi-topcliff-pch.c b/drivers/spi/spi-topcliff-pch.c index af51d6a..fe868ce 100644 --- a/drivers/spi/spi-topcliff-pch.c +++ b/drivers/spi/spi-topcliff-pch.c @@ -874,8 +874,7 @@ static void pch_spi_request_dma(struct pch_spi_data *data, int bpw) dma_cap_set(DMA_SLAVE, mask); /* Get DMA's dev information */ - dma_dev = pci_get_bus_and_slot(data->board_dat->pdev->bus->number, - PCI_DEVFN(12, 0)); + dma_dev = pci_get_dma_device(data->board_dat->pdev); /* Set Tx DMA */ param = &dma->param_tx;