From: Peter Huewe Date: Sun, 3 Feb 2013 21:54:32 +0000 (+0100) Subject: staging/xgifb: mttr must be (signed) int X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=8cedcc7022e40fa83339257e82e64754ca1c8b9a;p=linux-beck.git staging/xgifb: mttr must be (signed) int The mttr field must be declared as signed int (as in every other fb driver) for the mttr functions to work properly. Moreover the value should be initialized with -1. Signed-off-by: Peter Huewe Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/xgifb/XGI_main_26.c b/drivers/staging/xgifb/XGI_main_26.c index 83f8a6a662c0..fa351f90da33 100644 --- a/drivers/staging/xgifb/XGI_main_26.c +++ b/drivers/staging/xgifb/XGI_main_26.c @@ -1802,7 +1802,7 @@ static int xgifb_probe(struct pci_dev *pdev, if (!XGIInitNew(pdev)) dev_err(&pdev->dev, "XGIInitNew() failed!\n"); - xgifb_info->mtrr = (unsigned int) 0; + xgifb_info->mtrr = -1; 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 80547983759b..af50362395d5 100644 --- a/drivers/staging/xgifb/XGIfb.h +++ b/drivers/staging/xgifb/XGIfb.h @@ -67,7 +67,7 @@ struct xgifb_video_info { unsigned long mmio_size; void __iomem *mmio_vbase; unsigned long vga_base; - unsigned long mtrr; + int mtrr; int video_bpp; int video_cmap_len;