From fc09ad1868be420e89224e06dfbb0c403d9ff75b Mon Sep 17 00:00:00 2001 From: Jonathan Gray Date: Tue, 10 Sep 2024 05:45:17 +0000 Subject: change bus notifier defines into inline functions --- sys/dev/pci/drm/include/linux/device.h | 4 +--- sys/dev/pci/drm/include/linux/device/bus.h | 18 ++++++++++++++++-- 2 files changed, 17 insertions(+), 5 deletions(-) (limited to 'sys') diff --git a/sys/dev/pci/drm/include/linux/device.h b/sys/dev/pci/drm/include/linux/device.h index 2321332b338..82f2cb16778 100644 --- a/sys/dev/pci/drm/include/linux/device.h +++ b/sys/dev/pci/drm/include/linux/device.h @@ -14,12 +14,10 @@ #include #include /* dev_printk.h -> ratelimit.h */ #include /* via device/driver.h */ +#include struct device_node; -struct bus_type { -}; - struct device_driver { struct device *dev; }; diff --git a/sys/dev/pci/drm/include/linux/device/bus.h b/sys/dev/pci/drm/include/linux/device/bus.h index 19e69719106..f1eacdeb85d 100644 --- a/sys/dev/pci/drm/include/linux/device/bus.h +++ b/sys/dev/pci/drm/include/linux/device/bus.h @@ -3,7 +3,21 @@ #ifndef _LINUX_DEVICE_BUS_H #define _LINUX_DEVICE_BUS_H -#define bus_register_notifier(a, b) 0 -#define bus_unregister_notifier(a, b) 0 +struct bus_type { +}; + +struct notifier_block; + +static inline int +bus_register_notifier(const struct bus_type *bt, struct notifier_block *nb) +{ + return 0; +} + +static inline int +bus_unregister_notifier(const struct bus_type *bt, struct notifier_block *nb) +{ + return 0; +} #endif -- cgit v1.2.3