From f73503f83941c0f656a5ca95b46f1f458b86e9be Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Fri, 2 Jan 2026 15:53:39 +0100 Subject: [PATCH] drop obsolete compat macros Signed-off-by: Enrico Weigelt, metux IT consult --- src/Makefile.am | 1 - src/compat-api.h | 39 --------------------------------------- src/r128.h | 5 +---- src/r128_driver.c | 4 ++-- src/r128_probe.h | 2 -- 5 files changed, 3 insertions(+), 48 deletions(-) delete mode 100644 src/compat-api.h diff --git a/src/Makefile.am b/src/Makefile.am index 2cce2a4..93c4118 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -54,7 +54,6 @@ r128_drv_la_SOURCES = \ $(R128_DRI_SRCS) EXTRA_DIST = \ - compat-api.h \ r128.h \ r128_common.h \ r128_dri.h \ diff --git a/src/compat-api.h b/src/compat-api.h deleted file mode 100644 index 35e22b4..0000000 --- a/src/compat-api.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright 2012 Red Hat, Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - * Author: Dave Airlie - */ - -/* this file provides API compat between server post 1.13 and pre it, - it should be reused inside as many drivers as possible */ -#ifndef COMPAT_API_H -#define COMPAT_API_H - -#if ABI_VIDEODRV_VERSION >= SET_ABI_VERSION(23, 0) -#define BLOCKHANDLER_ARGS_DECL ScreenPtr pScreen, pointer pTimeout -#define BLOCKHANDLER_ARGS pScreen, pTimeout -#else -#define BLOCKHANDLER_ARGS_DECL ScreenPtr pScreen, pointer pTimeout, pointer pReadmask -#define BLOCKHANDLER_ARGS pScreen, pTimeout, pReadmask -#endif - -#endif diff --git a/src/r128.h b/src/r128.h index 590ef92..c26153a 100644 --- a/src/r128.h +++ b/src/r128.h @@ -71,10 +71,7 @@ #include "fb.h" #include "xf86Crtc.h" - -#include "compat-api.h" #include "atipcirename.h" - #include "r128_probe.h" #if X_BYTE_ORDER == X_BIG_ENDIAN @@ -303,7 +300,7 @@ typedef struct { R128SaveRec SavedReg; /* Original (text) mode */ R128SaveRec ModeReg; /* Current mode */ Bool (*CloseScreen)(ScreenPtr pScreen); - void (*BlockHandler)(BLOCKHANDLER_ARGS_DECL); + void (*BlockHandler)(ScreenPtr pScreen, pointer pTimeout); Bool PaletteSavedOnVT; /* Palette saved on last VT switch */ diff --git a/src/r128_driver.c b/src/r128_driver.c index 7837fb1..64a7d64 100644 --- a/src/r128_driver.c +++ b/src/r128_driver.c @@ -1631,7 +1631,7 @@ static void R128LoadPalette(ScrnInfoPtr pScrn, int numColors, } static void -R128BlockHandler(BLOCKHANDLER_ARGS_DECL) +R128BlockHandler(ScreenPtr pScreen, pointer pTimeout) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); R128InfoPtr info = R128PTR(pScrn); @@ -1642,7 +1642,7 @@ R128BlockHandler(BLOCKHANDLER_ARGS_DECL) #endif pScreen->BlockHandler = info->BlockHandler; - (*pScreen->BlockHandler) (BLOCKHANDLER_ARGS); + (*pScreen->BlockHandler) (pScreen, pTimeout); pScreen->BlockHandler = R128BlockHandler; if(info->VideoTimerCallback) { diff --git a/src/r128_probe.h b/src/r128_probe.h index f66bfb8..bf9bd95 100644 --- a/src/r128_probe.h +++ b/src/r128_probe.h @@ -41,8 +41,6 @@ #include "randrstr.h" #include "xf86Crtc.h" -#include "compat-api.h" - #ifdef USE_EXA #include "exa.h" #endif