From 01964028f2b9f0c60e3d95e8f2f4c2dd7f0a1e85 Mon Sep 17 00:00:00 2001 From: Johannes Lundberg Date: Mon, 16 Sep 2019 18:23:01 +0000 Subject: [PATCH] LinuxKPI: Limit exposure of new field in dev_pm_ops to LinuxKPI >= 50000. This will fix a suspend/resume issue that occurs on drm-kmod packages build on 12.0 and run on 12.1. Approved by: imp (mentor) --- sys/compat/linuxkpi/common/include/linux/device.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/device.h b/sys/compat/linuxkpi/common/include/linux/device.h index 5b605c9ebbd..fe4be4ed5ce 100644 --- a/sys/compat/linuxkpi/common/include/linux/device.h +++ b/sys/compat/linuxkpi/common/include/linux/device.h @@ -60,7 +60,9 @@ struct class { }; struct dev_pm_ops { +#if defined(LINUXKPI_VERSION) && LINUXKPI_VERSION >= 50000 int (*prepare)(struct device *dev); +#endif int (*suspend)(struct device *dev); int (*suspend_late)(struct device *dev); int (*resume)(struct device *dev); -- 2.45.0