staging: xgifb: remove macros with hidden variable
PATCH v3 1/1 staging: xgifb: remove macros with hidden variable
This patch removes macros in XGI_main.h that contain a xgifb_info variable. These macros hurt readability by hiding said variable behind a define. It also uses a temporary variable to keep the replaced code from getting too long.
Signed-off-by Joshua Abraham <[email protected]>
--- drivers/staging/xgifb/XGI_main.h | 13 --- drivers/staging/xgifb/XGI_main_26.c | 223 +++++++++++++++++++----------------- 2 files changed, 118 insertions(+), 118 deletions(-)
drivers/staging/xgifb/XGI_main.h +0 -13
@@ -18,19 +18,6 @@ static const struct pci_device_id xgifb_pci_table[] = {MODULE_DEVICE_TABLE (pci, xgifb_pci_table); -/* To be included in fb.h */ -#define XGISR (xgifb_info->dev_info.P3c4) -#define XGICR (xgifb_info->dev_info.P3d4) -#define XGIDACA (xgifb_info->dev_info.P3c8) -#define XGIDACD (xgifb_info->dev_info.P3c9) -#define XGIPART1 (xgifb_info->dev_info.Part1Port) -#define XGIPART2 (xgifb_info->dev_info.Part2Port) -#define XGIPART3 (xgifb_info->dev_info.Part3Port) -#define XGIPART4 (xgifb_info->dev_info.Part4Port) -#define XGIPART5 (xgifb_info->dev_info.Part5Port) -#define XGIDAC2A XGIPART5 -#define XGIDAC2D (XGIPART5 + 1) -#define IND_XGI_SCRATCH_REG_CR30 0x30/* CRs */ #define IND_XGI_SCRATCH_REG_CR31 0x31#define IND_XGI_SCRATCH_REG_CR32 0x32
drivers/staging/xgifb/XGI_main_26.c +118 -105
551 lines not on this page · raw message
Signature · 1 line
2.15.1
Much nicer. Thanks!
regards,
dan carpenter