From be348e9f79976e70179791f0b05fd468407d339e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fran=C3=A7ois=20Tigeot?= Date: Sun, 23 Aug 2015 22:11:16 +0200 Subject: [PATCH] drm: Move DMI definitions to their usual Linux headers --- sys/dev/drm/drm_drv.c | 4 ++-- sys/dev/drm/i915/intel_bios.c | 1 + sys/dev/drm/include/drm/drmP.h | 36 ----------------------------- sys/dev/drm/include/linux/dmi.h | 23 ++++++++++++++++++ sys/dev/drm/include/linux/mod_devicetable.h | 13 +++++++++++ 5 files changed, 39 insertions(+), 38 deletions(-) diff --git a/sys/dev/drm/drm_drv.c b/sys/dev/drm/drm_drv.c index 1757ebed6e..759d6b95cb 100644 --- a/sys/dev/drm/drm_drv.c +++ b/sys/dev/drm/drm_drv.c @@ -49,6 +49,7 @@ #include #include +#include #include #include @@ -984,8 +985,7 @@ done: return found; } -bool -dmi_check_system(const struct dmi_system_id *sysid) +int dmi_check_system(const struct dmi_system_id *sysid) { const struct dmi_system_id *dsi; int num = 0; diff --git a/sys/dev/drm/i915/intel_bios.c b/sys/dev/drm/i915/intel_bios.c index a71eb13e2c..8915cd2d8d 100644 --- a/sys/dev/drm/i915/intel_bios.c +++ b/sys/dev/drm/i915/intel_bios.c @@ -24,6 +24,7 @@ * Eric Anholt * */ +#include #include #include #include diff --git a/sys/dev/drm/include/drm/drmP.h b/sys/dev/drm/include/drm/drmP.h index 8fd855c6cc..e6011b149d 100644 --- a/sys/dev/drm/include/drm/drmP.h +++ b/sys/dev/drm/include/drm/drmP.h @@ -1205,42 +1205,6 @@ static inline int drm_core_has_AGP(struct drm_device *dev) #define drm_core_has_AGP(dev) (0) #endif -enum dmi_field { - DMI_NONE, - DMI_BIOS_VENDOR, - DMI_BIOS_VERSION, - DMI_BIOS_DATE, - DMI_SYS_VENDOR, - DMI_PRODUCT_NAME, - DMI_PRODUCT_VERSION, - DMI_PRODUCT_SERIAL, - DMI_PRODUCT_UUID, - DMI_BOARD_VENDOR, - DMI_BOARD_NAME, - DMI_BOARD_VERSION, - DMI_BOARD_SERIAL, - DMI_BOARD_ASSET_TAG, - DMI_CHASSIS_VENDOR, - DMI_CHASSIS_TYPE, - DMI_CHASSIS_VERSION, - DMI_CHASSIS_SERIAL, - DMI_CHASSIS_ASSET_TAG, - DMI_STRING_MAX, -}; - -struct dmi_strmatch { - unsigned char slot; - char substr[79]; -}; - -struct dmi_system_id { - int (*callback)(const struct dmi_system_id *); - const char *ident; - struct dmi_strmatch matches[4]; -}; -#define DMI_MATCH(a, b) {(a), (b)} -bool dmi_check_system(const struct dmi_system_id *); - extern int drm_notyet_flag; extern unsigned int drm_debug; extern unsigned int drm_rnodes; diff --git a/sys/dev/drm/include/linux/dmi.h b/sys/dev/drm/include/linux/dmi.h index a6f58053ff..74ab1b66af 100644 --- a/sys/dev/drm/include/linux/dmi.h +++ b/sys/dev/drm/include/linux/dmi.h @@ -29,4 +29,27 @@ #include +enum dmi_field { + DMI_NONE, + DMI_BIOS_VENDOR, + DMI_BIOS_VERSION, + DMI_BIOS_DATE, + DMI_SYS_VENDOR, + DMI_PRODUCT_NAME, + DMI_PRODUCT_VERSION, + DMI_PRODUCT_SERIAL, + DMI_PRODUCT_UUID, + DMI_BOARD_VENDOR, + DMI_BOARD_NAME, + DMI_BOARD_VERSION, + DMI_BOARD_SERIAL, + DMI_BOARD_ASSET_TAG, + DMI_CHASSIS_VENDOR, + DMI_CHASSIS_TYPE, + DMI_CHASSIS_VERSION, + DMI_CHASSIS_SERIAL, + DMI_CHASSIS_ASSET_TAG, + DMI_STRING_MAX, +}; + #endif /* _LINUX_DMI_H_ */ diff --git a/sys/dev/drm/include/linux/mod_devicetable.h b/sys/dev/drm/include/linux/mod_devicetable.h index aaf1872191..b092b7021d 100644 --- a/sys/dev/drm/include/linux/mod_devicetable.h +++ b/sys/dev/drm/include/linux/mod_devicetable.h @@ -30,4 +30,17 @@ #define DMI_MATCH(a, b) {(a), (b)} #define DMI_EXACT_MATCH(a, b) {(a), (b)} +struct dmi_strmatch { + unsigned char slot; + char substr[79]; +}; + +struct dmi_system_id { + int (*callback)(const struct dmi_system_id *); + const char *ident; + struct dmi_strmatch matches[4]; +}; + +int dmi_check_system(const struct dmi_system_id *); + #endif /* _LINUX_MOD_DEVICETABLE_H_ */ -- 2.11.4.GIT