From: Peter Huewe <peterhuewe@gmx.de>
Date: Wed, 13 Jun 2012 22:21:39 +0000 (+0200)
Subject: staging/xgifb: Remove assignments without effect
X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=176f7842a8c0a19e0947f630d71bb53db312812f;p=linux.git

staging/xgifb: Remove assignments without effect

This patch removes assignments to the fb_fix_screeninfo struct which are
overwritten by the memset in XGIfb_get_fix() a few lines later.
Since the name/id might be useful this was moved to XGIfb_get_fix().

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---

diff --git a/drivers/staging/xgifb/XGI_main_26.c b/drivers/staging/xgifb/XGI_main_26.c
index 033463d1966c0..729d980f01048 100644
--- a/drivers/staging/xgifb/XGI_main_26.c
+++ b/drivers/staging/xgifb/XGI_main_26.c
@@ -1348,6 +1348,8 @@ static int XGIfb_get_fix(struct fb_fix_screeninfo *fix, int con,
 	DEBUGPRN("inside get_fix");
 	memset(fix, 0, sizeof(struct fb_fix_screeninfo));
 
+	strncpy(fix->id, "XGI", sizeof(fix->id) - 1);
+
 	fix->smem_start = xgifb_info->video_base;
 
 	fix->smem_len = xgifb_info->video_size;
@@ -2230,11 +2232,6 @@ static int __devinit xgifb_probe(struct pci_dev *pdev,
 
 	}
 
-	strncpy(fb_info->fix.id, "XGI", sizeof(fb_info->fix.id) - 1);
-	fb_info->fix.type	= FB_TYPE_PACKED_PIXELS;
-	fb_info->fix.xpanstep	= 1;
-	fb_info->fix.ypanstep	= 1;
-
 	fb_info->flags = FBINFO_FLAG_DEFAULT;
 	fb_info->screen_base = xgifb_info->video_vbase;
 	fb_info->fbops = &XGIfb_ops;