]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
ahci: mediatek: fix undefined reference of dev_err
authorFrank Wunderlich <frank-w@public-files.de>
Tue, 16 Mar 2021 18:05:33 +0000 (19:05 +0100)
committerTom Rini <trini@konsulko.com>
Fri, 19 Mar 2021 14:35:19 +0000 (10:35 -0400)
building with MTK_AHCI enabled results in implicit declaration and
undefined reference of dev_err followed by a segfault of gcc

drivers/ata/mtk_ahci.c: In function 'mtk_ahci_parse_property':
drivers/ata/mtk_ahci.c:65:4: warning:
implicit declaration of function 'dev_err'
drivers/ata/mtk_ahci.c:65: undefined reference to `dev_err'
in function `mtk_ahci_probe':
drivers/ata/mtk_ahci.c:92: undefined reference to `dev_err'
Segmentation fault

fix this by adding the dm/device_compat.h to includes

Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
drivers/ata/mtk_ahci.c

index 554175bc0051e98c0d7a08529e9473abe94b12bb..2c5227df306bcad86286a20d3062221d397325ae 100644 (file)
@@ -21,6 +21,7 @@
 #include <sata.h>
 #include <scsi.h>
 #include <syscon.h>
+#include <dm/device_compat.h>
 
 #define SYS_CFG                        0x14
 #define SYS_CFG_SATA_MSK       GENMASK(31, 30)