From d1deec000818c7cf48b9e740bbbaa3a9275bc1a3 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Mon, 15 Sep 2025 16:48:11 +0200 Subject: [PATCH] xfree86: platform bus: move raw device list to internal header These xf86_num_platform_devices and xf86_platform_devices fields aren't _X_EXPORTED, so no drivers can use them - and none are trying so. Thus move them to internal / non-sdk header. Not an ABI change. Signed-off-by: Enrico Weigelt, metux IT consult --- hw/xfree86/common/xf86AutoConfig.c | 2 +- hw/xfree86/common/xf86Events.c | 2 -- hw/xfree86/common/xf86platformBus.h | 11 ----------- hw/xfree86/common/xf86platformBus_priv.h | 10 ++++++++++ hw/xfree86/os-support/linux/systemd-logind.c | 2 +- hw/xfree86/os-support/shared/platform_noop.c | 2 +- 6 files changed, 13 insertions(+), 16 deletions(-) diff --git a/hw/xfree86/common/xf86AutoConfig.c b/hw/xfree86/common/xf86AutoConfig.c index 8e77c42ed..24d37ba70 100644 --- a/hw/xfree86/common/xf86AutoConfig.c +++ b/hw/xfree86/common/xf86AutoConfig.c @@ -41,7 +41,7 @@ #include "xf86Priv.h" #include "xf86_os_support.h" #include "xf86_OSlib.h" -#include "xf86platformBus.h" +#include "xf86platformBus_priv.h" #include "xf86pciBus.h" #ifdef __sparc__ #include "xf86sbusBus_priv.h" diff --git a/hw/xfree86/common/xf86Events.c b/hw/xfree86/common/xf86Events.c index 8f05cec67..d18f40a92 100644 --- a/hw/xfree86/common/xf86Events.c +++ b/hw/xfree86/common/xf86Events.c @@ -90,8 +90,6 @@ #include "dpmsproc.h" #endif -#include "xf86platformBus.h" - #include "../os-support/linux/systemd-logind.h" extern void (*xf86OSPMClose) (void); diff --git a/hw/xfree86/common/xf86platformBus.h b/hw/xfree86/common/xf86platformBus.h index 5a072eb5e..dfdbd8b11 100644 --- a/hw/xfree86/common/xf86platformBus.h +++ b/hw/xfree86/common/xf86platformBus.h @@ -37,23 +37,12 @@ struct xf86_platform_device { #define XF86_PDEV_PAUSED 0x04 #ifdef XSERVER_PLATFORM_BUS -extern int xf86_num_platform_devices; -extern struct xf86_platform_device *xf86_platform_devices; - static inline struct OdevAttributes * xf86_platform_device_odev_attributes(struct xf86_platform_device *device) { return device->attribs; } -static inline struct OdevAttributes * -xf86_platform_odev_attributes(int index) -{ - struct xf86_platform_device *device = &xf86_platform_devices[index]; - - return device->attribs; -} - /* * Define the legacy API only for external builds */ diff --git a/hw/xfree86/common/xf86platformBus_priv.h b/hw/xfree86/common/xf86platformBus_priv.h index 101a7b95e..7326473d6 100644 --- a/hw/xfree86/common/xf86platformBus_priv.h +++ b/hw/xfree86/common/xf86platformBus_priv.h @@ -9,6 +9,16 @@ #ifdef XSERVER_PLATFORM_BUS +extern int xf86_num_platform_devices; +extern struct xf86_platform_device *xf86_platform_devices; + +static inline struct OdevAttributes * +xf86_platform_odev_attributes(int index) +{ + struct xf86_platform_device *device = &xf86_platform_devices[index]; + return device->attribs; +} + int xf86platformProbe(void); int xf86platformProbeDev(DriverPtr drvp); int xf86platformAddGPUDevices(DriverPtr drvp); diff --git a/hw/xfree86/os-support/linux/systemd-logind.c b/hw/xfree86/os-support/linux/systemd-logind.c index dc4061bc6..152649583 100644 --- a/hw/xfree86/os-support/linux/systemd-logind.c +++ b/hw/xfree86/os-support/linux/systemd-logind.c @@ -38,7 +38,7 @@ #include "os.h" #include "linux.h" #include "xf86_priv.h" -#include "xf86platformBus.h" +#include "xf86platformBus_priv.h" #include "xf86Xinput_priv.h" #include "xf86Priv.h" #include "globals.h" diff --git a/hw/xfree86/os-support/shared/platform_noop.c b/hw/xfree86/os-support/shared/platform_noop.c index ed0ff93ed..1e8107d7a 100644 --- a/hw/xfree86/os-support/shared/platform_noop.c +++ b/hw/xfree86/os-support/shared/platform_noop.c @@ -11,7 +11,7 @@ #include "xf86.h" #include "xf86_os_support.h" -#include "xf86platformBus.h" +#include "xf86platformBus_priv.h" Bool xf86PlatformDeviceCheckBusID(struct xf86_platform_device *device, const char *busid)