xfree86: common: move out private definitions from xf86platformBus.h

Private definitions should not pollute public / SDK headers.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
Enrico Weigelt, metux IT consult 2025-09-09 12:39:01 +02:00 committed by Enrico Weigelt
parent 850aebf5bc
commit 74f93c4022
7 changed files with 41 additions and 30 deletions

View File

@ -48,6 +48,7 @@
#include "xf86Bus.h"
#include "xf86sbusBus_priv.h"
#include "xf86platformBus_priv.h"
#include "xf86_OSproc.h"
#ifdef XSERVER_LIBPCIACCESS

View File

@ -72,6 +72,7 @@
#include "xf86Priv.h"
#include "xf86_os_support.h"
#include "xf86_OSlib.h"
#include "xf86platformBus_priv.h"
#ifdef XFreeXDGA
#include "dgaproc.h"

View File

@ -44,7 +44,7 @@
#include "xf86Xinput.h"
#include "xf86Optrec.h"
#include "xf86Parser.h"
#include "xf86platformBus.h" /* For OutputClass functions */
#include "xf86platformBus_priv.h"
#include "optionstr.h"
static Bool ParseOptionValue(int scrnIndex, XF86OptionPtr options,

View File

@ -53,7 +53,7 @@
#include "xf86str.h"
#include "xf86Bus.h"
#include "Pci.h"
#include "xf86platformBus.h"
#include "xf86platformBus_priv.h"
#include "xf86Xinput_priv.h"
#include "xf86Config.h"
#include "xf86Crtc.h"

View File

@ -37,28 +37,9 @@ struct xf86_platform_device {
#define XF86_PDEV_PAUSED 0x04
#ifdef XSERVER_PLATFORM_BUS
int xf86platformProbe(void);
int xf86platformProbeDev(DriverPtr drvp);
int xf86platformAddGPUDevices(DriverPtr drvp);
void xf86MergeOutputClassOptions(int entityIndex, void **options);
void xf86PlatformScanPciDev(void);
const char *xf86PlatformFindHotplugDriver(int dev_index);
extern int xf86_num_platform_devices;
extern struct xf86_platform_device *xf86_platform_devices;
extern int
xf86_add_platform_device(struct OdevAttributes *attribs, Bool unowned);
extern int
xf86_remove_platform_device(int dev_index);
extern Bool
xf86_get_platform_device_unowned(int index);
extern int
xf86platformAddDevice(const char *driver_name, int index);
extern void
xf86platformRemoveDevice(int index);
static inline struct OdevAttributes *
xf86_platform_device_odev_attributes(struct xf86_platform_device *device)
{
@ -122,14 +103,6 @@ _xf86_get_platform_device_int_attrib(struct xf86_platform_device *device, int at
extern _X_EXPORT Bool
xf86PlatformDeviceCheckBusID(struct xf86_platform_device *device, const char *busid);
extern void xf86platformVTProbe(void);
extern void xf86platformPrimary(void);
#else
static inline int xf86platformAddGPUDevices(DriverPtr drvp) { return FALSE; }
static inline void xf86MergeOutputClassOptions(int index, void **options) {}
#endif
#endif

View File

@ -0,0 +1,36 @@
/* SPDX-License-Identifier: MIT OR X11
*
* Copyright © 2024 Enrico Weigelt, metux IT consult <info@metux.net>
*/
#ifndef _XSERVER_XF86_PLATFORM_BUS_PRIV_H
#define _XSERVER_XF86_PLATFORM_BUS_PRIV_H
#include "xf86platformBus.h"
#ifdef XSERVER_PLATFORM_BUS
int xf86platformProbe(void);
int xf86platformProbeDev(DriverPtr drvp);
int xf86platformAddGPUDevices(DriverPtr drvp);
void xf86MergeOutputClassOptions(int entityIndex, void **options);
void xf86PlatformScanPciDev(void);
const char *xf86PlatformFindHotplugDriver(int dev_index);
int xf86_add_platform_device(struct OdevAttributes *attribs, Bool unowned);
int xf86_remove_platform_device(int dev_index);
Bool xf86_get_platform_device_unowned(int index);
int xf86platformAddDevice(const char *driver_name, int index);
void xf86platformRemoveDevice(int index);
void xf86platformVTProbe(void);
void xf86platformPrimary(void);
#else /* XSERVER_PLATFORM_BUS */
static inline int xf86platformAddGPUDevices(DriverPtr drvp) { return FALSE; }
static inline void xf86MergeOutputClassOptions(int index, void **options) {}
#endif /* XSERVER_PLATFORM_BUS */
#endif /* _XSERVER_XF86_PLATFORM_BUS_PRIV_H */

View File

@ -17,7 +17,7 @@
#include "xf86_priv.h"
#include "xf86_os_support.h"
#include "xf86platformBus.h"
#include "xf86platformBus_priv.h"
#include "xf86Bus.h"
#include "../linux/systemd-logind.h"