diff mbox series

sata_sil: make it buildable with DM_PCI

Message ID 20200604112922.3725819-1-marcin@juszkiewicz.com.pl
State New
Headers show
Series sata_sil: make it buildable with DM_PCI | expand

Commit Message

Marcin Juszkiewicz June 4, 2020, 11:29 a.m. UTC
Linker complained about lack of `pci_virt_to_mem` function.
Looks like driver was not ready for device model - I took solution from
e1000.c driver.

Signed-off-by: Marcin Juszkiewicz <marcin at juszkiewicz.com.pl>
---
 drivers/ata/sata_sil.c | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox series

Patch

diff --git drivers/ata/sata_sil.c drivers/ata/sata_sil.c
index 6896fa8771..5f9d4378e2 100644
--- drivers/ata/sata_sil.c
+++ drivers/ata/sata_sil.c
@@ -27,7 +27,11 @@ 
 
 #include "sata_sil.h"
 
+#ifdef CONFIG_DM_PCI
+#define virt_to_bus(devno, v)	dm_pci_virt_to_mem(devno, (void *) (v))
+#else
 #define virt_to_bus(devno, v)	pci_virt_to_mem(devno, (void *) (v))
+#endif
 
 /* just compatible ahci_ops */
 struct sil_ops {