提交 f7ca6256 编写于 作者: M Mauro Carvalho Chehab

V4L/DVB (5516): Reduce usbvision data size

This patch reduces usbvision driver on about 1Kb on i386 over the
original version with the old struct:
   text    data     bss     dec     hex filename
  52312   11848      60   64220    fadc old/usbvision.ko
  52474   10708      60   63242    f70a new/usbvision.ko
Acked-by: NThierry MERLE <thierry.merle@free.fr>
Signed-off-by: NMauro Carvalho Chehab <mchehab@infradead.org>
上级 659ae56d
...@@ -1137,7 +1137,6 @@ struct usbvision_device_data_st usbvision_device_data[] = { ...@@ -1137,7 +1137,6 @@ struct usbvision_device_data_st usbvision_device_data[] = {
.Dvi_yuv = -1, .Dvi_yuv = -1,
.ModelString = "Hauppauge WinTv-USB", .ModelString = "Hauppauge WinTv-USB",
}, },
{} /* Terminating entry */
}; };
/* Supported Devices */ /* Supported Devices */
...@@ -1208,8 +1207,6 @@ struct usb_device_id usbvision_table [] = { ...@@ -1208,8 +1207,6 @@ struct usb_device_id usbvision_table [] = {
{ USB_DEVICE(0x2304, 0x0301), .driver_info=PINNA_LINX_VD_IN_CAB_PAL }, { USB_DEVICE(0x2304, 0x0301), .driver_info=PINNA_LINX_VD_IN_CAB_PAL },
{ USB_DEVICE(0x2304, 0x0419), .driver_info=PINNA_PCTV_BUNGEE_PAL_FM }, { USB_DEVICE(0x2304, 0x0419), .driver_info=PINNA_PCTV_BUNGEE_PAL_FM },
{ USB_DEVICE(0x2400, 0x4200), .driver_info=HPG_WINTV }, { USB_DEVICE(0x2400, 0x4200), .driver_info=HPG_WINTV },
{ } /* Terminating entry */
}; };
MODULE_DEVICE_TABLE (usb, usbvision_table); MODULE_DEVICE_TABLE (usb, usbvision_table);
...@@ -1949,7 +1949,7 @@ static struct usb_driver usbvision_driver = { ...@@ -1949,7 +1949,7 @@ static struct usb_driver usbvision_driver = {
*/ */
static void customdevice_process(void) static void customdevice_process(void)
{ {
unsigned int id_vend,id_prod; unsigned int id_vend,id_prod,radio,tuner;
usbvision_device_data[0]=usbvision_device_data[1]; usbvision_device_data[0]=usbvision_device_data[1];
usbvision_table[0]=usbvision_table[1]; usbvision_table[0]=usbvision_table[1];
...@@ -2030,10 +2030,12 @@ static void customdevice_process(void) ...@@ -2030,10 +2030,12 @@ static void customdevice_process(void)
sscanf(parse,"%d",&usbvision_device_data[0].AudioChannels); sscanf(parse,"%d",&usbvision_device_data[0].AudioChannels);
goto2next(parse); goto2next(parse);
PDEBUG(DBG_PROBE, "AudioChannels=%d", usbvision_device_data[0].AudioChannels); PDEBUG(DBG_PROBE, "AudioChannels=%d", usbvision_device_data[0].AudioChannels);
sscanf(parse,"%d",&usbvision_device_data[0].Radio); sscanf(parse,"%d",&radio);
usbvision_device_data[0].Radio=(radio?1:0);
goto2next(parse); goto2next(parse);
PDEBUG(DBG_PROBE, "Radio=%d", usbvision_device_data[0].Radio); PDEBUG(DBG_PROBE, "Radio=%d", usbvision_device_data[0].Radio);
sscanf(parse,"%d",&usbvision_device_data[0].Tuner); sscanf(parse,"%d",&tuner);
usbvision_device_data[0].Tuner=(tuner?1:0);
goto2next(parse); goto2next(parse);
PDEBUG(DBG_PROBE, "Tuner=%d", usbvision_device_data[0].Tuner); PDEBUG(DBG_PROBE, "Tuner=%d", usbvision_device_data[0].Tuner);
sscanf(parse,"%d",&usbvision_device_data[0].TunerType); sscanf(parse,"%d",&usbvision_device_data[0].TunerType);
......
...@@ -347,9 +347,9 @@ struct usbvision_device_data_st { ...@@ -347,9 +347,9 @@ struct usbvision_device_data_st {
int VideoChannels; int VideoChannels;
__u64 VideoNorm; __u64 VideoNorm;
int AudioChannels; int AudioChannels;
int Radio; int Radio:1;
int vbi; int vbi:1;
int Tuner; int Tuner:1;
int TunerType; int TunerType;
int Vin_Reg1; int Vin_Reg1;
int Vin_Reg2; int Vin_Reg2;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册