diff options
author | Florian Tobias Schandinat <FlorianSchandinat@gmx.de> | 2009-09-22 19:47:23 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-23 10:39:52 -0400 |
commit | 68fa92082ffda84adcbae06fdd307fca53469c25 (patch) | |
tree | f63686d996017fd70a66b420b2a22a9000c34c66 /drivers/video/via | |
parent | 8594ac33450e6d66460230e5d07f5515b51476c9 (diff) |
viafb: another small cleanup of viafb_par
This removes the completly useless io variable as well as the temporary
used variables mmio_base and mmio_len in favor to use directly the fb_info
variables.
This is a code cleanup only, no runtime change expected.
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Scott Fang <ScottFang@viatech.com.cn>
Cc: Joseph Chan <JosephChan@via.com.tw>
Cc: Harald Welte <laforge@gnumonks.org>
Cc: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/video/via')
-rw-r--r-- | drivers/video/via/hw.c | 3 | ||||
-rw-r--r-- | drivers/video/via/hw.h | 3 | ||||
-rw-r--r-- | drivers/video/via/viafbdev.c | 9 | ||||
-rw-r--r-- | drivers/video/via/viafbdev.h | 3 |
4 files changed, 6 insertions, 12 deletions
diff --git a/drivers/video/via/hw.c b/drivers/video/via/hw.c index 5be4a670596f..86050e79b892 100644 --- a/drivers/video/via/hw.c +++ b/drivers/video/via/hw.c | |||
@@ -2496,8 +2496,7 @@ void viafb_crt_enable(void) | |||
2496 | viafb_write_reg_mask(CR36, VIACR, 0x0, BIT5 + BIT4); | 2496 | viafb_write_reg_mask(CR36, VIACR, 0x0, BIT5 + BIT4); |
2497 | } | 2497 | } |
2498 | 2498 | ||
2499 | void viafb_get_mmio_info(unsigned long *mmio_base, | 2499 | void viafb_get_mmio_info(unsigned long *mmio_base, u32 *mmio_len) |
2500 | unsigned long *mmio_len) | ||
2501 | { | 2500 | { |
2502 | struct pci_dev *pdev = NULL; | 2501 | struct pci_dev *pdev = NULL; |
2503 | u32 vendor, device; | 2502 | u32 vendor, device; |
diff --git a/drivers/video/via/hw.h b/drivers/video/via/hw.h index 874ea3fc290d..cf1dfd5c7fdf 100644 --- a/drivers/video/via/hw.h +++ b/drivers/video/via/hw.h | |||
@@ -923,8 +923,7 @@ int viafb_get_pixclock(int hres, int vres, int vmode_refresh); | |||
923 | int viafb_get_refresh(int hres, int vres, u32 float_refresh); | 923 | int viafb_get_refresh(int hres, int vres, u32 float_refresh); |
924 | void viafb_update_device_setting(int hres, int vres, int bpp, | 924 | void viafb_update_device_setting(int hres, int vres, int bpp, |
925 | int vmode_refresh, int flag); | 925 | int vmode_refresh, int flag); |
926 | void viafb_get_mmio_info(unsigned long *mmio_base, | 926 | void viafb_get_mmio_info(unsigned long *mmio_base, u32 *mmio_len); |
927 | unsigned long *mmio_len); | ||
928 | 927 | ||
929 | void viafb_set_iga_path(void); | 928 | void viafb_set_iga_path(void); |
930 | void viafb_set_primary_address(u32 addr); | 929 | void viafb_set_primary_address(u32 addr); |
diff --git a/drivers/video/via/viafbdev.c b/drivers/video/via/viafbdev.c index 924177cc814e..a17e138c92b3 100644 --- a/drivers/video/via/viafbdev.c +++ b/drivers/video/via/viafbdev.c | |||
@@ -69,8 +69,6 @@ static void viafb_setup_fixinfo(struct fb_fix_screeninfo *fix, | |||
69 | 69 | ||
70 | fix->smem_start = viaparinfo->fbmem; | 70 | fix->smem_start = viaparinfo->fbmem; |
71 | fix->smem_len = viaparinfo->fbmem_free; | 71 | fix->smem_len = viaparinfo->fbmem_free; |
72 | fix->mmio_start = viaparinfo->mmio_base; | ||
73 | fix->mmio_len = viaparinfo->mmio_len; | ||
74 | 72 | ||
75 | fix->type = FB_TYPE_PACKED_PIXELS; | 73 | fix->type = FB_TYPE_PACKED_PIXELS; |
76 | fix->type_aux = 0; | 74 | fix->type_aux = 0; |
@@ -2004,9 +2002,10 @@ static int __devinit via_pci_probe(void) | |||
2004 | return -ENOMEM; | 2002 | return -ENOMEM; |
2005 | } | 2003 | } |
2006 | 2004 | ||
2007 | viafb_get_mmio_info(&viaparinfo->mmio_base, &viaparinfo->mmio_len); | 2005 | viafb_get_mmio_info(&viafbinfo->fix.mmio_start, |
2008 | viaparinfo->io_virt = ioremap_nocache(viaparinfo->mmio_base, | 2006 | &viafbinfo->fix.mmio_len); |
2009 | viaparinfo->mmio_len); | 2007 | viaparinfo->io_virt = ioremap_nocache(viafbinfo->fix.mmio_start, |
2008 | viafbinfo->fix.mmio_len); | ||
2010 | if (!viaparinfo->io_virt) { | 2009 | if (!viaparinfo->io_virt) { |
2011 | printk(KERN_WARNING "ioremap failed: hardware acceleration disabled\n"); | 2010 | printk(KERN_WARNING "ioremap failed: hardware acceleration disabled\n"); |
2012 | viafb_accel = 0; | 2011 | viafb_accel = 0; |
diff --git a/drivers/video/via/viafbdev.h b/drivers/video/via/viafbdev.h index cd871f95498b..2763922bbe4f 100644 --- a/drivers/video/via/viafbdev.h +++ b/drivers/video/via/viafbdev.h | |||
@@ -41,9 +41,6 @@ struct viafb_par { | |||
41 | void __iomem *io_virt; /*iospace virtual memory address */ | 41 | void __iomem *io_virt; /*iospace virtual memory address */ |
42 | unsigned int fbmem; /*framebuffer physical memory address */ | 42 | unsigned int fbmem; /*framebuffer physical memory address */ |
43 | unsigned int memsize; /*size of fbmem */ | 43 | unsigned int memsize; /*size of fbmem */ |
44 | unsigned int io; /*io space address */ | ||
45 | unsigned long mmio_base; /*mmio base address */ | ||
46 | unsigned long mmio_len; /*mmio base length */ | ||
47 | u32 fbmem_free; /* Free FB memory */ | 44 | u32 fbmem_free; /* Free FB memory */ |
48 | u32 fbmem_used; /* Use FB memory size */ | 45 | u32 fbmem_used; /* Use FB memory size */ |
49 | u32 cursor_start; /* Cursor Start Address */ | 46 | u32 cursor_start; /* Cursor Start Address */ |