From 2f882399582e7b32238b0d0e7e412ff8a0739854 Mon Sep 17 00:00:00 2001 From: Emmanuel Vadot Date: Wed, 28 Feb 2018 19:05:25 +0000 Subject: [PATCH] dwmmc_rockchip: Add ifdefs on EXT_RESOURCES The old RK3188 kernel config uses dwmmc but isn't compiled with EXT_RESOURCES. Add ifdefs around code using EXT_RESOURCES code. Reported by: rpokala --- sys/dev/mmc/host/dwmmc_rockchip.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sys/dev/mmc/host/dwmmc_rockchip.c b/sys/dev/mmc/host/dwmmc_rockchip.c index 5ce4d800ab7..1668cb872f9 100644 --- a/sys/dev/mmc/host/dwmmc_rockchip.c +++ b/sys/dev/mmc/host/dwmmc_rockchip.c @@ -39,6 +39,10 @@ __FBSDID("$FreeBSD$"); #include +#ifdef EXT_RESOURCES +#include +#endif + #include enum RKTYPE { @@ -88,11 +92,14 @@ rockchip_dwmmc_attach(device_t dev) sc->pwren_inverted = 1; +#ifdef EXT_RESOURCES sc->update_ios = &dwmmc_rockchip_update_ios; +#endif return (dwmmc_attach(dev)); } +#ifdef EXT_RESOURCES static int dwmmc_rockchip_update_ios(struct dwmmc_softc *sc, struct mmc_ios *ios) { @@ -119,6 +126,7 @@ dwmmc_rockchip_update_ios(struct dwmmc_softc *sc, struct mmc_ios *ios) } return (0); } +#endif static device_method_t rockchip_dwmmc_methods[] = { /* bus interface */