diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2014-07-30 11:59:52 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-08-01 19:04:21 -0400 |
commit | 8368d6a2b73900507ad7632b8057532d0c2ee07f (patch) | |
tree | a1e03234554758bf9aafd16679b23845d86526bd /drivers/tty | |
parent | c62fd1d9f094b1a97674374d09869df05cdc1025 (diff) |
pch_uart: don't hardcode PCI slot to get DMA device
The DMA is a function 0 of the multifunction device where SPI host is attached.
Thus, we may avoid to hardcode PCI slot number.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r-- | drivers/tty/serial/pch_uart.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/tty/serial/pch_uart.c b/drivers/tty/serial/pch_uart.c index 2f06e5a71396..ea4ffc2ebb2f 100644 --- a/drivers/tty/serial/pch_uart.c +++ b/drivers/tty/serial/pch_uart.c | |||
@@ -736,9 +736,10 @@ static void pch_request_dma(struct uart_port *port) | |||
736 | dma_cap_zero(mask); | 736 | dma_cap_zero(mask); |
737 | dma_cap_set(DMA_SLAVE, mask); | 737 | dma_cap_set(DMA_SLAVE, mask); |
738 | 738 | ||
739 | dma_dev = pci_get_bus_and_slot(priv->pdev->bus->number, | 739 | /* Get DMA's dev information */ |
740 | PCI_DEVFN(0xa, 0)); /* Get DMA's dev | 740 | dma_dev = pci_get_slot(priv->pdev->bus, |
741 | information */ | 741 | PCI_DEVFN(PCI_SLOT(priv->pdev->devfn), 0)); |
742 | |||
742 | /* Set Tx DMA */ | 743 | /* Set Tx DMA */ |
743 | param = &priv->param_tx; | 744 | param = &priv->param_tx; |
744 | param->dma_dev = &dma_dev->dev; | 745 | param->dma_dev = &dma_dev->dev; |