提交 9dedd367 编写于 作者: F Felipe Balbi 提交者: Greg Kroah-Hartman

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: NFelipe Balbi <felipe.lima@indt.org.br>
Cc: Thomas Winischhofer <thomas@winischhofer.net>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 ed86d970
...@@ -1261,47 +1261,6 @@ static int sisusb_read_mem_bulk(struct sisusb_usb_data *sisusb, u32 addr, ...@@ -1261,47 +1261,6 @@ static int sisusb_read_mem_bulk(struct sisusb_usb_data *sisusb, u32 addr,
addr += 4; addr += 4;
length -= 4; length -= 4;
} }
#if 0 /* That does not work, as EP 2 is an OUT EP! */
default:
CLEARPACKET(&packet);
packet.header = 0x001f;
packet.address = 0x000001a0;
packet.data = 0x00000006;
ret |= sisusb_send_bridge_packet(sisusb, 10,
&packet, 0);
packet.header = 0x001f;
packet.address = 0x000001b0;
packet.data = (length & ~3) | 0x40000000;
ret |= sisusb_send_bridge_packet(sisusb, 10,
&packet, 0);
packet.header = 0x001f;
packet.address = 0x000001b4;
packet.data = addr;
ret |= sisusb_send_bridge_packet(sisusb, 10,
&packet, 0);
packet.header = 0x001f;
packet.address = 0x000001a4;
packet.data = 0x00000001;
ret |= sisusb_send_bridge_packet(sisusb, 10,
&packet, 0);
if (userbuffer) {
ret |= sisusb_recv_bulk_msg(sisusb,
SISUSB_EP_GFX_BULK_IN,
(length & ~3),
NULL, userbuffer,
bytes_read, 0);
if (!ret) userbuffer += (*bytes_read);
} else {
ret |= sisusb_recv_bulk_msg(sisusb,
SISUSB_EP_GFX_BULK_IN,
(length & ~3),
kernbuffer, NULL,
bytes_read, 0);
if (!ret) kernbuffer += (*bytes_read);
}
addr += (*bytes_read);
length -= (*bytes_read);
#endif
} }
if (ret) if (ret)
...@@ -1401,22 +1360,6 @@ sisusb_readb(struct sisusb_usb_data *sisusb, u32 adr, u8 *data) ...@@ -1401,22 +1360,6 @@ sisusb_readb(struct sisusb_usb_data *sisusb, u32 adr, u8 *data)
return(sisusb_read_memio_byte(sisusb, SISUSB_TYPE_MEM, adr, data)); return(sisusb_read_memio_byte(sisusb, SISUSB_TYPE_MEM, adr, data));
} }
#if 0
int
sisusb_writew(struct sisusb_usb_data *sisusb, u32 adr, u16 data)
{
return(sisusb_write_memio_word(sisusb, SISUSB_TYPE_MEM, adr, data));
}
int
sisusb_readw(struct sisusb_usb_data *sisusb, u32 adr, u16 *data)
{
return(sisusb_read_memio_word(sisusb, SISUSB_TYPE_MEM, adr, data));
}
#endif /* 0 */
int int
sisusb_copy_memory(struct sisusb_usb_data *sisusb, char *src, sisusb_copy_memory(struct sisusb_usb_data *sisusb, char *src,
u32 dest, int length, size_t *bytes_written) u32 dest, int length, size_t *bytes_written)
......
...@@ -46,9 +46,7 @@ ...@@ -46,9 +46,7 @@
/* For older kernels, support for text consoles is by default /* For older kernels, support for text consoles is by default
* off. To ensable text console support, change the following: * off. To ensable text console support, change the following:
*/ */
#if 0 /* #define CONFIG_USB_SISUSBVGA_CON */
#define CONFIG_USB_SISUSBVGA_CON
#endif
/* Version Information */ /* Version Information */
......
...@@ -373,14 +373,6 @@ sisusbcon_putc(struct vc_data *c, int ch, int y, int x) ...@@ -373,14 +373,6 @@ sisusbcon_putc(struct vc_data *c, int ch, int y, int x)
return; return;
/* sisusb->lock is down */ /* sisusb->lock is down */
/* Don't need to put the character into buffer ourselves,
* because the vt does this BEFORE calling us.
*/
#if 0
sisusbcon_writew(ch, SISUSB_VADDR(x, y));
#endif
if (sisusb_is_inactive(c, sisusb)) { if (sisusb_is_inactive(c, sisusb)) {
mutex_unlock(&sisusb->lock); mutex_unlock(&sisusb->lock);
return; return;
...@@ -490,10 +482,6 @@ sisusbcon_bmove(struct vc_data *c, int sy, int sx, ...@@ -490,10 +482,6 @@ sisusbcon_bmove(struct vc_data *c, int sy, int sx,
struct sisusb_usb_data *sisusb; struct sisusb_usb_data *sisusb;
ssize_t written; ssize_t written;
int cols, length; int cols, length;
#if 0
u16 *src, *dest;
int i;
#endif
if (width <= 0 || height <= 0) if (width <= 0 || height <= 0)
return; return;
...@@ -505,41 +493,6 @@ sisusbcon_bmove(struct vc_data *c, int sy, int sx, ...@@ -505,41 +493,6 @@ sisusbcon_bmove(struct vc_data *c, int sy, int sx,
cols = sisusb->sisusb_num_columns; cols = sisusb->sisusb_num_columns;
/* Don't need to move data outselves, because
* vt does this BEFORE calling us.
* This is only used by vt's insert/deletechar.
*/
#if 0
if (sx == 0 && dx == 0 && width >= c->vc_cols && width <= cols) {
sisusbcon_memmovew(SISUSB_VADDR(0, dy), SISUSB_VADDR(0, sy),
height * width * 2);
} else if (dy < sy || (dy == sy && dx < sx)) {
src = SISUSB_VADDR(sx, sy);
dest = SISUSB_VADDR(dx, dy);
for (i = height; i > 0; i--) {
sisusbcon_memmovew(dest, src, width * 2);
src += cols;
dest += cols;
}
} else {
src = SISUSB_VADDR(sx, sy + height - 1);
dest = SISUSB_VADDR(dx, dy + height - 1);
for (i = height; i > 0; i--) {
sisusbcon_memmovew(dest, src, width * 2);
src -= cols;
dest -= cols;
}
}
#endif
if (sisusb_is_inactive(c, sisusb)) { if (sisusb_is_inactive(c, sisusb)) {
mutex_unlock(&sisusb->lock); mutex_unlock(&sisusb->lock);
return; return;
......
...@@ -69,96 +69,6 @@ SiSUSB_InitPtr(struct SiS_Private *SiS_Pr) ...@@ -69,96 +69,6 @@ SiSUSB_InitPtr(struct SiS_Private *SiS_Pr)
SiS_Pr->SiS_VCLKData = SiSUSB_VCLKData; SiS_Pr->SiS_VCLKData = SiSUSB_VCLKData;
} }
/*********************************************/
/* HELPER: Get ModeID */
/*********************************************/
#if 0
unsigned short
SiSUSB_GetModeID(int HDisplay, int VDisplay, int Depth)
{
unsigned short ModeIndex = 0;
switch (HDisplay)
{
case 320:
if (VDisplay == 200)
ModeIndex = ModeIndex_320x200[Depth];
else if (VDisplay == 240)
ModeIndex = ModeIndex_320x240[Depth];
break;
case 400:
if (VDisplay == 300)
ModeIndex = ModeIndex_400x300[Depth];
break;
case 512:
if (VDisplay == 384)
ModeIndex = ModeIndex_512x384[Depth];
break;
case 640:
if (VDisplay == 480)
ModeIndex = ModeIndex_640x480[Depth];
else if (VDisplay == 400)
ModeIndex = ModeIndex_640x400[Depth];
break;
case 720:
if (VDisplay == 480)
ModeIndex = ModeIndex_720x480[Depth];
else if (VDisplay == 576)
ModeIndex = ModeIndex_720x576[Depth];
break;
case 768:
if (VDisplay == 576)
ModeIndex = ModeIndex_768x576[Depth];
break;
case 800:
if (VDisplay == 600)
ModeIndex = ModeIndex_800x600[Depth];
else if (VDisplay == 480)
ModeIndex = ModeIndex_800x480[Depth];
break;
case 848:
if (VDisplay == 480)
ModeIndex = ModeIndex_848x480[Depth];
break;
case 856:
if (VDisplay == 480)
ModeIndex = ModeIndex_856x480[Depth];
break;
case 960:
if (VDisplay == 540)
ModeIndex = ModeIndex_960x540[Depth];
else if (VDisplay == 600)
ModeIndex = ModeIndex_960x600[Depth];
break;
case 1024:
if (VDisplay == 576)
ModeIndex = ModeIndex_1024x576[Depth];
else if (VDisplay == 768)
ModeIndex = ModeIndex_1024x768[Depth];
break;
case 1152:
if (VDisplay == 864)
ModeIndex = ModeIndex_1152x864[Depth];
break;
case 1280:
switch (VDisplay) {
case 720:
ModeIndex = ModeIndex_1280x720[Depth];
break;
case 768:
ModeIndex = ModeIndex_1280x768[Depth];
break;
case 1024:
ModeIndex = ModeIndex_1280x1024[Depth];
break;
}
}
return ModeIndex;
}
#endif /* 0 */
/*********************************************/ /*********************************************/
/* HELPER: SetReg, GetReg */ /* HELPER: SetReg, GetReg */
/*********************************************/ /*********************************************/
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册