]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
spi-topcliff-pch: Modify pci-bus number dynamically to get DMA device info
authorTomoya MORINAGA <tomoya.rohm@gmail.com>
Fri, 9 Dec 2011 04:11:42 +0000 (13:11 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 21 May 2012 17:46:23 +0000 (10:46 -0700)
commit ee2ece5261a639b89f194d141444b03b4c923179 upstream.

Signed-off-by: Tomoya MORINAGA <tomoya.rohm@gmail.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/spi/spi-topcliff-pch.c

index 0ddfe7702a19c49a4c139557b0e24504bb23f884..42fe324af56204456e17de039945b723f53578e8 100644 (file)
@@ -924,7 +924,8 @@ 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(2, PCI_DEVFN(12, 0));
+       dma_dev = pci_get_bus_and_slot(data->board_dat->pdev->bus->number,
+                                      PCI_DEVFN(12, 0));
 
        /* Set Tx DMA */
        param = &dma->param_tx;