From: jsg Date: Tue, 10 Sep 2024 05:45:16 +0000 (+0000) Subject: change bus notifier defines into inline functions X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=462b0080adf84c5ddae8fd0cdba5e604fdde1771;p=openbsd change bus notifier defines into inline functions --- 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