diff options
author | Antonino A. Daplas <adaplas@gmail.com> | 2006-01-09 20:53:04 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-10 08:01:44 -0800 |
commit | f4a41836f1215ae1835c3f00316b20bb32cbfe99 (patch) | |
tree | 1a6b19d4a562f41b06392845df85fecfb9fdcbc1 /drivers/video/riva | |
parent | c019c0ec97548d545c42961e960cbe2e8a6aabe9 (diff) | |
download | blackbird-op-linux-f4a41836f1215ae1835c3f00316b20bb32cbfe99.tar.gz blackbird-op-linux-f4a41836f1215ae1835c3f00316b20bb32cbfe99.zip |
[PATCH] fbdev: rivafb: Driver cleanups
- remove redundant casts
Signed-off-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/video/riva')
-rw-r--r-- | drivers/video/riva/fbdev.c | 44 | ||||
-rw-r--r-- | drivers/video/riva/rivafb-i2c.c | 8 |
2 files changed, 26 insertions, 26 deletions
diff --git a/drivers/video/riva/fbdev.c b/drivers/video/riva/fbdev.c index 3e9f96e9237d..dd7b2cc88825 100644 --- a/drivers/video/riva/fbdev.c +++ b/drivers/video/riva/fbdev.c @@ -630,7 +630,7 @@ static void riva_load_video_mode(struct fb_info *info) int bpp, width, hDisplaySize, hDisplay, hStart, hEnd, hTotal, height, vDisplay, vStart, vEnd, vTotal, dotClock; int hBlankStart, hBlankEnd, vBlankStart, vBlankEnd; - struct riva_par *par = (struct riva_par *) info->par; + struct riva_par *par = info->par; struct riva_regs newmode; NVTRACE_ENTER(); @@ -925,7 +925,7 @@ riva_set_rop_solid(struct riva_par *par, int rop) static void riva_setup_accel(struct fb_info *info) { - struct riva_par *par = (struct riva_par *) info->par; + struct riva_par *par = info->par; RIVA_FIFO_FREE(par->riva, Clip, 2); NV_WR32(&par->riva.Clip->TopLeft, 0, 0x0); @@ -979,7 +979,7 @@ static int riva_get_cmap_len(const struct fb_var_screeninfo *var) #ifdef CONFIG_PMAC_BACKLIGHT static int riva_set_backlight_enable(int on, int level, void *data) { - struct riva_par *par = (struct riva_par *)data; + struct riva_par *par = data; U032 tmp_pcrt, tmp_pmc; tmp_pmc = par->riva.PMC[0x10F0/4] & 0x0000FFFF; @@ -1008,7 +1008,7 @@ static int riva_set_backlight_level(int level, void *data) static int rivafb_open(struct fb_info *info, int user) { - struct riva_par *par = (struct riva_par *) info->par; + struct riva_par *par = info->par; int cnt = atomic_read(&par->ref_count); NVTRACE_ENTER(); @@ -1034,7 +1034,7 @@ static int rivafb_open(struct fb_info *info, int user) static int rivafb_release(struct fb_info *info, int user) { - struct riva_par *par = (struct riva_par *) info->par; + struct riva_par *par = info->par; int cnt = atomic_read(&par->ref_count); NVTRACE_ENTER(); @@ -1057,7 +1057,7 @@ static int rivafb_release(struct fb_info *info, int user) static int rivafb_check_var(struct fb_var_screeninfo *var, struct fb_info *info) { struct fb_videomode *mode; - struct riva_par *par = (struct riva_par *) info->par; + struct riva_par *par = info->par; int nom, den; /* translating from pixels->bytes */ int mode_valid = 0; @@ -1166,7 +1166,7 @@ static int rivafb_check_var(struct fb_var_screeninfo *var, struct fb_info *info) static int rivafb_set_par(struct fb_info *info) { - struct riva_par *par = (struct riva_par *) info->par; + struct riva_par *par = info->par; NVTRACE_ENTER(); /* vgaHWunlock() + riva unlock (0x7F) */ @@ -1205,7 +1205,7 @@ static int rivafb_set_par(struct fb_info *info) static int rivafb_pan_display(struct fb_var_screeninfo *var, struct fb_info *info) { - struct riva_par *par = (struct riva_par *)info->par; + struct riva_par *par = info->par; unsigned int base; NVTRACE_ENTER(); @@ -1241,7 +1241,7 @@ static int rivafb_pan_display(struct fb_var_screeninfo *var, static int rivafb_blank(int blank, struct fb_info *info) { - struct riva_par *par= (struct riva_par *)info->par; + struct riva_par *par= info->par; unsigned char tmp, vesa; tmp = SEQin(par, 0x01) & ~0x20; /* screen on/off */ @@ -1304,7 +1304,7 @@ static int rivafb_setcolreg(unsigned regno, unsigned red, unsigned green, unsigned blue, unsigned transp, struct fb_info *info) { - struct riva_par *par = (struct riva_par *)info->par; + struct riva_par *par = info->par; RIVA_HW_INST *chip = &par->riva; int i; @@ -1393,7 +1393,7 @@ static int rivafb_setcolreg(unsigned regno, unsigned red, unsigned green, */ static void rivafb_fillrect(struct fb_info *info, const struct fb_fillrect *rect) { - struct riva_par *par = (struct riva_par *) info->par; + struct riva_par *par = info->par; u_int color, rop = 0; if ((info->flags & FBINFO_HWACCEL_DISABLED)) { @@ -1449,7 +1449,7 @@ static void rivafb_fillrect(struct fb_info *info, const struct fb_fillrect *rect */ static void rivafb_copyarea(struct fb_info *info, const struct fb_copyarea *region) { - struct riva_par *par = (struct riva_par *) info->par; + struct riva_par *par = info->par; if ((info->flags & FBINFO_HWACCEL_DISABLED)) { cfb_copyarea(info, region); @@ -1495,7 +1495,7 @@ static inline void convert_bgcolor_16(u32 *col) static void rivafb_imageblit(struct fb_info *info, const struct fb_image *image) { - struct riva_par *par = (struct riva_par *) info->par; + struct riva_par *par = info->par; u32 fgx = 0, bgx = 0, width, tmp; u8 *cdat = (u8 *) image->data; volatile u32 __iomem *d; @@ -1580,7 +1580,7 @@ static void rivafb_imageblit(struct fb_info *info, */ static int rivafb_cursor(struct fb_info *info, struct fb_cursor *cursor) { - struct riva_par *par = (struct riva_par *) info->par; + struct riva_par *par = info->par; u8 data[MAX_CURS * MAX_CURS/8]; int i, set = cursor->set; u16 fg, bg; @@ -1664,7 +1664,7 @@ static int rivafb_cursor(struct fb_info *info, struct fb_cursor *cursor) static int rivafb_sync(struct fb_info *info) { - struct riva_par *par = (struct riva_par *)info->par; + struct riva_par *par = info->par; wait_for_idle(par); return 0; @@ -1696,7 +1696,7 @@ static struct fb_ops riva_fb_ops = { static int __devinit riva_set_fbinfo(struct fb_info *info) { unsigned int cmap_len; - struct riva_par *par = (struct riva_par *) info->par; + struct riva_par *par = info->par; NVTRACE_ENTER(); info->flags = FBINFO_DEFAULT @@ -1733,7 +1733,7 @@ static int __devinit riva_set_fbinfo(struct fb_info *info) #ifdef CONFIG_PPC_OF static int __devinit riva_get_EDID_OF(struct fb_info *info, struct pci_dev *pd) { - struct riva_par *par = (struct riva_par *) info->par; + struct riva_par *par = info->par; struct device_node *dp; unsigned char *pedid = NULL; unsigned char *disptype = NULL; @@ -1767,7 +1767,7 @@ static int __devinit riva_get_EDID_OF(struct fb_info *info, struct pci_dev *pd) #if defined(CONFIG_FB_RIVA_I2C) && !defined(CONFIG_PPC_OF) static int __devinit riva_get_EDID_i2c(struct fb_info *info) { - struct riva_par *par = (struct riva_par *) info->par; + struct riva_par *par = info->par; struct fb_var_screeninfo var; int i; @@ -1837,7 +1837,7 @@ static void __devinit riva_get_EDID(struct fb_info *info, struct pci_dev *pdev) static void __devinit riva_get_edidinfo(struct fb_info *info) { struct fb_var_screeninfo *var = &rivafb_default_var; - struct riva_par *par = (struct riva_par *) info->par; + struct riva_par *par = info->par; fb_edid_to_monspecs(par->EDID, &info->monspecs); fb_videomode_to_modelist(info->monspecs.modedb, info->monspecs.modedb_len, @@ -1909,7 +1909,7 @@ static int __devinit rivafb_probe(struct pci_dev *pd, ret = -ENOMEM; goto err_ret; } - default_par = (struct riva_par *) info->par; + default_par = info->par; default_par->pdev = pd; info->pixmap.addr = kmalloc(8 * 1024, GFP_KERNEL); @@ -2070,7 +2070,7 @@ static int __devinit rivafb_probe(struct pci_dev *pd, err_iounmap_screen_base: #ifdef CONFIG_FB_RIVA_I2C - riva_delete_i2c_busses((struct riva_par *) info->par); + riva_delete_i2c_busses(info->par); #endif iounmap(info->screen_base); err_iounmap_pramin: @@ -2093,7 +2093,7 @@ err_ret: static void __exit rivafb_remove(struct pci_dev *pd) { struct fb_info *info = pci_get_drvdata(pd); - struct riva_par *par = (struct riva_par *) info->par; + struct riva_par *par = info->par; NVTRACE_ENTER(); if (!info) diff --git a/drivers/video/riva/rivafb-i2c.c b/drivers/video/riva/rivafb-i2c.c index 77151d8e0766..8b1967fc116a 100644 --- a/drivers/video/riva/rivafb-i2c.c +++ b/drivers/video/riva/rivafb-i2c.c @@ -30,7 +30,7 @@ static void riva_gpio_setscl(void* data, int state) { - struct riva_i2c_chan *chan = (struct riva_i2c_chan *)data; + struct riva_i2c_chan *chan = data; struct riva_par *par = chan->par; u32 val; @@ -48,7 +48,7 @@ static void riva_gpio_setscl(void* data, int state) static void riva_gpio_setsda(void* data, int state) { - struct riva_i2c_chan *chan = (struct riva_i2c_chan *)data; + struct riva_i2c_chan *chan = data; struct riva_par *par = chan->par; u32 val; @@ -66,7 +66,7 @@ static void riva_gpio_setsda(void* data, int state) static int riva_gpio_getscl(void* data) { - struct riva_i2c_chan *chan = (struct riva_i2c_chan *)data; + struct riva_i2c_chan *chan = data; struct riva_par *par = chan->par; u32 val = 0; @@ -81,7 +81,7 @@ static int riva_gpio_getscl(void* data) static int riva_gpio_getsda(void* data) { - struct riva_i2c_chan *chan = (struct riva_i2c_chan *)data; + struct riva_i2c_chan *chan = data; struct riva_par *par = chan->par; u32 val = 0; |