[PATCH 2/6] staging/xgifb: move mtrr variable under CONFIG_MTRR

Dmitry Eremin-Solenikov dbaryshkov at gmail.com
Mon Mar 19 17:50:10 UTC 2012


There is no need for mtrr value or any code around it if the kernel is
built w/o CONFIG_MTRR. For code cleanup move data member under
CONFIG_MTRR ifdef.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov at gmail.com>
---
 drivers/staging/xgifb/XGI_main_26.c |    2 ++
 drivers/staging/xgifb/XGIfb.h       |    2 ++
 2 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/staging/xgifb/XGI_main_26.c b/drivers/staging/xgifb/XGI_main_26.c
index 21c0378..259873c 100644
--- a/drivers/staging/xgifb/XGI_main_26.c
+++ b/drivers/staging/xgifb/XGI_main_26.c
@@ -2019,7 +2019,9 @@ static int __devinit xgifb_probe(struct pci_dev *pdev,
 	if (!XGIInitNew(pdev))
 		pr_err("XGIInitNew() failed!\n");
 
+#ifdef CONFIG_MTRR
 	xgifb_info->mtrr = (unsigned int) 0;
+#endif /* CONFIG_MTRR */
 
 	xgifb_info->hasVB = HASVB_NONE;
 	if ((xgifb_info->chip == XG20) ||
diff --git a/drivers/staging/xgifb/XGIfb.h b/drivers/staging/xgifb/XGIfb.h
index 37bb730..e06d0db 100644
--- a/drivers/staging/xgifb/XGIfb.h
+++ b/drivers/staging/xgifb/XGIfb.h
@@ -72,7 +72,9 @@ struct xgifb_video_info {
 	unsigned long mmio_size;
 	void __iomem *mmio_vbase;
 	unsigned long vga_base;
+#ifdef CONFIG_MTRR
 	unsigned long mtrr;
+#endif /* CONFIG_MTRR */
 
 	int    video_bpp;
 	int    video_cmap_len;
-- 
1.7.9.1




More information about the devel mailing list