xfree86: common: unexport UnloadModule() and UnloadSubModule()
Not used by any driver/module, so no need to keep it exported. Also making them type-safe. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net> Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1722>
This commit is contained in:
parent
b0452ecff4
commit
00f69564c5
|
@ -61,6 +61,7 @@
|
||||||
#include "xf86InPriv.h"
|
#include "xf86InPriv.h"
|
||||||
#include "xf86Config.h"
|
#include "xf86Config.h"
|
||||||
#include "mivalidate.h"
|
#include "mivalidate.h"
|
||||||
|
#include "xf86Module_priv.h"
|
||||||
|
|
||||||
/* For xf86GetClocks */
|
/* For xf86GetClocks */
|
||||||
#if defined(CSRG_BASED) || defined(__GNU__)
|
#if defined(CSRG_BASED) || defined(__GNU__)
|
||||||
|
|
|
@ -66,6 +66,7 @@
|
||||||
#include "systemd-logind.h"
|
#include "systemd-logind.h"
|
||||||
#include "loaderProcs.h"
|
#include "loaderProcs.h"
|
||||||
|
|
||||||
|
#include "xf86Module_priv.h"
|
||||||
#include "xf86.h"
|
#include "xf86.h"
|
||||||
#include "xf86Priv.h"
|
#include "xf86Priv.h"
|
||||||
#include "xf86Config.h"
|
#include "xf86Config.h"
|
||||||
|
|
|
@ -151,8 +151,6 @@ typedef struct {
|
||||||
extern _X_EXPORT void *LoadSubModule(void *, const char *, const char **,
|
extern _X_EXPORT void *LoadSubModule(void *, const char *, const char **,
|
||||||
const char **, void *,
|
const char **, void *,
|
||||||
const XF86ModReqInfo *, int *, int *);
|
const XF86ModReqInfo *, int *, int *);
|
||||||
extern _X_EXPORT void UnloadSubModule(void *);
|
|
||||||
extern _X_EXPORT void UnloadModule(void *);
|
|
||||||
extern _X_EXPORT void *LoaderSymbol(const char *);
|
extern _X_EXPORT void *LoaderSymbol(const char *);
|
||||||
extern _X_EXPORT void *LoaderSymbolFromModule(void *, const char *);
|
extern _X_EXPORT void *LoaderSymbolFromModule(void *, const char *);
|
||||||
extern _X_EXPORT void LoaderErrorMsg(const char *, const char *, int, int);
|
extern _X_EXPORT void LoaderErrorMsg(const char *, const char *, int, int);
|
||||||
|
|
|
@ -0,0 +1,22 @@
|
||||||
|
/* SPDX-License-Identifier: MIT OR X11
|
||||||
|
*
|
||||||
|
* Copyright © 2024 Enrico Weigelt, metux IT consult <info@metux.net>
|
||||||
|
*/
|
||||||
|
#ifndef _XORG_XF86MODULE_PRIV_H
|
||||||
|
#define _XORG_XF86MODULE_PRIV_H
|
||||||
|
|
||||||
|
/*
|
||||||
|
* unload a previously loaded module
|
||||||
|
*
|
||||||
|
* @param mod the module to unload
|
||||||
|
*/
|
||||||
|
void UnloadModule(ModuleDescPtr mod);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* unload a previously loaded sun-module
|
||||||
|
*
|
||||||
|
* @param mod the sub-module to unload
|
||||||
|
*/
|
||||||
|
void UnloadSubModule(ModuleDescPtr mod);
|
||||||
|
|
||||||
|
#endif /* _XORG_XF86MODULE_PRIV_H */
|
|
@ -76,6 +76,7 @@
|
||||||
#include "eventstr.h"
|
#include "eventstr.h"
|
||||||
#include "inpututils.h"
|
#include "inpututils.h"
|
||||||
#include "optionstr.h"
|
#include "optionstr.h"
|
||||||
|
#include "xf86Module_priv.h"
|
||||||
|
|
||||||
#ifdef HAVE_FNMATCH_H
|
#ifdef HAVE_FNMATCH_H
|
||||||
#include <fnmatch.h>
|
#include <fnmatch.h>
|
||||||
|
|
|
@ -55,6 +55,7 @@
|
||||||
#include "loaderProcs.h"
|
#include "loaderProcs.h"
|
||||||
#include "xf86Module.h"
|
#include "xf86Module.h"
|
||||||
#include "loader.h"
|
#include "loader.h"
|
||||||
|
#include "xf86Module_priv.h"
|
||||||
|
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
@ -840,10 +841,8 @@ LoadModule(const char *module, void *options, const XF86ModReqInfo *modreq,
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
UnloadModule(void *_mod)
|
UnloadModule(ModuleDescPtr mod)
|
||||||
{
|
{
|
||||||
ModuleDescPtr mod = _mod;
|
|
||||||
|
|
||||||
if (mod == (ModuleDescPtr) 1)
|
if (mod == (ModuleDescPtr) 1)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -873,10 +872,8 @@ UnloadModule(void *_mod)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
UnloadSubModule(void *_mod)
|
UnloadSubModule(ModuleDescPtr mod)
|
||||||
{
|
{
|
||||||
ModuleDescPtr mod = (ModuleDescPtr) _mod;
|
|
||||||
|
|
||||||
/* Some drivers are calling us on built-in submodules, ignore them */
|
/* Some drivers are calling us on built-in submodules, ignore them */
|
||||||
if (mod == (ModuleDescPtr) 1)
|
if (mod == (ModuleDescPtr) 1)
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue