diff --git a/drivers/input/misc/fpc_fps_mmi/fpc1020_tee.c b/drivers/input/misc/fpc_fps_mmi/fpc1020_tee.c index ec76edff7a28..e93e929674f5 100644 --- a/drivers/input/misc/fpc_fps_mmi/fpc1020_tee.c +++ b/drivers/input/misc/fpc_fps_mmi/fpc1020_tee.c @@ -8,6 +8,7 @@ * as published by the Free Software Foundation. */ +#include #include #include #include @@ -28,6 +29,10 @@ #define RESET_HIGH_SLEEP2_MIN_US 5000 #define RESET_HIGH_SLEEP2_MAX_US (RESET_HIGH_SLEEP2_MIN_US + 100) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 25)) +#define devm_gpio_free(a, b) NULL +#endif + struct FPS_data { unsigned int enabled; unsigned int state; diff --git a/drivers/input/misc/goodix_fod_mmi/platform.c b/drivers/input/misc/goodix_fod_mmi/platform.c index 5e1d6b4830d4..6bb245f3f35a 100644 --- a/drivers/input/misc/goodix_fod_mmi/platform.c +++ b/drivers/input/misc/goodix_fod_mmi/platform.c @@ -13,6 +13,7 @@ * GNU General Public License for more details. * */ +#include #include #include #include @@ -30,6 +31,10 @@ #include #endif +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 25)) +#define devm_gpio_free(a, b) NULL +#endif + int gf_parse_dts(struct gf_dev *gf_dev) { int rc = 0; @@ -129,7 +134,9 @@ err_pwr: void gf_cleanup(struct gf_dev *gf_dev) { +#if (LINUX_VERSION_CODE < KERNEL_VERSION(6, 1, 25)) struct device *dev = &gf_dev->spi->dev; +#endif pr_info("goodix: %s\n", __func__); if (gpio_is_valid(gf_dev->irq_gpio)) {