Commit 8368d6a2 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Greg Kroah-Hartman

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: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c62fd1d9
...@@ -736,9 +736,10 @@ static void pch_request_dma(struct uart_port *port) ...@@ -736,9 +736,10 @@ static void pch_request_dma(struct uart_port *port)
dma_cap_zero(mask); dma_cap_zero(mask);
dma_cap_set(DMA_SLAVE, mask); dma_cap_set(DMA_SLAVE, mask);
dma_dev = pci_get_bus_and_slot(priv->pdev->bus->number, /* Get DMA's dev information */
PCI_DEVFN(0xa, 0)); /* Get DMA's dev dma_dev = pci_get_slot(priv->pdev->bus,
information */ PCI_DEVFN(PCI_SLOT(priv->pdev->devfn), 0));
/* Set Tx DMA */ /* Set Tx DMA */
param = &priv->param_tx; param = &priv->param_tx;
param->dma_dev = &dma_dev->dev; param->dma_dev = &dma_dev->dev;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment