mmc: dw_mmc: convert copy of struct device in struct dw_mci to a reference
The 'struct dw_mci' maintains a copy of the pdev->dev instance instead of maintaining a reference to that 'struct device' instance. Any resource allocated using the device resource management kernel API with the instance of 'struct device' in 'struct dw_mci' is then incorrect. Fix this by converting the copy of 'struct device' in 'struct dw_mci' to a reference. Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org> Acked-by: Will Newton <will.newton@imgtec.com> Signed-off-by: Chris Ball <cjb@laptop.org>
This commit is contained in:

committed by
Chris Ball

parent
950d56acce
commit
4a90920c6b
@@ -59,7 +59,7 @@ static int __devinit dw_mci_pci_probe(struct pci_dev *pdev,
|
||||
|
||||
host->irq = pdev->irq;
|
||||
host->irq_flags = IRQF_SHARED;
|
||||
host->dev = pdev->dev;
|
||||
host->dev = &pdev->dev;
|
||||
host->pdata = &pci_board_data;
|
||||
|
||||
host->regs = pci_iomap(pdev, PCI_BAR_NO, COMPLETE_BAR);
|
||||
|
Reference in New Issue
Block a user