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 <info@metux.net>
This commit is contained in:
Enrico Weigelt, metux IT consult 2025-09-15 16:48:11 +02:00 committed by Enrico Weigelt
parent 74102a1126
commit d1deec0008
6 changed files with 13 additions and 16 deletions

View File

@ -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"

View File

@ -90,8 +90,6 @@
#include "dpmsproc.h"
#endif
#include "xf86platformBus.h"
#include "../os-support/linux/systemd-logind.h"
extern void (*xf86OSPMClose) (void);

View File

@ -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
*/

View File

@ -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);

View File

@ -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"

View File

@ -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)