aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/savage/savagefb_driver.c
diff options
context:
space:
mode:
authorAntonino A. Daplas <adaplas@gmail.com>2006-01-09 23:53:02 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-10 11:01:44 -0500
commitb8901b091db260b0f0101d6395ce5c6016835a47 (patch)
treec68cfe12b00da435e30fbba83df5e1a7e956896e /drivers/video/savage/savagefb_driver.c
parentc439e345425434f07df333083794fc8864cee9ca (diff)
[PATCH] fbdev: savagefb: Driver cleanup
- remove redundant casts - remove symbol_get/symbol_put 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/savage/savagefb_driver.c')
-rw-r--r--drivers/video/savage/savagefb_driver.c33
1 files changed, 15 insertions, 18 deletions
diff --git a/drivers/video/savage/savagefb_driver.c b/drivers/video/savage/savagefb_driver.c
index 09e2f2841901..baddd2b320bd 100644
--- a/drivers/video/savage/savagefb_driver.c
+++ b/drivers/video/savage/savagefb_driver.c
@@ -686,7 +686,7 @@ static void savage_update_var(struct fb_var_screeninfo *var, struct fb_videomode
686static int savagefb_check_var (struct fb_var_screeninfo *var, 686static int savagefb_check_var (struct fb_var_screeninfo *var,
687 struct fb_info *info) 687 struct fb_info *info)
688{ 688{
689 struct savagefb_par *par = (struct savagefb_par *)info->par; 689 struct savagefb_par *par = info->par;
690 int memlen, vramlen, mode_valid = 0; 690 int memlen, vramlen, mode_valid = 0;
691 691
692 DBG("savagefb_check_var"); 692 DBG("savagefb_check_var");
@@ -1025,7 +1025,7 @@ static int savagefb_setcolreg(unsigned regno,
1025 unsigned transp, 1025 unsigned transp,
1026 struct fb_info *info) 1026 struct fb_info *info)
1027{ 1027{
1028 struct savagefb_par *par = (struct savagefb_par *)info->par; 1028 struct savagefb_par *par = info->par;
1029 1029
1030 if (regno >= NR_PALETTE) 1030 if (regno >= NR_PALETTE)
1031 return -EINVAL; 1031 return -EINVAL;
@@ -1328,7 +1328,7 @@ static void savagefb_set_fix(struct fb_info *info)
1328#if defined(CONFIG_FB_SAVAGE_ACCEL) 1328#if defined(CONFIG_FB_SAVAGE_ACCEL)
1329static void savagefb_set_clip(struct fb_info *info) 1329static void savagefb_set_clip(struct fb_info *info)
1330{ 1330{
1331 struct savagefb_par *par = (struct savagefb_par *)info->par; 1331 struct savagefb_par *par = info->par;
1332 int cmd; 1332 int cmd;
1333 1333
1334 cmd = BCI_CMD_NOP | BCI_CMD_CLIP_NEW; 1334 cmd = BCI_CMD_NOP | BCI_CMD_CLIP_NEW;
@@ -1342,7 +1342,7 @@ static void savagefb_set_clip(struct fb_info *info)
1342 1342
1343static int savagefb_set_par (struct fb_info *info) 1343static int savagefb_set_par (struct fb_info *info)
1344{ 1344{
1345 struct savagefb_par *par = (struct savagefb_par *)info->par; 1345 struct savagefb_par *par = info->par;
1346 struct fb_var_screeninfo *var = &info->var; 1346 struct fb_var_screeninfo *var = &info->var;
1347 int err; 1347 int err;
1348 1348
@@ -1381,7 +1381,7 @@ static int savagefb_set_par (struct fb_info *info)
1381static int savagefb_pan_display (struct fb_var_screeninfo *var, 1381static int savagefb_pan_display (struct fb_var_screeninfo *var,
1382 struct fb_info *info) 1382 struct fb_info *info)
1383{ 1383{
1384 struct savagefb_par *par = (struct savagefb_par *)info->par; 1384 struct savagefb_par *par = info->par;
1385 u_int y_bottom; 1385 u_int y_bottom;
1386 1386
1387 y_bottom = var->yoffset; 1387 y_bottom = var->yoffset;
@@ -1534,7 +1534,7 @@ static void savage_disable_mmio (struct savagefb_par *par)
1534 1534
1535static int __devinit savage_map_mmio (struct fb_info *info) 1535static int __devinit savage_map_mmio (struct fb_info *info)
1536{ 1536{
1537 struct savagefb_par *par = (struct savagefb_par *)info->par; 1537 struct savagefb_par *par = info->par;
1538 DBG ("savage_map_mmio"); 1538 DBG ("savage_map_mmio");
1539 1539
1540 if (S3_SAVAGE3D_SERIES (par->chip)) 1540 if (S3_SAVAGE3D_SERIES (par->chip))
@@ -1567,7 +1567,7 @@ static int __devinit savage_map_mmio (struct fb_info *info)
1567 1567
1568static void __devinit savage_unmap_mmio (struct fb_info *info) 1568static void __devinit savage_unmap_mmio (struct fb_info *info)
1569{ 1569{
1570 struct savagefb_par *par = (struct savagefb_par *)info->par; 1570 struct savagefb_par *par = info->par;
1571 DBG ("savage_unmap_mmio"); 1571 DBG ("savage_unmap_mmio");
1572 1572
1573 savage_disable_mmio(par); 1573 savage_disable_mmio(par);
@@ -1581,7 +1581,7 @@ static void __devinit savage_unmap_mmio (struct fb_info *info)
1581static int __devinit savage_map_video (struct fb_info *info, 1581static int __devinit savage_map_video (struct fb_info *info,
1582 int video_len) 1582 int video_len)
1583{ 1583{
1584 struct savagefb_par *par = (struct savagefb_par *)info->par; 1584 struct savagefb_par *par = info->par;
1585 int resource; 1585 int resource;
1586 1586
1587 DBG("savage_map_video"); 1587 DBG("savage_map_video");
@@ -1619,7 +1619,7 @@ static int __devinit savage_map_video (struct fb_info *info,
1619 1619
1620static void __devinit savage_unmap_video (struct fb_info *info) 1620static void __devinit savage_unmap_video (struct fb_info *info)
1621{ 1621{
1622 struct savagefb_par *par = (struct savagefb_par *)info->par; 1622 struct savagefb_par *par = info->par;
1623 1623
1624 DBG("savage_unmap_video"); 1624 DBG("savage_unmap_video");
1625 1625
@@ -1869,7 +1869,7 @@ static int __devinit savage_init_fb_info (struct fb_info *info,
1869 struct pci_dev *dev, 1869 struct pci_dev *dev,
1870 const struct pci_device_id *id) 1870 const struct pci_device_id *id)
1871{ 1871{
1872 struct savagefb_par *par = (struct savagefb_par *)info->par; 1872 struct savagefb_par *par = info->par;
1873 int err = 0; 1873 int err = 0;
1874 1874
1875 par->pcidev = dev; 1875 par->pcidev = dev;
@@ -2139,8 +2139,7 @@ static int __devinit savagefb_probe (struct pci_dev* dev,
2139 2139
2140static void __devexit savagefb_remove (struct pci_dev *dev) 2140static void __devexit savagefb_remove (struct pci_dev *dev)
2141{ 2141{
2142 struct fb_info *info = 2142 struct fb_info *info = pci_get_drvdata(dev);
2143 (struct fb_info *)pci_get_drvdata(dev);
2144 2143
2145 DBG("savagefb_remove"); 2144 DBG("savagefb_remove");
2146 2145
@@ -2174,9 +2173,8 @@ static void __devexit savagefb_remove (struct pci_dev *dev)
2174 2173
2175static int savagefb_suspend (struct pci_dev* dev, pm_message_t state) 2174static int savagefb_suspend (struct pci_dev* dev, pm_message_t state)
2176{ 2175{
2177 struct fb_info *info = 2176 struct fb_info *info = pci_get_drvdata(dev);
2178 (struct fb_info *)pci_get_drvdata(dev); 2177 struct savagefb_par *par = info->par;
2179 struct savagefb_par *par = (struct savagefb_par *)info->par;
2180 2178
2181 DBG("savagefb_suspend"); 2179 DBG("savagefb_suspend");
2182 2180
@@ -2210,9 +2208,8 @@ static int savagefb_suspend (struct pci_dev* dev, pm_message_t state)
2210 2208
2211static int savagefb_resume (struct pci_dev* dev) 2209static int savagefb_resume (struct pci_dev* dev)
2212{ 2210{
2213 struct fb_info *info = 2211 struct fb_info *info = pci_get_drvdata(dev);
2214 (struct fb_info *)pci_get_drvdata(dev); 2212 struct savagefb_par *par = info->par;
2215 struct savagefb_par *par = (struct savagefb_par *)info->par;
2216 int cur_state = par->pm_state; 2213 int cur_state = par->pm_state;
2217 2214
2218 DBG("savage_resume"); 2215 DBG("savage_resume");