aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/misc
diff options
context:
space:
mode:
authorFelipe Balbi <felipe.lima@indt.org.br>2007-08-10 09:34:26 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2007-10-12 17:55:11 -0400
commit9dedd36778f9d9bd043df27c8fc62088ce93813f (patch)
treef9879fa961c67a65d2d1aa75052377ebfce5c30e /drivers/usb/misc
parented86d97068c7d53561d3e9b59db6c6b11f6091c7 (diff)
USB: SisUSB2VGA: Remove if 0'ed code
Unused code should be removed. We don't need to increase the size of the file with dead code inside if 0 statements. Signed-off-by: Felipe Balbi <felipe.lima@indt.org.br> Cc: Thomas Winischhofer <thomas@winischhofer.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/misc')
-rw-r--r--drivers/usb/misc/sisusbvga/sisusb.c57
-rw-r--r--drivers/usb/misc/sisusbvga/sisusb.h4
-rw-r--r--drivers/usb/misc/sisusbvga/sisusb_con.c47
-rw-r--r--drivers/usb/misc/sisusbvga/sisusb_init.c90
4 files changed, 1 insertions, 197 deletions
diff --git a/drivers/usb/misc/sisusbvga/sisusb.c b/drivers/usb/misc/sisusbvga/sisusb.c
index 376f86cab4b0..558b94fd209d 100644
--- a/drivers/usb/misc/sisusbvga/sisusb.c
+++ b/drivers/usb/misc/sisusbvga/sisusb.c
@@ -1261,47 +1261,6 @@ static int sisusb_read_mem_bulk(struct sisusb_usb_data *sisusb, u32 addr,
1261 addr += 4; 1261 addr += 4;
1262 length -= 4; 1262 length -= 4;
1263 } 1263 }
1264#if 0 /* That does not work, as EP 2 is an OUT EP! */
1265 default:
1266 CLEARPACKET(&packet);
1267 packet.header = 0x001f;
1268 packet.address = 0x000001a0;
1269 packet.data = 0x00000006;
1270 ret |= sisusb_send_bridge_packet(sisusb, 10,
1271 &packet, 0);
1272 packet.header = 0x001f;
1273 packet.address = 0x000001b0;
1274 packet.data = (length & ~3) | 0x40000000;
1275 ret |= sisusb_send_bridge_packet(sisusb, 10,
1276 &packet, 0);
1277 packet.header = 0x001f;
1278 packet.address = 0x000001b4;
1279 packet.data = addr;
1280 ret |= sisusb_send_bridge_packet(sisusb, 10,
1281 &packet, 0);
1282 packet.header = 0x001f;
1283 packet.address = 0x000001a4;
1284 packet.data = 0x00000001;
1285 ret |= sisusb_send_bridge_packet(sisusb, 10,
1286 &packet, 0);
1287 if (userbuffer) {
1288 ret |= sisusb_recv_bulk_msg(sisusb,
1289 SISUSB_EP_GFX_BULK_IN,
1290 (length & ~3),
1291 NULL, userbuffer,
1292 bytes_read, 0);
1293 if (!ret) userbuffer += (*bytes_read);
1294 } else {
1295 ret |= sisusb_recv_bulk_msg(sisusb,
1296 SISUSB_EP_GFX_BULK_IN,
1297 (length & ~3),
1298 kernbuffer, NULL,
1299 bytes_read, 0);
1300 if (!ret) kernbuffer += (*bytes_read);
1301 }
1302 addr += (*bytes_read);
1303 length -= (*bytes_read);
1304#endif
1305 } 1264 }
1306 1265
1307 if (ret) 1266 if (ret)
@@ -1401,22 +1360,6 @@ sisusb_readb(struct sisusb_usb_data *sisusb, u32 adr, u8 *data)
1401 return(sisusb_read_memio_byte(sisusb, SISUSB_TYPE_MEM, adr, data)); 1360 return(sisusb_read_memio_byte(sisusb, SISUSB_TYPE_MEM, adr, data));
1402} 1361}
1403 1362
1404#if 0
1405
1406int
1407sisusb_writew(struct sisusb_usb_data *sisusb, u32 adr, u16 data)
1408{
1409 return(sisusb_write_memio_word(sisusb, SISUSB_TYPE_MEM, adr, data));
1410}
1411
1412int
1413sisusb_readw(struct sisusb_usb_data *sisusb, u32 adr, u16 *data)
1414{
1415 return(sisusb_read_memio_word(sisusb, SISUSB_TYPE_MEM, adr, data));
1416}
1417
1418#endif /* 0 */
1419
1420int 1363int
1421sisusb_copy_memory(struct sisusb_usb_data *sisusb, char *src, 1364sisusb_copy_memory(struct sisusb_usb_data *sisusb, char *src,
1422 u32 dest, int length, size_t *bytes_written) 1365 u32 dest, int length, size_t *bytes_written)
diff --git a/drivers/usb/misc/sisusbvga/sisusb.h b/drivers/usb/misc/sisusbvga/sisusb.h
index 555fed0ba0ef..dc0473921e3d 100644
--- a/drivers/usb/misc/sisusbvga/sisusb.h
+++ b/drivers/usb/misc/sisusbvga/sisusb.h
@@ -46,9 +46,7 @@
46/* For older kernels, support for text consoles is by default 46/* For older kernels, support for text consoles is by default
47 * off. To ensable text console support, change the following: 47 * off. To ensable text console support, change the following:
48 */ 48 */
49#if 0 49/* #define CONFIG_USB_SISUSBVGA_CON */
50#define CONFIG_USB_SISUSBVGA_CON
51#endif
52 50
53/* Version Information */ 51/* Version Information */
54 52
diff --git a/drivers/usb/misc/sisusbvga/sisusb_con.c b/drivers/usb/misc/sisusbvga/sisusb_con.c
index 8d0edc867f33..20938cd09ed4 100644
--- a/drivers/usb/misc/sisusbvga/sisusb_con.c
+++ b/drivers/usb/misc/sisusbvga/sisusb_con.c
@@ -373,14 +373,6 @@ sisusbcon_putc(struct vc_data *c, int ch, int y, int x)
373 return; 373 return;
374 374
375 /* sisusb->lock is down */ 375 /* sisusb->lock is down */
376
377 /* Don't need to put the character into buffer ourselves,
378 * because the vt does this BEFORE calling us.
379 */
380#if 0
381 sisusbcon_writew(ch, SISUSB_VADDR(x, y));
382#endif
383
384 if (sisusb_is_inactive(c, sisusb)) { 376 if (sisusb_is_inactive(c, sisusb)) {
385 mutex_unlock(&sisusb->lock); 377 mutex_unlock(&sisusb->lock);
386 return; 378 return;
@@ -490,10 +482,6 @@ sisusbcon_bmove(struct vc_data *c, int sy, int sx,
490 struct sisusb_usb_data *sisusb; 482 struct sisusb_usb_data *sisusb;
491 ssize_t written; 483 ssize_t written;
492 int cols, length; 484 int cols, length;
493#if 0
494 u16 *src, *dest;
495 int i;
496#endif
497 485
498 if (width <= 0 || height <= 0) 486 if (width <= 0 || height <= 0)
499 return; 487 return;
@@ -505,41 +493,6 @@ sisusbcon_bmove(struct vc_data *c, int sy, int sx,
505 493
506 cols = sisusb->sisusb_num_columns; 494 cols = sisusb->sisusb_num_columns;
507 495
508 /* Don't need to move data outselves, because
509 * vt does this BEFORE calling us.
510 * This is only used by vt's insert/deletechar.
511 */
512#if 0
513 if (sx == 0 && dx == 0 && width >= c->vc_cols && width <= cols) {
514
515 sisusbcon_memmovew(SISUSB_VADDR(0, dy), SISUSB_VADDR(0, sy),
516 height * width * 2);
517
518 } else if (dy < sy || (dy == sy && dx < sx)) {
519
520 src = SISUSB_VADDR(sx, sy);
521 dest = SISUSB_VADDR(dx, dy);
522
523 for (i = height; i > 0; i--) {
524 sisusbcon_memmovew(dest, src, width * 2);
525 src += cols;
526 dest += cols;
527 }
528
529 } else {
530
531 src = SISUSB_VADDR(sx, sy + height - 1);
532 dest = SISUSB_VADDR(dx, dy + height - 1);
533
534 for (i = height; i > 0; i--) {
535 sisusbcon_memmovew(dest, src, width * 2);
536 src -= cols;
537 dest -= cols;
538 }
539
540 }
541#endif
542
543 if (sisusb_is_inactive(c, sisusb)) { 496 if (sisusb_is_inactive(c, sisusb)) {
544 mutex_unlock(&sisusb->lock); 497 mutex_unlock(&sisusb->lock);
545 return; 498 return;
diff --git a/drivers/usb/misc/sisusbvga/sisusb_init.c b/drivers/usb/misc/sisusbvga/sisusb_init.c
index d51de0ff9e46..5d8358295e71 100644
--- a/drivers/usb/misc/sisusbvga/sisusb_init.c
+++ b/drivers/usb/misc/sisusbvga/sisusb_init.c
@@ -70,96 +70,6 @@ SiSUSB_InitPtr(struct SiS_Private *SiS_Pr)
70} 70}
71 71
72/*********************************************/ 72/*********************************************/
73/* HELPER: Get ModeID */
74/*********************************************/
75
76#if 0
77unsigned short
78SiSUSB_GetModeID(int HDisplay, int VDisplay, int Depth)
79{
80 unsigned short ModeIndex = 0;
81
82 switch (HDisplay)
83 {
84 case 320:
85 if (VDisplay == 200)
86 ModeIndex = ModeIndex_320x200[Depth];
87 else if (VDisplay == 240)
88 ModeIndex = ModeIndex_320x240[Depth];
89 break;
90 case 400:
91 if (VDisplay == 300)
92 ModeIndex = ModeIndex_400x300[Depth];
93 break;
94 case 512:
95 if (VDisplay == 384)
96 ModeIndex = ModeIndex_512x384[Depth];
97 break;
98 case 640:
99 if (VDisplay == 480)
100 ModeIndex = ModeIndex_640x480[Depth];
101 else if (VDisplay == 400)
102 ModeIndex = ModeIndex_640x400[Depth];
103 break;
104 case 720:
105 if (VDisplay == 480)
106 ModeIndex = ModeIndex_720x480[Depth];
107 else if (VDisplay == 576)
108 ModeIndex = ModeIndex_720x576[Depth];
109 break;
110 case 768:
111 if (VDisplay == 576)
112 ModeIndex = ModeIndex_768x576[Depth];
113 break;
114 case 800:
115 if (VDisplay == 600)
116 ModeIndex = ModeIndex_800x600[Depth];
117 else if (VDisplay == 480)
118 ModeIndex = ModeIndex_800x480[Depth];
119 break;
120 case 848:
121 if (VDisplay == 480)
122 ModeIndex = ModeIndex_848x480[Depth];
123 break;
124 case 856:
125 if (VDisplay == 480)
126 ModeIndex = ModeIndex_856x480[Depth];
127 break;
128 case 960:
129 if (VDisplay == 540)
130 ModeIndex = ModeIndex_960x540[Depth];
131 else if (VDisplay == 600)
132 ModeIndex = ModeIndex_960x600[Depth];
133 break;
134 case 1024:
135 if (VDisplay == 576)
136 ModeIndex = ModeIndex_1024x576[Depth];
137 else if (VDisplay == 768)
138 ModeIndex = ModeIndex_1024x768[Depth];
139 break;
140 case 1152:
141 if (VDisplay == 864)
142 ModeIndex = ModeIndex_1152x864[Depth];
143 break;
144 case 1280:
145 switch (VDisplay) {
146 case 720:
147 ModeIndex = ModeIndex_1280x720[Depth];
148 break;
149 case 768:
150 ModeIndex = ModeIndex_1280x768[Depth];
151 break;
152 case 1024:
153 ModeIndex = ModeIndex_1280x1024[Depth];
154 break;
155 }
156 }
157
158 return ModeIndex;
159}
160#endif /* 0 */
161
162/*********************************************/
163/* HELPER: SetReg, GetReg */ 73/* HELPER: SetReg, GetReg */
164/*********************************************/ 74/*********************************************/
165 75