diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-04-14 15:15:43 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-04-14 15:15:43 -0300 |
commit | 76f2329ed08d1515452081209e66a9352842fbb5 (patch) | |
tree | b2d57e19014bae8273d80d4e8d1a46018fc137e7 /linux/drivers/media/video | |
parent | 8dc666d4b3b64814dc3a27e476350b94fcdfb232 (diff) | |
download | mediapointer-dvb-s2-76f2329ed08d1515452081209e66a9352842fbb5.tar.gz mediapointer-dvb-s2-76f2329ed08d1515452081209e66a9352842fbb5.tar.bz2 |
Reduce usbvision data size
From: Mauro Carvalho Chehab <mchehab@infradead.org>
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: Thierry MERLE <thierry.merle@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/drivers/media/video')
-rw-r--r-- | linux/drivers/media/video/usbvision/usbvision-cards.c | 3 | ||||
-rw-r--r-- | linux/drivers/media/video/usbvision/usbvision-video.c | 8 | ||||
-rw-r--r-- | linux/drivers/media/video/usbvision/usbvision.h | 6 |
3 files changed, 8 insertions, 9 deletions
diff --git a/linux/drivers/media/video/usbvision/usbvision-cards.c b/linux/drivers/media/video/usbvision/usbvision-cards.c index 005dec184..109f6b039 100644 --- a/linux/drivers/media/video/usbvision/usbvision-cards.c +++ b/linux/drivers/media/video/usbvision/usbvision-cards.c @@ -1138,7 +1138,6 @@ struct usbvision_device_data_st usbvision_device_data[] = { .Dvi_yuv = -1, .ModelString = "Hauppauge WinTv-USB", }, - {} /* Terminating entry */ }; /* Supported Devices */ @@ -1209,8 +1208,6 @@ struct usb_device_id usbvision_table [] = { { 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(0x2400, 0x4200), .driver_info=HPG_WINTV }, - - { } /* Terminating entry */ }; MODULE_DEVICE_TABLE (usb, usbvision_table); diff --git a/linux/drivers/media/video/usbvision/usbvision-video.c b/linux/drivers/media/video/usbvision/usbvision-video.c index f6db1165e..9792b093f 100644 --- a/linux/drivers/media/video/usbvision/usbvision-video.c +++ b/linux/drivers/media/video/usbvision/usbvision-video.c @@ -2141,7 +2141,7 @@ static struct usb_driver usbvision_driver = { */ 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_table[0]=usbvision_table[1]; @@ -2222,10 +2222,12 @@ static void customdevice_process(void) sscanf(parse,"%d",&usbvision_device_data[0].AudioChannels); goto2next(parse); 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); 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); PDEBUG(DBG_PROBE, "Tuner=%d", usbvision_device_data[0].Tuner); sscanf(parse,"%d",&usbvision_device_data[0].TunerType); diff --git a/linux/drivers/media/video/usbvision/usbvision.h b/linux/drivers/media/video/usbvision/usbvision.h index 9bd1e6ac5..90e71f58c 100644 --- a/linux/drivers/media/video/usbvision/usbvision.h +++ b/linux/drivers/media/video/usbvision/usbvision.h @@ -347,9 +347,9 @@ struct usbvision_device_data_st { int VideoChannels; __u64 VideoNorm; int AudioChannels; - int Radio; - int vbi; - int Tuner; + int Radio:1; + int vbi:1; + int Tuner:1; int TunerType; int Vin_Reg1; int Vin_Reg2; |