diff options
author | sayli karnik <karniksayli1995@gmail.com> | 2017-01-28 00:44:36 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-01-27 21:09:33 +0100 |
commit | e4d9861cd98decd80ab7620708aa6ff2b850a4d1 (patch) | |
tree | baa130a9e6ff1834aa9dfa8b0fb563a9eec03aa0 /drivers/staging/xgifb | |
parent | 23b028c871e1131c96aa8c2bd8cc7e0d15f5efcd (diff) | |
download | linux-stable-e4d9861cd98decd80ab7620708aa6ff2b850a4d1.tar.gz linux-stable-e4d9861cd98decd80ab7620708aa6ff2b850a4d1.tar.bz2 linux-stable-e4d9861cd98decd80ab7620708aa6ff2b850a4d1.zip |
staging: xgifb: XGI_main_26: Remove multiple assignments
This patch resolves the checkpatch issue:
multiple assignments should be avoided
Signed-off-by: sayli karnik <karniksayli1995@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/xgifb')
-rw-r--r-- | drivers/staging/xgifb/XGI_main_26.c | 31 |
1 files changed, 21 insertions, 10 deletions
diff --git a/drivers/staging/xgifb/XGI_main_26.c b/drivers/staging/xgifb/XGI_main_26.c index 777cd6e11694..6930f7eb741b 100644 --- a/drivers/staging/xgifb/XGI_main_26.c +++ b/drivers/staging/xgifb/XGI_main_26.c @@ -607,8 +607,12 @@ static void XGIfb_bpp_to_var(struct xgifb_video_info *xgifb_info, { switch (var->bits_per_pixel) { case 8: - var->red.offset = var->green.offset = var->blue.offset = 0; - var->red.length = var->green.length = var->blue.length = 6; + var->red.offset = 0; + var->green.offset = 0; + var->blue.offset = 0; + var->red.length = 6; + var->green.length = 6; + var->blue.length = 6; xgifb_info->video_cmap_len = 256; break; case 16: @@ -1015,7 +1019,8 @@ static int XGIfb_do_set_var(struct fb_var_screeninfo *var, int isactive, xgifb_info->video_vheight = info->var.yres_virtual; xgifb_info->video_height = XGIbios_mode[xgifb_info->mode_idx].yres; - xgifb_info->org_x = xgifb_info->org_y = 0; + xgifb_info->org_x = 0; + xgifb_info->org_y = 0; xgifb_info->video_linelength = info->var.xres_virtual * (xgifb_info->video_bpp >> 3); switch (xgifb_info->video_bpp) { @@ -1311,10 +1316,12 @@ static int XGIfb_check_var(struct fb_var_screeninfo *var, struct fb_info *info) var->yoffset = var->yres_virtual - var->yres - 1; /* Set everything else to 0 */ - var->red.msb_right = - var->green.msb_right = - var->blue.msb_right = - var->transp.offset = var->transp.length = var->transp.msb_right = 0; + var->red.msb_right = 0; + var->green.msb_right = 0; + var->blue.msb_right = 0; + var->transp.offset = 0; + var->transp.length = 0; + var->transp.msb_right = 0; return 0; } @@ -1468,7 +1475,8 @@ static void XGIfb_detect_VB(struct xgifb_video_info *xgifb_info) { u8 cr32, temp = 0; - xgifb_info->TV_plug = xgifb_info->TV_type = 0; + xgifb_info->TV_plug = 0; + xgifb_info->TV_type = 0; cr32 = xgifb_reg_get(XGICR, IND_XGI_SCRATCH_REG_CR32); @@ -1738,7 +1746,9 @@ static int xgifb_probe(struct pci_dev *pdev, const struct pci_device_id *ent) goto error_0; } - xgifb_info->video_vbase = hw_info->pjVideoMemoryAddress = + xgifb_info->video_vbase = + ioremap_wc(xgifb_info->video_base, xgifb_info->video_size); + hw_info->pjVideoMemoryAddress = ioremap_wc(xgifb_info->video_base, xgifb_info->video_size); xgifb_info->mmio_vbase = ioremap(xgifb_info->mmio_base, xgifb_info->mmio_size); @@ -1897,7 +1907,8 @@ static int xgifb_probe(struct pci_dev *pdev, const struct pci_device_id *ent) xgifb_info->video_vheight = xgifb_info->video_height = XGIbios_mode[xgifb_info->mode_idx].yres; - xgifb_info->org_x = xgifb_info->org_y = 0; + xgifb_info->org_x = 0; + xgifb_info->org_y = 0; xgifb_info->video_linelength = xgifb_info->video_width * (xgifb_info->video_bpp >> 3); |