From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andy Shevchenko Subject: [PATCH v1 2/3] pch_uart: use pci_get_dma_device() helper Date: Fri, 25 Jul 2014 16:31:43 +0300 Message-ID: <1406295104-20082-2-git-send-email-andriy.shevchenko@linux.intel.com> References: <1406295104-20082-1-git-send-email-andriy.shevchenko@linux.intel.com> Cc: Andy Shevchenko To: Alex Williamson , linux-pci-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Bjorn Helgaas , Mark Brown , Greg Kroah-Hartman , linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-serial-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Return-path: In-Reply-To: <1406295104-20082-1-git-send-email-andriy.shevchenko-VuQAYsv1563Yd54FQh9/CA@public.gmane.org> Sender: linux-spi-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-ID: 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/tty/serial/pch_uart.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/tty/serial/pch_uart.c b/drivers/tty/serial/pch_uart.c index 2f06e5a..c38fdee 100644 --- a/drivers/tty/serial/pch_uart.c +++ b/drivers/tty/serial/pch_uart.c @@ -736,9 +736,8 @@ static void pch_request_dma(struct uart_port *port) dma_cap_zero(mask); dma_cap_set(DMA_SLAVE, mask); - dma_dev = pci_get_bus_and_slot(priv->pdev->bus->number, - PCI_DEVFN(0xa, 0)); /* Get DMA's dev - information */ + dma_dev = pci_get_dma_device(priv->pdev); /* Get DMA's dev information */ + /* Set Tx DMA */ param = &priv->param_tx; param->dma_dev = &dma_dev->dev; -- 2.0.1 -- To unsubscribe from this list: send the line "unsubscribe linux-spi" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html