diff options
author | Florian Tobias Schandinat <FlorianSchandinat@gmx.de> | 2010-03-10 18:21:30 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-12 18:52:33 -0500 |
commit | d8566b29e86ef3906dd6c0ea4a02c2a925748da5 (patch) | |
tree | 1a3e5660d03aa24e206e4022dd77733fbf524535 | |
parent | c5f06f5cddd6681b978ffdb53755e28eefccb1bb (diff) |
viafb: yet another dead code removal
Remove some functions that were never executed and a related undocumented
module parameter.
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Scott Fang <ScottFang@viatech.com.cn>
Cc: Joseph Chan <JosephChan@via.com.tw>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | drivers/video/via/Makefile | 2 | ||||
-rw-r--r-- | drivers/video/via/global.c | 1 | ||||
-rw-r--r-- | drivers/video/via/global.h | 1 | ||||
-rw-r--r-- | drivers/video/via/iface.c | 78 | ||||
-rw-r--r-- | drivers/video/via/iface.h | 38 | ||||
-rw-r--r-- | drivers/video/via/viafbdev.c | 2 | ||||
-rw-r--r-- | drivers/video/via/viafbdev.h | 1 |
7 files changed, 1 insertions, 122 deletions
diff --git a/drivers/video/via/Makefile b/drivers/video/via/Makefile index e533b4b6aba4..eeed238ad6a2 100644 --- a/drivers/video/via/Makefile +++ b/drivers/video/via/Makefile | |||
@@ -4,4 +4,4 @@ | |||
4 | 4 | ||
5 | obj-$(CONFIG_FB_VIA) += viafb.o | 5 | obj-$(CONFIG_FB_VIA) += viafb.o |
6 | 6 | ||
7 | viafb-y :=viafbdev.o hw.o iface.o via_i2c.o dvi.o lcd.o ioctl.o accel.o via_utility.o vt1636.o global.o tblDPASetting.o viamode.o tbl1636.o | 7 | viafb-y :=viafbdev.o hw.o via_i2c.o dvi.o lcd.o ioctl.o accel.o via_utility.o vt1636.o global.o tblDPASetting.o viamode.o tbl1636.o |
diff --git a/drivers/video/via/global.c b/drivers/video/via/global.c index b675cdbb03ad..7fbc618526f4 100644 --- a/drivers/video/via/global.c +++ b/drivers/video/via/global.c | |||
@@ -23,7 +23,6 @@ int viafb_platform_epia_dvi = STATE_OFF; | |||
23 | int viafb_device_lcd_dualedge = STATE_OFF; | 23 | int viafb_device_lcd_dualedge = STATE_OFF; |
24 | int viafb_bus_width = 12; | 24 | int viafb_bus_width = 12; |
25 | int viafb_display_hardware_layout = HW_LAYOUT_LCD_DVI; | 25 | int viafb_display_hardware_layout = HW_LAYOUT_LCD_DVI; |
26 | int viafb_memsize; | ||
27 | int viafb_DeviceStatus = CRT_Device; | 26 | int viafb_DeviceStatus = CRT_Device; |
28 | int viafb_hotplug; | 27 | int viafb_hotplug; |
29 | int viafb_refresh = 60; | 28 | int viafb_refresh = 60; |
diff --git a/drivers/video/via/global.h b/drivers/video/via/global.h index d69d0ca99c2f..865b050683d1 100644 --- a/drivers/video/via/global.h +++ b/drivers/video/via/global.h | |||
@@ -35,7 +35,6 @@ | |||
35 | 35 | ||
36 | #include "debug.h" | 36 | #include "debug.h" |
37 | 37 | ||
38 | #include "iface.h" | ||
39 | #include "viafbdev.h" | 38 | #include "viafbdev.h" |
40 | #include "chip.h" | 39 | #include "chip.h" |
41 | #include "accel.h" | 40 | #include "accel.h" |
diff --git a/drivers/video/via/iface.c b/drivers/video/via/iface.c deleted file mode 100644 index 1570636c8d51..000000000000 --- a/drivers/video/via/iface.c +++ /dev/null | |||
@@ -1,78 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 1998-2008 VIA Technologies, Inc. All Rights Reserved. | ||
3 | * Copyright 2001-2008 S3 Graphics, Inc. All Rights Reserved. | ||
4 | |||
5 | * This program is free software; you can redistribute it and/or | ||
6 | * modify it under the terms of the GNU General Public | ||
7 | * License as published by the Free Software Foundation; | ||
8 | * either version 2, or (at your option) any later version. | ||
9 | |||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTIES OR REPRESENTATIONS; without even | ||
12 | * the implied warranty of MERCHANTABILITY or FITNESS FOR | ||
13 | * A PARTICULAR PURPOSE.See the GNU General Public License | ||
14 | * for more details. | ||
15 | |||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., | ||
19 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
20 | */ | ||
21 | |||
22 | #include "global.h" | ||
23 | |||
24 | /* Get frame buffer size from VGA BIOS */ | ||
25 | |||
26 | unsigned int viafb_get_memsize(void) | ||
27 | { | ||
28 | unsigned int m; | ||
29 | |||
30 | /* If memory size provided by user */ | ||
31 | if (viafb_memsize) | ||
32 | m = viafb_memsize * Mb; | ||
33 | else { | ||
34 | m = (unsigned int)viafb_read_reg(VIASR, SR39); | ||
35 | m = m * (4 * Mb); | ||
36 | |||
37 | if ((m < (16 * Mb)) || (m > (64 * Mb))) | ||
38 | m = 16 * Mb; | ||
39 | } | ||
40 | DEBUG_MSG(KERN_INFO "framebuffer size = %d Mb\n", m / Mb); | ||
41 | return m; | ||
42 | } | ||
43 | |||
44 | /* Get Video Buffer Starting Physical Address(back door)*/ | ||
45 | |||
46 | unsigned long viafb_get_videobuf_addr(void) | ||
47 | { | ||
48 | struct pci_dev *pdev = NULL; | ||
49 | unsigned char sys_mem; | ||
50 | unsigned char video_mem; | ||
51 | unsigned long sys_mem_size; | ||
52 | unsigned long video_mem_size; | ||
53 | /*system memory = 256 MB, video memory 64 MB */ | ||
54 | unsigned long vmem_starting_adr = 0x0C000000; | ||
55 | |||
56 | pdev = | ||
57 | (struct pci_dev *)pci_get_device(VIA_K800_BRIDGE_VID, | ||
58 | VIA_K800_BRIDGE_DID, NULL); | ||
59 | if (pdev != NULL) { | ||
60 | pci_read_config_byte(pdev, VIA_K800_SYSTEM_MEMORY_REG, | ||
61 | &sys_mem); | ||
62 | pci_read_config_byte(pdev, VIA_K800_VIDEO_MEMORY_REG, | ||
63 | &video_mem); | ||
64 | video_mem = (video_mem & 0x70) >> 4; | ||
65 | sys_mem_size = ((unsigned long)sys_mem) << 24; | ||
66 | if (video_mem != 0) | ||
67 | video_mem_size = (1 << (video_mem)) * 1024 * 1024; | ||
68 | else | ||
69 | video_mem_size = 0; | ||
70 | |||
71 | vmem_starting_adr = sys_mem_size - video_mem_size; | ||
72 | pci_dev_put(pdev); | ||
73 | } | ||
74 | |||
75 | DEBUG_MSG(KERN_INFO "Video Memory Starting Address = %lx \n", | ||
76 | vmem_starting_adr); | ||
77 | return vmem_starting_adr; | ||
78 | } | ||
diff --git a/drivers/video/via/iface.h b/drivers/video/via/iface.h deleted file mode 100644 index 790ec3e3aea2..000000000000 --- a/drivers/video/via/iface.h +++ /dev/null | |||
@@ -1,38 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 1998-2008 VIA Technologies, Inc. All Rights Reserved. | ||
3 | * Copyright 2001-2008 S3 Graphics, Inc. All Rights Reserved. | ||
4 | |||
5 | * This program is free software; you can redistribute it and/or | ||
6 | * modify it under the terms of the GNU General Public | ||
7 | * License as published by the Free Software Foundation; | ||
8 | * either version 2, or (at your option) any later version. | ||
9 | |||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTIES OR REPRESENTATIONS; without even | ||
12 | * the implied warranty of MERCHANTABILITY or FITNESS FOR | ||
13 | * A PARTICULAR PURPOSE.See the GNU General Public License | ||
14 | * for more details. | ||
15 | |||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., | ||
19 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
20 | */ | ||
21 | |||
22 | #ifndef __IFACE_H__ | ||
23 | #define __IFACE_H__ | ||
24 | |||
25 | #define Kb (1024) | ||
26 | #define Mb (Kb*Kb) | ||
27 | |||
28 | #define VIA_K800_BRIDGE_VID 0x1106 | ||
29 | #define VIA_K800_BRIDGE_DID 0x3204 | ||
30 | |||
31 | #define VIA_K800_SYSTEM_MEMORY_REG 0x47 | ||
32 | #define VIA_K800_VIDEO_MEMORY_REG 0xA1 | ||
33 | |||
34 | extern int viafb_memsize; | ||
35 | unsigned int viafb_get_memsize(void); | ||
36 | unsigned long viafb_get_videobuf_addr(void); | ||
37 | |||
38 | #endif /* __IFACE_H__ */ | ||
diff --git a/drivers/video/via/viafbdev.c b/drivers/video/via/viafbdev.c index 98e3bd11ae17..5f5b5e9ef500 100644 --- a/drivers/video/via/viafbdev.c +++ b/drivers/video/via/viafbdev.c | |||
@@ -2215,8 +2215,6 @@ module_init(viafb_init); | |||
2215 | module_exit(viafb_exit); | 2215 | module_exit(viafb_exit); |
2216 | 2216 | ||
2217 | #ifdef MODULE | 2217 | #ifdef MODULE |
2218 | module_param(viafb_memsize, int, S_IRUSR); | ||
2219 | |||
2220 | module_param(viafb_mode, charp, S_IRUSR); | 2218 | module_param(viafb_mode, charp, S_IRUSR); |
2221 | MODULE_PARM_DESC(viafb_mode, "Set resolution (default=640x480)"); | 2219 | MODULE_PARM_DESC(viafb_mode, "Set resolution (default=640x480)"); |
2222 | 2220 | ||
diff --git a/drivers/video/via/viafbdev.h b/drivers/video/via/viafbdev.h index 85aa20ea67e9..ecdaed841177 100644 --- a/drivers/video/via/viafbdev.h +++ b/drivers/video/via/viafbdev.h | |||
@@ -91,7 +91,6 @@ extern int viafb_LCD2_ON; | |||
91 | extern int viafb_LCD_ON; | 91 | extern int viafb_LCD_ON; |
92 | extern int viafb_DVI_ON; | 92 | extern int viafb_DVI_ON; |
93 | extern int viafb_hotplug; | 93 | extern int viafb_hotplug; |
94 | extern int viafb_memsize; | ||
95 | 94 | ||
96 | extern int strict_strtoul(const char *cp, unsigned int base, | 95 | extern int strict_strtoul(const char *cp, unsigned int base, |
97 | unsigned long *res); | 96 | unsigned long *res); |