[media] usbvision: get rid of camelCase
authorHans Verkuil <hverkuil@xs4all.nl>
Sun, 19 Dec 2010 23:21:36 +0000 (20:21 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Thu, 30 Dec 2010 10:01:56 +0000 (08:01 -0200)
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/usbvision/usbvision-cards.c
drivers/media/video/usbvision/usbvision-core.c
drivers/media/video/usbvision/usbvision-i2c.c
drivers/media/video/usbvision/usbvision-video.c
drivers/media/video/usbvision/usbvision.h

index 503b13beb922451185a268fcb290bcfbd4b97667..acfdb2bc791743bab8378efc634a8c924e187b67 100644 (file)
 /* Supported Devices: A table for usbvision.c*/
 struct usbvision_device_data_st  usbvision_device_data[] = {
        [XANBOO] = {
-               .Interface     = -1,
-               .Codec         = CODEC_SAA7113,
-               .VideoChannels = 4,
-               .VideoNorm     = V4L2_STD_NTSC,
-               .AudioChannels = 1,
-               .Radio         = 0,
-               .vbi           = 1,
-               .Tuner         = 0,
-               .TunerType     = 0,
-               .X_Offset      = -1,
-               .Y_Offset      = -1,
-               .ModelString   = "Xanboo",
+               .interface      = -1,
+               .codec          = CODEC_SAA7113,
+               .video_channels = 4,
+               .video_norm     = V4L2_STD_NTSC,
+               .audio_channels = 1,
+               .radio          = 0,
+               .vbi            = 1,
+               .tuner          = 0,
+               .tuner_type     = 0,
+               .x_offset       = -1,
+               .y_offset       = -1,
+               .model_string   = "Xanboo",
        },
        [BELKIN_VIDEOBUS_II] = {
-               .Interface     = -1,
-               .Codec         = CODEC_SAA7113,
-               .VideoChannels = 2,
-               .VideoNorm     = V4L2_STD_PAL,
-               .AudioChannels = 1,
-               .Radio         = 0,
-               .vbi           = 1,
-               .Tuner         = 0,
-               .TunerType     = 0,
-               .X_Offset      = 0,
-               .Y_Offset      = 3,
-               .Dvi_yuv_override = 1,
-               .Dvi_yuv       = 7,
-               .ModelString   = "Belkin USB VideoBus II Adapter",
+               .interface      = -1,
+               .codec          = CODEC_SAA7113,
+               .video_channels = 2,
+               .video_norm     = V4L2_STD_PAL,
+               .audio_channels = 1,
+               .radio          = 0,
+               .vbi            = 1,
+               .tuner          = 0,
+               .tuner_type     = 0,
+               .x_offset       = 0,
+               .y_offset       = 3,
+               .dvi_yuv_override = 1,
+               .dvi_yuv        = 7,
+               .model_string   = "Belkin USB VideoBus II Adapter",
        },
        [BELKIN_VIDEOBUS] = {
-               .Interface     = -1,
-               .Codec         = CODEC_SAA7111,
-               .VideoChannels = 2,
-               .VideoNorm     = V4L2_STD_NTSC,
-               .AudioChannels = 1,
-               .Radio         = 0,
-               .vbi           = 1,
-               .Tuner         = 0,
-               .TunerType     = 0,
-               .X_Offset      = -1,
-               .Y_Offset      = -1,
-               .ModelString   = "Belkin Components USB VideoBus",
+               .interface      = -1,
+               .codec          = CODEC_SAA7111,
+               .video_channels = 2,
+               .video_norm     = V4L2_STD_NTSC,
+               .audio_channels = 1,
+               .radio          = 0,
+               .vbi            = 1,
+               .tuner          = 0,
+               .tuner_type     = 0,
+               .x_offset       = -1,
+               .y_offset       = -1,
+               .model_string   = "Belkin Components USB VideoBus",
        },
        [BELKIN_USB_VIDEOBUS_II] = {
-               .Interface     = -1,
-               .Codec         = CODEC_SAA7113,
-               .VideoChannels = 2,
-               .VideoNorm     = V4L2_STD_NTSC,
-               .AudioChannels = 1,
-               .Radio         = 0,
-               .vbi           = 1,
-               .Tuner         = 0,
-               .TunerType     = 0,
-               .X_Offset      = 0,
-               .Y_Offset      = 3,
-               .Dvi_yuv_override = 1,
-               .Dvi_yuv       = 7,
-               .ModelString   = "Belkin USB VideoBus II",
+               .interface      = -1,
+               .codec          = CODEC_SAA7113,
+               .video_channels = 2,
+               .video_norm     = V4L2_STD_NTSC,
+               .audio_channels = 1,
+               .radio          = 0,
+               .vbi            = 1,
+               .tuner          = 0,
+               .tuner_type     = 0,
+               .x_offset       = 0,
+               .y_offset       = 3,
+               .dvi_yuv_override = 1,
+               .dvi_yuv        = 7,
+               .model_string   = "Belkin USB VideoBus II",
        },
        [ECHOFX_INTERVIEW_LITE] = {
-               .Interface     = 0,
-               .Codec         = CODEC_SAA7111,
-               .VideoChannels = 2,
-               .VideoNorm     = V4L2_STD_PAL,
-               .AudioChannels = 0,
-               .Radio         = 0,
-               .vbi           = 1,
-               .Tuner         = 0,
-               .TunerType     = 0,
-               .X_Offset      = -1,
-               .Y_Offset      = -1,
-               .Dvi_yuv_override = 1,
-               .Dvi_yuv       = 7,
-               .ModelString   = "echoFX InterView Lite",
+               .interface      = 0,
+               .codec          = CODEC_SAA7111,
+               .video_channels = 2,
+               .video_norm     = V4L2_STD_PAL,
+               .audio_channels = 0,
+               .radio          = 0,
+               .vbi            = 1,
+               .tuner          = 0,
+               .tuner_type     = 0,
+               .x_offset       = -1,
+               .y_offset       = -1,
+               .dvi_yuv_override = 1,
+               .dvi_yuv        = 7,
+               .model_string   = "echoFX InterView Lite",
        },
        [USBGEAR_USBG_V1] = {
-               .Interface     = -1,
-               .Codec         = CODEC_SAA7111,
-               .VideoChannels = 2,
-               .VideoNorm     = V4L2_STD_NTSC,
-               .AudioChannels = 1,
-               .Radio         = 0,
-               .vbi           = 1,
-               .Tuner         = 0,
-               .TunerType     = 0,
-               .X_Offset      = -1,
-               .Y_Offset      = -1,
-               .ModelString   = "USBGear USBG-V1 resp. HAMA USB",
+               .interface      = -1,
+               .codec          = CODEC_SAA7111,
+               .video_channels = 2,
+               .video_norm     = V4L2_STD_NTSC,
+               .audio_channels = 1,
+               .radio          = 0,
+               .vbi            = 1,
+               .tuner          = 0,
+               .tuner_type     = 0,
+               .x_offset       = -1,
+               .y_offset       = -1,
+               .model_string   = "USBGear USBG-V1 resp. HAMA USB",
        },
        [D_LINK_V100] = {
-               .Interface     = -1,
-               .Codec         = CODEC_SAA7113,
-               .VideoChannels = 4,
-               .VideoNorm     = V4L2_STD_NTSC,
-               .AudioChannels = 0,
-               .Radio         = 0,
-               .vbi           = 1,
-               .Tuner         = 0,
-               .TunerType     = 0,
-               .X_Offset      = 0,
-               .Y_Offset      = 3,
-               .Dvi_yuv_override = 1,
-               .Dvi_yuv       = 7,
-               .ModelString   = "D-Link V100",
+               .interface      = -1,
+               .codec          = CODEC_SAA7113,
+               .video_channels = 4,
+               .video_norm     = V4L2_STD_NTSC,
+               .audio_channels = 0,
+               .radio          = 0,
+               .vbi            = 1,
+               .tuner          = 0,
+               .tuner_type     = 0,
+               .x_offset       = 0,
+               .y_offset       = 3,
+               .dvi_yuv_override = 1,
+               .dvi_yuv        = 7,
+               .model_string   = "D-Link V100",
        },
        [X10_USB_CAMERA] = {
-               .Interface     = -1,
-               .Codec         = CODEC_SAA7111,
-               .VideoChannels = 2,
-               .VideoNorm     = V4L2_STD_NTSC,
-               .AudioChannels = 1,
-               .Radio         = 0,
-               .vbi           = 1,
-               .Tuner         = 0,
-               .TunerType     = 0,
-               .X_Offset      = -1,
-               .Y_Offset      = -1,
-               .ModelString   = "X10 USB Camera",
+               .interface      = -1,
+               .codec          = CODEC_SAA7111,
+               .video_channels = 2,
+               .video_norm     = V4L2_STD_NTSC,
+               .audio_channels = 1,
+               .radio          = 0,
+               .vbi            = 1,
+               .tuner          = 0,
+               .tuner_type     = 0,
+               .x_offset       = -1,
+               .y_offset       = -1,
+               .model_string   = "X10 USB Camera",
        },
        [HPG_WINTV_LIVE_PAL_BG] = {
-               .Interface     = -1,
-               .Codec         = CODEC_SAA7111,
-               .VideoChannels = 2,
-               .VideoNorm     = V4L2_STD_PAL,
-               .AudioChannels = 1,
-               .Radio         = 0,
-               .vbi           = 1,
-               .Tuner         = 0,
-               .TunerType     = 0,
-               .X_Offset      = -1,
-               .Y_Offset      = 3,
-               .Dvi_yuv_override = 1,
-               .Dvi_yuv       = 7,
-               .ModelString   = "Hauppauge WinTV USB Live (PAL B/G)",
+               .interface      = -1,
+               .codec          = CODEC_SAA7111,
+               .video_channels = 2,
+               .video_norm     = V4L2_STD_PAL,
+               .audio_channels = 1,
+               .radio          = 0,
+               .vbi            = 1,
+               .tuner          = 0,
+               .tuner_type     = 0,
+               .x_offset       = -1,
+               .y_offset       = 3,
+               .dvi_yuv_override = 1,
+               .dvi_yuv        = 7,
+               .model_string   = "Hauppauge WinTV USB Live (PAL B/G)",
        },
        [HPG_WINTV_LIVE_PRO_NTSC_MN] = {
-               .Interface     = -1,
-               .Codec         = CODEC_SAA7113,
-               .VideoChannels = 2,
-               .VideoNorm     = V4L2_STD_NTSC,
-               .AudioChannels = 0,
-               .Radio         = 0,
-               .vbi           = 1,
-               .Tuner         = 0,
-               .TunerType     = 0,
-               .X_Offset      = 0,
-               .Y_Offset      = 3,
-               .Dvi_yuv_override = 1,
-               .Dvi_yuv       = 7,
-               .ModelString   = "Hauppauge WinTV USB Live Pro (NTSC M/N)",
+               .interface      = -1,
+               .codec          = CODEC_SAA7113,
+               .video_channels = 2,
+               .video_norm     = V4L2_STD_NTSC,
+               .audio_channels = 0,
+               .radio          = 0,
+               .vbi            = 1,
+               .tuner          = 0,
+               .tuner_type     = 0,
+               .x_offset       = 0,
+               .y_offset       = 3,
+               .dvi_yuv_override = 1,
+               .dvi_yuv        = 7,
+               .model_string   = "Hauppauge WinTV USB Live Pro (NTSC M/N)",
        },
        [ZORAN_PMD_NOGATECH] = {
-               .Interface     = -1,
-               .Codec         = CODEC_SAA7113,
-               .VideoChannels = 2,
-               .VideoNorm     = V4L2_STD_PAL,
-               .AudioChannels = 2,
-               .Radio         = 0,
-               .vbi           = 1,
-               .Tuner         = 0,
-               .TunerType     = 0,
-               .X_Offset      = 0,
-               .Y_Offset      = 3,
-               .Dvi_yuv_override = 1,
-               .Dvi_yuv       = 7,
-               .ModelString   = "Zoran Co. PMD (Nogatech) AV-grabber Manhattan",
+               .interface      = -1,
+               .codec          = CODEC_SAA7113,
+               .video_channels = 2,
+               .video_norm     = V4L2_STD_PAL,
+               .audio_channels = 2,
+               .radio          = 0,
+               .vbi            = 1,
+               .tuner          = 0,
+               .tuner_type     = 0,
+               .x_offset       = 0,
+               .y_offset       = 3,
+               .dvi_yuv_override = 1,
+               .dvi_yuv        = 7,
+               .model_string   = "Zoran Co. PMD (Nogatech) AV-grabber Manhattan",
        },
        [NOGATECH_USB_TV_NTSC_FM] = {
-               .Interface     = -1,
-               .Codec         = CODEC_SAA7111,
-               .VideoChannels = 3,
-               .VideoNorm     = V4L2_STD_NTSC,
-               .AudioChannels = 1,
-               .Radio         = 1,
-               .vbi           = 1,
-               .Tuner         = 1,
-               .TunerType     = TUNER_PHILIPS_NTSC_M,
-               .X_Offset      = -1,
-               .Y_Offset      = 20,
-               .ModelString   = "Nogatech USB-TV (NTSC) FM",
+               .interface      = -1,
+               .codec          = CODEC_SAA7111,
+               .video_channels = 3,
+               .video_norm     = V4L2_STD_NTSC,
+               .audio_channels = 1,
+               .radio          = 1,
+               .vbi            = 1,
+               .tuner          = 1,
+               .tuner_type     = TUNER_PHILIPS_NTSC_M,
+               .x_offset       = -1,
+               .y_offset       = 20,
+               .model_string   = "Nogatech USB-TV (NTSC) FM",
        },
        [PNY_USB_TV_NTSC_FM] = {
-               .Interface     = -1,
-               .Codec         = CODEC_SAA7111,
-               .VideoChannels = 3,
-               .VideoNorm     = V4L2_STD_NTSC,
-               .AudioChannels = 1,
-               .Radio         = 1,
-               .vbi           = 1,
-               .Tuner         = 1,
-               .TunerType     = TUNER_PHILIPS_NTSC_M,
-               .X_Offset      = -1,
-               .Y_Offset      = 20,
-               .ModelString   = "PNY USB-TV (NTSC) FM",
+               .interface      = -1,
+               .codec          = CODEC_SAA7111,
+               .video_channels = 3,
+               .video_norm     = V4L2_STD_NTSC,
+               .audio_channels = 1,
+               .radio          = 1,
+               .vbi            = 1,
+               .tuner          = 1,
+               .tuner_type     = TUNER_PHILIPS_NTSC_M,
+               .x_offset       = -1,
+               .y_offset       = 20,
+               .model_string   = "PNY USB-TV (NTSC) FM",
        },
        [PV_PLAYTV_USB_PRO_PAL_FM] = {
-               .Interface     = 0,
-               .Codec         = CODEC_SAA7113,
-               .VideoChannels = 3,
-               .VideoNorm     = V4L2_STD_PAL,
-               .AudioChannels = 1,
-               .Radio         = 1,
-               .vbi           = 1,
-               .Tuner         = 1,
-               .TunerType     = TUNER_PHILIPS_PAL,
-               .X_Offset      = 0,
-               .Y_Offset      = 3,
-               .Dvi_yuv_override = 1,
-               .Dvi_yuv       = 7,
-               .ModelString   = "PixelView PlayTv-USB PRO (PAL) FM",
+               .interface      = 0,
+               .codec          = CODEC_SAA7113,
+               .video_channels = 3,
+               .video_norm     = V4L2_STD_PAL,
+               .audio_channels = 1,
+               .radio          = 1,
+               .vbi            = 1,
+               .tuner          = 1,
+               .tuner_type     = TUNER_PHILIPS_PAL,
+               .x_offset       = 0,
+               .y_offset       = 3,
+               .dvi_yuv_override = 1,
+               .dvi_yuv        = 7,
+               .model_string   = "PixelView PlayTv-USB PRO (PAL) FM",
        },
        [ZT_721] = {
-               .Interface     = 0,
-               .Codec         = CODEC_SAA7113,
-               .VideoChannels = 3,
-               .VideoNorm     = V4L2_STD_PAL,
-               .AudioChannels = 1,
-               .Radio         = 1,
-               .vbi           = 1,
-               .Tuner         = 1,
-               .TunerType     = TUNER_PHILIPS_PAL,
-               .X_Offset      = 0,
-               .Y_Offset      = 3,
-               .Dvi_yuv_override = 1,
-               .Dvi_yuv       = 7,
-               .ModelString   = "ZTV ZT-721 2.4GHz USB A/V Receiver",
+               .interface      = 0,
+               .codec          = CODEC_SAA7113,
+               .video_channels = 3,
+               .video_norm     = V4L2_STD_PAL,
+               .audio_channels = 1,
+               .radio          = 1,
+               .vbi            = 1,
+               .tuner          = 1,
+               .tuner_type     = TUNER_PHILIPS_PAL,
+               .x_offset       = 0,
+               .y_offset       = 3,
+               .dvi_yuv_override = 1,
+               .dvi_yuv        = 7,
+               .model_string   = "ZTV ZT-721 2.4GHz USB A/V Receiver",
        },
        [HPG_WINTV_NTSC_MN] = {
-               .Interface     = -1,
-               .Codec         = CODEC_SAA7111,
-               .VideoChannels = 3,
-               .VideoNorm     = V4L2_STD_NTSC,
-               .AudioChannels = 1,
-               .Radio         = 0,
-               .vbi           = 1,
-               .Tuner         = 1,
-               .TunerType     = TUNER_PHILIPS_NTSC_M,
-               .X_Offset      = -1,
-               .Y_Offset      = 20,
-               .ModelString   = "Hauppauge WinTV USB (NTSC M/N)",
+               .interface      = -1,
+               .codec          = CODEC_SAA7111,
+               .video_channels = 3,
+               .video_norm     = V4L2_STD_NTSC,
+               .audio_channels = 1,
+               .radio          = 0,
+               .vbi            = 1,
+               .tuner          = 1,
+               .tuner_type     = TUNER_PHILIPS_NTSC_M,
+               .x_offset       = -1,
+               .y_offset       = 20,
+               .model_string   = "Hauppauge WinTV USB (NTSC M/N)",
        },
        [HPG_WINTV_PAL_BG] = {
-               .Interface     = -1,
-               .Codec         = CODEC_SAA7111,
-               .VideoChannels = 3,
-               .VideoNorm     = V4L2_STD_PAL,
-               .AudioChannels = 1,
-               .Radio         = 0,
-               .vbi           = 1,
-               .Tuner         = 1,
-               .TunerType     = TUNER_PHILIPS_PAL,
-               .X_Offset      = -1,
-               .Y_Offset      = -1,
-               .ModelString   = "Hauppauge WinTV USB (PAL B/G)",
+               .interface      = -1,
+               .codec          = CODEC_SAA7111,
+               .video_channels = 3,
+               .video_norm     = V4L2_STD_PAL,
+               .audio_channels = 1,
+               .radio          = 0,
+               .vbi            = 1,
+               .tuner          = 1,
+               .tuner_type     = TUNER_PHILIPS_PAL,
+               .x_offset       = -1,
+               .y_offset       = -1,
+               .model_string   = "Hauppauge WinTV USB (PAL B/G)",
        },
        [HPG_WINTV_PAL_I] = {
-               .Interface     = -1,
-               .Codec         = CODEC_SAA7111,
-               .VideoChannels = 3,
-               .VideoNorm     = V4L2_STD_PAL,
-               .AudioChannels = 1,
-               .Radio         = 0,
-               .vbi           = 1,
-               .Tuner         = 1,
-               .TunerType     = TUNER_PHILIPS_PAL,
-               .X_Offset      = -1,
-               .Y_Offset      = -1,
-               .ModelString   = "Hauppauge WinTV USB (PAL I)",
+               .interface      = -1,
+               .codec          = CODEC_SAA7111,
+               .video_channels = 3,
+               .video_norm     = V4L2_STD_PAL,
+               .audio_channels = 1,
+               .radio          = 0,
+               .vbi            = 1,
+               .tuner          = 1,
+               .tuner_type     = TUNER_PHILIPS_PAL,
+               .x_offset       = -1,
+               .y_offset       = -1,
+               .model_string   = "Hauppauge WinTV USB (PAL I)",
        },
        [HPG_WINTV_PAL_SECAM_L] = {
-               .Interface     = -1,
-               .Codec         = CODEC_SAA7111,
-               .VideoChannels = 3,
-               .VideoNorm     = V4L2_STD_SECAM,
-               .AudioChannels = 1,
-               .Radio         = 0,
-               .vbi           = 1,
-               .Tuner         = 1,
-               .TunerType     = TUNER_PHILIPS_SECAM,
-               .X_Offset      = 0x80,
-               .Y_Offset      = 0x16,
-               .ModelString   = "Hauppauge WinTV USB (PAL/SECAM L)",
+               .interface      = -1,
+               .codec          = CODEC_SAA7111,
+               .video_channels = 3,
+               .video_norm     = V4L2_STD_SECAM,
+               .audio_channels = 1,
+               .radio          = 0,
+               .vbi            = 1,
+               .tuner          = 1,
+               .tuner_type     = TUNER_PHILIPS_SECAM,
+               .x_offset       = 0x80,
+               .y_offset       = 0x16,
+               .model_string   = "Hauppauge WinTV USB (PAL/SECAM L)",
        },
        [HPG_WINTV_PAL_D_K] = {
-               .Interface     = -1,
-               .Codec         = CODEC_SAA7111,
-               .VideoChannels = 3,
-               .VideoNorm     = V4L2_STD_PAL,
-               .AudioChannels = 1,
-               .Radio         = 0,
-               .vbi           = 1,
-               .Tuner         = 1,
-               .TunerType     = TUNER_PHILIPS_PAL,
-               .X_Offset      = -1,
-               .Y_Offset      = -1,
-               .ModelString   = "Hauppauge WinTV USB (PAL D/K)",
+               .interface      = -1,
+               .codec          = CODEC_SAA7111,
+               .video_channels = 3,
+               .video_norm     = V4L2_STD_PAL,
+               .audio_channels = 1,
+               .radio          = 0,
+               .vbi            = 1,
+               .tuner          = 1,
+               .tuner_type     = TUNER_PHILIPS_PAL,
+               .x_offset       = -1,
+               .y_offset       = -1,
+               .model_string   = "Hauppauge WinTV USB (PAL D/K)",
        },
        [HPG_WINTV_NTSC_FM] = {
-               .Interface     = -1,
-               .Codec         = CODEC_SAA7111,
-               .VideoChannels = 3,
-               .VideoNorm     = V4L2_STD_NTSC,
-               .AudioChannels = 1,
-               .Radio         = 1,
-               .vbi           = 1,
-               .Tuner         = 1,
-               .TunerType     = TUNER_PHILIPS_NTSC_M,
-               .X_Offset      = -1,
-               .Y_Offset      = -1,
-               .ModelString   = "Hauppauge WinTV USB (NTSC FM)",
+               .interface      = -1,
+               .codec          = CODEC_SAA7111,
+               .video_channels = 3,
+               .video_norm     = V4L2_STD_NTSC,
+               .audio_channels = 1,
+               .radio          = 1,
+               .vbi            = 1,
+               .tuner          = 1,
+               .tuner_type     = TUNER_PHILIPS_NTSC_M,
+               .x_offset       = -1,
+               .y_offset       = -1,
+               .model_string   = "Hauppauge WinTV USB (NTSC FM)",
        },
        [HPG_WINTV_PAL_BG_FM] = {
-               .Interface     = -1,
-               .Codec         = CODEC_SAA7111,
-               .VideoChannels = 3,
-               .VideoNorm     = V4L2_STD_PAL,
-               .AudioChannels = 1,
-               .Radio         = 1,
-               .vbi           = 1,
-               .Tuner         = 1,
-               .TunerType     = TUNER_PHILIPS_PAL,
-               .X_Offset      = -1,
-               .Y_Offset      = -1,
-               .ModelString   = "Hauppauge WinTV USB (PAL B/G FM)",
+               .interface      = -1,
+               .codec          = CODEC_SAA7111,
+               .video_channels = 3,
+               .video_norm     = V4L2_STD_PAL,
+               .audio_channels = 1,
+               .radio          = 1,
+               .vbi            = 1,
+               .tuner          = 1,
+               .tuner_type     = TUNER_PHILIPS_PAL,
+               .x_offset       = -1,
+               .y_offset       = -1,
+               .model_string   = "Hauppauge WinTV USB (PAL B/G FM)",
        },
        [HPG_WINTV_PAL_I_FM] = {
-               .Interface     = -1,
-               .Codec         = CODEC_SAA7111,
-               .VideoChannels = 3,
-               .VideoNorm     = V4L2_STD_PAL,
-               .AudioChannels = 1,
-               .Radio         = 1,
-               .vbi           = 1,
-               .Tuner         = 1,
-               .TunerType     = TUNER_PHILIPS_PAL,
-               .X_Offset      = -1,
-               .Y_Offset      = -1,
-               .ModelString   = "Hauppauge WinTV USB (PAL I FM)",
+               .interface      = -1,
+               .codec          = CODEC_SAA7111,
+               .video_channels = 3,
+               .video_norm     = V4L2_STD_PAL,
+               .audio_channels = 1,
+               .radio          = 1,
+               .vbi            = 1,
+               .tuner          = 1,
+               .tuner_type     = TUNER_PHILIPS_PAL,
+               .x_offset       = -1,
+               .y_offset       = -1,
+               .model_string   = "Hauppauge WinTV USB (PAL I FM)",
        },
        [HPG_WINTV_PAL_D_K_FM] = {
-               .Interface     = -1,
-               .Codec         = CODEC_SAA7111,
-               .VideoChannels = 3,
-               .VideoNorm     = V4L2_STD_PAL,
-               .AudioChannels = 1,
-               .Radio         = 1,
-               .vbi           = 1,
-               .Tuner         = 1,
-               .TunerType     = TUNER_PHILIPS_PAL,
-               .X_Offset      = -1,
-               .Y_Offset      = -1,
-               .ModelString   = "Hauppauge WinTV USB (PAL D/K FM)",
+               .interface      = -1,
+               .codec          = CODEC_SAA7111,
+               .video_channels = 3,
+               .video_norm     = V4L2_STD_PAL,
+               .audio_channels = 1,
+               .radio          = 1,
+               .vbi            = 1,
+               .tuner          = 1,
+               .tuner_type     = TUNER_PHILIPS_PAL,
+               .x_offset       = -1,
+               .y_offset       = -1,
+               .model_string   = "Hauppauge WinTV USB (PAL D/K FM)",
        },
        [HPG_WINTV_PRO_NTSC_MN] = {
-               .Interface     = 0,
-               .Codec         = CODEC_SAA7113,
-               .VideoChannels = 3,
-               .VideoNorm     = V4L2_STD_NTSC,
-               .AudioChannels = 1,
-               .Radio         = 1,
-               .vbi           = 1,
-               .Tuner         = 1,
-               .TunerType     = TUNER_MICROTUNE_4049FM5,
-               .X_Offset      = 0,
-               .Y_Offset      = 3,
-               .Dvi_yuv_override = 1,
-               .Dvi_yuv       = 7,
-               .ModelString   = "Hauppauge WinTV USB Pro (NTSC M/N)",
+               .interface      = 0,
+               .codec          = CODEC_SAA7113,
+               .video_channels = 3,
+               .video_norm     = V4L2_STD_NTSC,
+               .audio_channels = 1,
+               .radio          = 1,
+               .vbi            = 1,
+               .tuner          = 1,
+               .tuner_type     = TUNER_MICROTUNE_4049FM5,
+               .x_offset       = 0,
+               .y_offset       = 3,
+               .dvi_yuv_override = 1,
+               .dvi_yuv        = 7,
+               .model_string   = "Hauppauge WinTV USB Pro (NTSC M/N)",
        },
        [HPG_WINTV_PRO_NTSC_MN_V2] = {
-               .Interface     = 0,
-               .Codec         = CODEC_SAA7113,
-               .VideoChannels = 3,
-               .VideoNorm     = V4L2_STD_NTSC,
-               .AudioChannels = 1,
-               .Radio         = 1,
-               .vbi           = 1,
-               .Tuner         = 1,
-               .TunerType     = TUNER_MICROTUNE_4049FM5,
-               .X_Offset      = 0,
-               .Y_Offset      = 3,
-               .Dvi_yuv_override = 1,
-               .Dvi_yuv       = 7,
-               .ModelString   = "Hauppauge WinTV USB Pro (NTSC M/N) V2",
+               .interface      = 0,
+               .codec          = CODEC_SAA7113,
+               .video_channels = 3,
+               .video_norm     = V4L2_STD_NTSC,
+               .audio_channels = 1,
+               .radio          = 1,
+               .vbi            = 1,
+               .tuner          = 1,
+               .tuner_type     = TUNER_MICROTUNE_4049FM5,
+               .x_offset       = 0,
+               .y_offset       = 3,
+               .dvi_yuv_override = 1,
+               .dvi_yuv        = 7,
+               .model_string   = "Hauppauge WinTV USB Pro (NTSC M/N) V2",
        },
        [HPG_WINTV_PRO_PAL] = {
-               .Interface     = 0,
-               .Codec         = CODEC_SAA7113,
-               .VideoChannels = 3,
-               .VideoNorm     = V4L2_STD_PAL,
-               .AudioChannels = 1,
-               .Radio         = 0,
-               .vbi           = 1,
-               .Tuner         = 1,
-               .TunerType     = TUNER_PHILIPS_FM1216ME_MK3,
-               .X_Offset      = 0,
-               .Y_Offset      = 3,
-               .Dvi_yuv_override = 1,
-               .Dvi_yuv       = 7,
-               .ModelString   = "Hauppauge WinTV USB Pro (PAL/SECAM B/G/I/D/K/L)",
+               .interface      = 0,
+               .codec          = CODEC_SAA7113,
+               .video_channels = 3,
+               .video_norm     = V4L2_STD_PAL,
+               .audio_channels = 1,
+               .radio          = 0,
+               .vbi            = 1,
+               .tuner          = 1,
+               .tuner_type     = TUNER_PHILIPS_FM1216ME_MK3,
+               .x_offset       = 0,
+               .y_offset       = 3,
+               .dvi_yuv_override = 1,
+               .dvi_yuv        = 7,
+               .model_string   = "Hauppauge WinTV USB Pro (PAL/SECAM B/G/I/D/K/L)",
        },
        [HPG_WINTV_PRO_NTSC_MN_V3] = {
-               .Interface     = 0,
-               .Codec         = CODEC_SAA7113,
-               .VideoChannels = 3,
-               .VideoNorm     = V4L2_STD_NTSC,
-               .AudioChannels = 1,
-               .Radio         = 1,
-               .vbi           = 1,
-               .Tuner         = 1,
-               .TunerType     = TUNER_PHILIPS_NTSC_M,
-               .X_Offset      = 0,
-               .Y_Offset      = 3,
-               .Dvi_yuv_override = 1,
-               .Dvi_yuv       = 7,
-               .ModelString   = "Hauppauge WinTV USB Pro (NTSC M/N) V3",
+               .interface      = 0,
+               .codec          = CODEC_SAA7113,
+               .video_channels = 3,
+               .video_norm     = V4L2_STD_NTSC,
+               .audio_channels = 1,
+               .radio          = 1,
+               .vbi            = 1,
+               .tuner          = 1,
+               .tuner_type     = TUNER_PHILIPS_NTSC_M,
+               .x_offset       = 0,
+               .y_offset       = 3,
+               .dvi_yuv_override = 1,
+               .dvi_yuv        = 7,
+               .model_string   = "Hauppauge WinTV USB Pro (NTSC M/N) V3",
        },
        [HPG_WINTV_PRO_PAL_BG] = {
-               .Interface     = 0,
-               .Codec         = CODEC_SAA7113,
-               .VideoChannels = 3,
-               .VideoNorm     = V4L2_STD_PAL,
-               .AudioChannels = 1,
-               .Radio         = 0,
-               .vbi           = 1,
-               .Tuner         = 1,
-               .TunerType     = TUNER_PHILIPS_PAL,
-               .X_Offset      = 0,
-               .Y_Offset      = 3,
-               .Dvi_yuv_override = 1,
-               .Dvi_yuv       = 7,
-               .ModelString   = "Hauppauge WinTV USB Pro (PAL B/G)",
+               .interface      = 0,
+               .codec          = CODEC_SAA7113,
+               .video_channels = 3,
+               .video_norm     = V4L2_STD_PAL,
+               .audio_channels = 1,
+               .radio          = 0,
+               .vbi            = 1,
+               .tuner          = 1,
+               .tuner_type     = TUNER_PHILIPS_PAL,
+               .x_offset       = 0,
+               .y_offset       = 3,
+               .dvi_yuv_override = 1,
+               .dvi_yuv        = 7,
+               .model_string   = "Hauppauge WinTV USB Pro (PAL B/G)",
        },
        [HPG_WINTV_PRO_PAL_I] = {
-               .Interface     = 0,
-               .Codec         = CODEC_SAA7113,
-               .VideoChannels = 3,
-               .VideoNorm     = V4L2_STD_PAL,
-               .AudioChannels = 1,
-               .Radio         = 0,
-               .vbi           = 1,
-               .Tuner         = 1,
-               .TunerType     = TUNER_PHILIPS_PAL,
-               .X_Offset      = 0,
-               .Y_Offset      = 3,
-               .Dvi_yuv_override = 1,
-               .Dvi_yuv       = 7,
-               .ModelString   = "Hauppauge WinTV USB Pro (PAL I)",
+               .interface      = 0,
+               .codec          = CODEC_SAA7113,
+               .video_channels = 3,
+               .video_norm     = V4L2_STD_PAL,
+               .audio_channels = 1,
+               .radio          = 0,
+               .vbi            = 1,
+               .tuner          = 1,
+               .tuner_type     = TUNER_PHILIPS_PAL,
+               .x_offset       = 0,
+               .y_offset       = 3,
+               .dvi_yuv_override = 1,
+               .dvi_yuv        = 7,
+               .model_string   = "Hauppauge WinTV USB Pro (PAL I)",
        },
        [HPG_WINTV_PRO_PAL_SECAM_L] = {
-               .Interface     = -1,
-               .Codec         = CODEC_SAA7113,
-               .VideoChannels = 3,
-               .VideoNorm     = V4L2_STD_SECAM,
-               .AudioChannels = 1,
-               .Radio         = 0,
-               .vbi           = 1,
-               .Tuner         = 1,
-               .TunerType     = TUNER_PHILIPS_SECAM,
-               .X_Offset      = 0,
-               .Y_Offset      = 3,
-               .Dvi_yuv_override = 1,
-               .Dvi_yuv       = 7,
-               .ModelString   = "Hauppauge WinTV USB Pro (PAL/SECAM L)",
+               .interface      = -1,
+               .codec          = CODEC_SAA7113,
+               .video_channels = 3,
+               .video_norm     = V4L2_STD_SECAM,
+               .audio_channels = 1,
+               .radio          = 0,
+               .vbi            = 1,
+               .tuner          = 1,
+               .tuner_type     = TUNER_PHILIPS_SECAM,
+               .x_offset       = 0,
+               .y_offset       = 3,
+               .dvi_yuv_override = 1,
+               .dvi_yuv        = 7,
+               .model_string   = "Hauppauge WinTV USB Pro (PAL/SECAM L)",
        },
        [HPG_WINTV_PRO_PAL_D_K] = {
-               .Interface     = -1,
-               .Codec         = CODEC_SAA7113,
-               .VideoChannels = 3,
-               .VideoNorm     = V4L2_STD_PAL,
-               .AudioChannels = 1,
-               .Radio         = 0,
-               .vbi           = 1,
-               .Tuner         = 1,
-               .TunerType     = TUNER_PHILIPS_PAL,
-               .X_Offset      = 0,
-               .Y_Offset      = 3,
-               .Dvi_yuv_override = 1,
-               .Dvi_yuv       = 7,
-               .ModelString   = "Hauppauge WinTV USB Pro (PAL D/K)",
+               .interface      = -1,
+               .codec          = CODEC_SAA7113,
+               .video_channels = 3,
+               .video_norm     = V4L2_STD_PAL,
+               .audio_channels = 1,
+               .radio          = 0,
+               .vbi            = 1,
+               .tuner          = 1,
+               .tuner_type     = TUNER_PHILIPS_PAL,
+               .x_offset       = 0,
+               .y_offset       = 3,
+               .dvi_yuv_override = 1,
+               .dvi_yuv        = 7,
+               .model_string   = "Hauppauge WinTV USB Pro (PAL D/K)",
        },
        [HPG_WINTV_PRO_PAL_SECAM] = {
-               .Interface     = -1,
-               .Codec         = CODEC_SAA7113,
-               .VideoChannels = 3,
-               .VideoNorm     = V4L2_STD_SECAM,
-               .AudioChannels = 1,
-               .Radio         = 0,
-               .vbi           = 1,
-               .Tuner         = 1,
-               .TunerType     = TUNER_PHILIPS_SECAM,
-               .X_Offset      = 0,
-               .Y_Offset      = 3,
-               .Dvi_yuv_override = 1,
-               .Dvi_yuv       = 7,
-               .ModelString   = "Hauppauge WinTV USB Pro (PAL/SECAM BGDK/I/L)",
+               .interface      = -1,
+               .codec          = CODEC_SAA7113,
+               .video_channels = 3,
+               .video_norm     = V4L2_STD_SECAM,
+               .audio_channels = 1,
+               .radio          = 0,
+               .vbi            = 1,
+               .tuner          = 1,
+               .tuner_type     = TUNER_PHILIPS_SECAM,
+               .x_offset       = 0,
+               .y_offset       = 3,
+               .dvi_yuv_override = 1,
+               .dvi_yuv        = 7,
+               .model_string   = "Hauppauge WinTV USB Pro (PAL/SECAM BGDK/I/L)",
        },
        [HPG_WINTV_PRO_PAL_SECAM_V2] = {
-               .Interface     = -1,
-               .Codec         = CODEC_SAA7113,
-               .VideoChannels = 3,
-               .VideoNorm     = V4L2_STD_SECAM,
-               .AudioChannels = 1,
-               .Radio         = 0,
-               .vbi           = 1,
-               .Tuner         = 1,
-               .TunerType     = TUNER_PHILIPS_SECAM,
-               .X_Offset      = 0,
-               .Y_Offset      = 3,
-               .Dvi_yuv_override = 1,
-               .Dvi_yuv       = 7,
-               .ModelString   = "Hauppauge WinTV USB Pro (PAL/SECAM BGDK/I/L) V2",
+               .interface      = -1,
+               .codec          = CODEC_SAA7113,
+               .video_channels = 3,
+               .video_norm     = V4L2_STD_SECAM,
+               .audio_channels = 1,
+               .radio          = 0,
+               .vbi            = 1,
+               .tuner          = 1,
+               .tuner_type     = TUNER_PHILIPS_SECAM,
+               .x_offset       = 0,
+               .y_offset       = 3,
+               .dvi_yuv_override = 1,
+               .dvi_yuv        = 7,
+               .model_string   = "Hauppauge WinTV USB Pro (PAL/SECAM BGDK/I/L) V2",
        },
        [HPG_WINTV_PRO_PAL_BG_V2] = {
-               .Interface     = -1,
-               .Codec         = CODEC_SAA7113,
-               .VideoChannels = 3,
-               .VideoNorm     = V4L2_STD_PAL,
-               .AudioChannels = 1,
-               .Radio         = 0,
-               .vbi           = 1,
-               .Tuner         = 1,
-               .TunerType     = TUNER_ALPS_TSBE1_PAL,
-               .X_Offset      = 0,
-               .Y_Offset      = 3,
-               .Dvi_yuv_override = 1,
-               .Dvi_yuv       = 7,
-               .ModelString   = "Hauppauge WinTV USB Pro (PAL B/G) V2",
+               .interface      = -1,
+               .codec          = CODEC_SAA7113,
+               .video_channels = 3,
+               .video_norm     = V4L2_STD_PAL,
+               .audio_channels = 1,
+               .radio          = 0,
+               .vbi            = 1,
+               .tuner          = 1,
+               .tuner_type     = TUNER_ALPS_TSBE1_PAL,
+               .x_offset       = 0,
+               .y_offset       = 3,
+               .dvi_yuv_override = 1,
+               .dvi_yuv        = 7,
+               .model_string   = "Hauppauge WinTV USB Pro (PAL B/G) V2",
        },
        [HPG_WINTV_PRO_PAL_BG_D_K] = {
-               .Interface     = -1,
-               .Codec         = CODEC_SAA7113,
-               .VideoChannels = 3,
-               .VideoNorm     = V4L2_STD_PAL,
-               .AudioChannels = 1,
-               .Radio         = 0,
-               .vbi           = 1,
-               .Tuner         = 1,
-               .TunerType     = TUNER_ALPS_TSBE1_PAL,
-               .X_Offset      = 0,
-               .Y_Offset      = 3,
-               .Dvi_yuv_override = 1,
-               .Dvi_yuv       = 7,
-               .ModelString   = "Hauppauge WinTV USB Pro (PAL B/G,D/K)",
+               .interface      = -1,
+               .codec          = CODEC_SAA7113,
+               .video_channels = 3,
+               .video_norm     = V4L2_STD_PAL,
+               .audio_channels = 1,
+               .radio          = 0,
+               .vbi            = 1,
+               .tuner          = 1,
+               .tuner_type     = TUNER_ALPS_TSBE1_PAL,
+               .x_offset       = 0,
+               .y_offset       = 3,
+               .dvi_yuv_override = 1,
+               .dvi_yuv        = 7,
+               .model_string   = "Hauppauge WinTV USB Pro (PAL B/G,D/K)",
        },
        [HPG_WINTV_PRO_PAL_I_D_K] = {
-               .Interface     = -1,
-               .Codec         = CODEC_SAA7113,
-               .VideoChannels = 3,
-               .VideoNorm     = V4L2_STD_PAL,
-               .AudioChannels = 1,
-               .Radio         = 0,
-               .vbi           = 1,
-               .Tuner         = 1,
-               .TunerType     = TUNER_LG_PAL_NEW_TAPC,
-               .X_Offset      = 0,
-               .Y_Offset      = 3,
-               .Dvi_yuv_override = 1,
-               .Dvi_yuv       = 7,
-               .ModelString   = "Hauppauge WinTV USB Pro (PAL I,D/K)",
+               .interface      = -1,
+               .codec          = CODEC_SAA7113,
+               .video_channels = 3,
+               .video_norm     = V4L2_STD_PAL,
+               .audio_channels = 1,
+               .radio          = 0,
+               .vbi            = 1,
+               .tuner          = 1,
+               .tuner_type     = TUNER_LG_PAL_NEW_TAPC,
+               .x_offset       = 0,
+               .y_offset       = 3,
+               .dvi_yuv_override = 1,
+               .dvi_yuv        = 7,
+               .model_string   = "Hauppauge WinTV USB Pro (PAL I,D/K)",
        },
        [HPG_WINTV_PRO_NTSC_MN_FM] = {
-               .Interface     = -1,
-               .Codec         = CODEC_SAA7113,
-               .VideoChannels = 3,
-               .VideoNorm     = V4L2_STD_NTSC,
-               .AudioChannels = 1,
-               .Radio         = 1,
-               .vbi           = 1,
-               .Tuner         = 1,
-               .TunerType     = TUNER_PHILIPS_NTSC_M,
-               .X_Offset      = 0,
-               .Y_Offset      = 3,
-               .Dvi_yuv_override = 1,
-               .Dvi_yuv       = 7,
-               .ModelString   = "Hauppauge WinTV USB Pro (NTSC M/N FM)",
+               .interface      = -1,
+               .codec          = CODEC_SAA7113,
+               .video_channels = 3,
+               .video_norm     = V4L2_STD_NTSC,
+               .audio_channels = 1,
+               .radio          = 1,
+               .vbi            = 1,
+               .tuner          = 1,
+               .tuner_type     = TUNER_PHILIPS_NTSC_M,
+               .x_offset       = 0,
+               .y_offset       = 3,
+               .dvi_yuv_override = 1,
+               .dvi_yuv        = 7,
+               .model_string   = "Hauppauge WinTV USB Pro (NTSC M/N FM)",
        },
        [HPG_WINTV_PRO_PAL_BG_FM] = {
-               .Interface     = 0,
-               .Codec         = CODEC_SAA7113,
-               .VideoChannels = 3,
-               .VideoNorm     = V4L2_STD_PAL,
-               .AudioChannels = 1,
-               .Radio         = 1,
-               .vbi           = 1,
-               .Tuner         = 1,
-               .TunerType     = TUNER_PHILIPS_PAL,
-               .X_Offset      = 0,
-               .Y_Offset      = 3,
-               .Dvi_yuv_override = 1,
-               .Dvi_yuv       = 7,
-               .ModelString   = "Hauppauge WinTV USB Pro (PAL B/G FM)",
+               .interface      = 0,
+               .codec          = CODEC_SAA7113,
+               .video_channels = 3,
+               .video_norm     = V4L2_STD_PAL,
+               .audio_channels = 1,
+               .radio          = 1,
+               .vbi            = 1,
+               .tuner          = 1,
+               .tuner_type     = TUNER_PHILIPS_PAL,
+               .x_offset       = 0,
+               .y_offset       = 3,
+               .dvi_yuv_override = 1,
+               .dvi_yuv        = 7,
+               .model_string   = "Hauppauge WinTV USB Pro (PAL B/G FM)",
        },
        [HPG_WINTV_PRO_PAL_I_FM] = {
-               .Interface     = 0,
-               .Codec         = CODEC_SAA7113,
-               .VideoChannels = 3,
-               .VideoNorm     = V4L2_STD_PAL,
-               .AudioChannels = 1,
-               .Radio         = 1,
-               .vbi           = 1,
-               .Tuner         = 1,
-               .TunerType     = TUNER_PHILIPS_PAL,
-               .X_Offset      = 0,
-               .Y_Offset      = 3,
-               .Dvi_yuv_override = 1,
-               .Dvi_yuv       = 7,
-               .ModelString   = "Hauppauge WinTV USB Pro (PAL I FM)",
+               .interface      = 0,
+               .codec          = CODEC_SAA7113,
+               .video_channels = 3,
+               .video_norm     = V4L2_STD_PAL,
+               .audio_channels = 1,
+               .radio          = 1,
+               .vbi            = 1,
+               .tuner          = 1,
+               .tuner_type     = TUNER_PHILIPS_PAL,
+               .x_offset       = 0,
+               .y_offset       = 3,
+               .dvi_yuv_override = 1,
+               .dvi_yuv        = 7,
+               .model_string   = "Hauppauge WinTV USB Pro (PAL I FM)",
        },
        [HPG_WINTV_PRO_PAL_D_K_FM] = {
-               .Interface     = 0,
-               .Codec         = CODEC_SAA7113,
-               .VideoChannels = 3,
-               .VideoNorm     = V4L2_STD_PAL,
-               .AudioChannels = 1,
-               .Radio         = 1,
-               .vbi           = 1,
-               .Tuner         = 1,
-               .TunerType     = TUNER_PHILIPS_PAL,
-               .X_Offset      = 0,
-               .Y_Offset      = 3,
-               .Dvi_yuv_override = 1,
-               .Dvi_yuv       = 7,
-               .ModelString   = "Hauppauge WinTV USB Pro (PAL D/K FM)",
+               .interface      = 0,
+               .codec          = CODEC_SAA7113,
+               .video_channels = 3,
+               .video_norm     = V4L2_STD_PAL,
+               .audio_channels = 1,
+               .radio          = 1,
+               .vbi            = 1,
+               .tuner          = 1,
+               .tuner_type     = TUNER_PHILIPS_PAL,
+               .x_offset       = 0,
+               .y_offset       = 3,
+               .dvi_yuv_override = 1,
+               .dvi_yuv        = 7,
+               .model_string   = "Hauppauge WinTV USB Pro (PAL D/K FM)",
        },
        [HPG_WINTV_PRO_TEMIC_PAL_FM] = {
-               .Interface     = 0,
-               .Codec         = CODEC_SAA7113,
-               .VideoChannels = 3,
-               .VideoNorm     = V4L2_STD_PAL,
-               .AudioChannels = 1,
-               .Radio         = 1,
-               .vbi           = 1,
-               .Tuner         = 1,
-               .TunerType     = TUNER_MICROTUNE_4049FM5,
-               .X_Offset      = 0,
-               .Y_Offset      = 3,
-               .Dvi_yuv_override = 1,
-               .Dvi_yuv       = 7,
-               .ModelString   = "Hauppauge WinTV USB Pro (Temic PAL/SECAM B/G/I/D/K/L FM)",
+               .interface      = 0,
+               .codec          = CODEC_SAA7113,
+               .video_channels = 3,
+               .video_norm     = V4L2_STD_PAL,
+               .audio_channels = 1,
+               .radio          = 1,
+               .vbi            = 1,
+               .tuner          = 1,
+               .tuner_type     = TUNER_MICROTUNE_4049FM5,
+               .x_offset       = 0,
+               .y_offset       = 3,
+               .dvi_yuv_override = 1,
+               .dvi_yuv        = 7,
+               .model_string   = "Hauppauge WinTV USB Pro (Temic PAL/SECAM B/G/I/D/K/L FM)",
        },
        [HPG_WINTV_PRO_TEMIC_PAL_BG_FM] = {
-               .Interface     = 0,
-               .Codec         = CODEC_SAA7113,
-               .VideoChannels = 3,
-               .VideoNorm     = V4L2_STD_PAL,
-               .AudioChannels = 1,
-               .Radio         = 1,
-               .vbi           = 1,
-               .Tuner         = 1,
-               .TunerType     = TUNER_MICROTUNE_4049FM5,
-               .X_Offset      = 0,
-               .Y_Offset      = 3,
-               .Dvi_yuv_override = 1,
-               .Dvi_yuv       = 7,
-               .ModelString   = "Hauppauge WinTV USB Pro (Temic PAL B/G FM)",
+               .interface      = 0,
+               .codec          = CODEC_SAA7113,
+               .video_channels = 3,
+               .video_norm     = V4L2_STD_PAL,
+               .audio_channels = 1,
+               .radio          = 1,
+               .vbi            = 1,
+               .tuner          = 1,
+               .tuner_type     = TUNER_MICROTUNE_4049FM5,
+               .x_offset       = 0,
+               .y_offset       = 3,
+               .dvi_yuv_override = 1,
+               .dvi_yuv        = 7,
+               .model_string   = "Hauppauge WinTV USB Pro (Temic PAL B/G FM)",
        },
        [HPG_WINTV_PRO_PAL_FM] = {
-               .Interface     = 0,
-               .Codec         = CODEC_SAA7113,
-               .VideoChannels = 3,
-               .VideoNorm     = V4L2_STD_PAL,
-               .AudioChannels = 1,
-               .Radio         = 1,
-               .vbi           = 1,
-               .Tuner         = 1,
-               .TunerType     = TUNER_PHILIPS_FM1216ME_MK3,
-               .X_Offset      = 0,
-               .Y_Offset      = 3,
-               .Dvi_yuv_override = 1,
-               .Dvi_yuv       = 7,
-               .ModelString   = "Hauppauge WinTV USB Pro (PAL/SECAM B/G/I/D/K/L FM)",
+               .interface      = 0,
+               .codec          = CODEC_SAA7113,
+               .video_channels = 3,
+               .video_norm     = V4L2_STD_PAL,
+               .audio_channels = 1,
+               .radio          = 1,
+               .vbi            = 1,
+               .tuner          = 1,
+               .tuner_type     = TUNER_PHILIPS_FM1216ME_MK3,
+               .x_offset       = 0,
+               .y_offset       = 3,
+               .dvi_yuv_override = 1,
+               .dvi_yuv        = 7,
+               .model_string   = "Hauppauge WinTV USB Pro (PAL/SECAM B/G/I/D/K/L FM)",
        },
        [HPG_WINTV_PRO_NTSC_MN_FM_V2] = {
-               .Interface     = 0,
-               .Codec         = CODEC_SAA7113,
-               .VideoChannels = 3,
-               .VideoNorm     = V4L2_STD_NTSC,
-               .AudioChannels = 1,
-               .Radio         = 1,
-               .vbi           = 1,
-               .Tuner         = 1,
-               .TunerType     = TUNER_PHILIPS_NTSC_M,
-               .X_Offset      = 0,
-               .Y_Offset      = 3,
-               .Dvi_yuv_override = 1,
-               .Dvi_yuv       = 7,
-               .ModelString   = "Hauppauge WinTV USB Pro (NTSC M/N FM) V2",
+               .interface      = 0,
+               .codec          = CODEC_SAA7113,
+               .video_channels = 3,
+               .video_norm     = V4L2_STD_NTSC,
+               .audio_channels = 1,
+               .radio          = 1,
+               .vbi            = 1,
+               .tuner          = 1,
+               .tuner_type     = TUNER_PHILIPS_NTSC_M,
+               .x_offset       = 0,
+               .y_offset       = 3,
+               .dvi_yuv_override = 1,
+               .dvi_yuv        = 7,
+               .model_string   = "Hauppauge WinTV USB Pro (NTSC M/N FM) V2",
        },
        [CAMTEL_TVB330] = {
-               .Interface     = -1,
-               .Codec         = CODEC_SAA7113,
-               .VideoChannels = 3,
-               .VideoNorm     = V4L2_STD_NTSC,
-               .AudioChannels = 1,
-               .Radio         = 1,
-               .vbi           = 1,
-               .Tuner         = 1,
-               .TunerType     = TUNER_PHILIPS_NTSC_M,
-               .X_Offset      = 5,
-               .Y_Offset      = 5,
-               .ModelString   = "Camtel Technology USB TV Genie Pro FM Model TVB330",
+               .interface      = -1,
+               .codec          = CODEC_SAA7113,
+               .video_channels = 3,
+               .video_norm     = V4L2_STD_NTSC,
+               .audio_channels = 1,
+               .radio          = 1,
+               .vbi            = 1,
+               .tuner          = 1,
+               .tuner_type     = TUNER_PHILIPS_NTSC_M,
+               .x_offset       = 5,
+               .y_offset       = 5,
+               .model_string   = "Camtel Technology USB TV Genie Pro FM Model TVB330",
        },
        [DIGITAL_VIDEO_CREATOR_I] = {
-               .Interface     = -1,
-               .Codec         = CODEC_SAA7113,
-               .VideoChannels = 2,
-               .VideoNorm     = V4L2_STD_PAL,
-               .AudioChannels = 0,
-               .Radio         = 0,
-               .vbi           = 1,
-               .Tuner         = 0,
-               .TunerType     = 0,
-               .X_Offset      = 0,
-               .Y_Offset      = 3,
-               .Dvi_yuv_override = 1,
-               .Dvi_yuv       = 7,
-               .ModelString   = "Digital Video Creator I",
+               .interface      = -1,
+               .codec          = CODEC_SAA7113,
+               .video_channels = 2,
+               .video_norm     = V4L2_STD_PAL,
+               .audio_channels = 0,
+               .radio          = 0,
+               .vbi            = 1,
+               .tuner          = 0,
+               .tuner_type     = 0,
+               .x_offset       = 0,
+               .y_offset       = 3,
+               .dvi_yuv_override = 1,
+               .dvi_yuv        = 7,
+               .model_string   = "Digital Video Creator I",
        },
        [GLOBAL_VILLAGE_GV_007_NTSC] = {
-               .Interface     = -1,
-               .Codec         = CODEC_SAA7111,
-               .VideoChannels = 2,
-               .VideoNorm     = V4L2_STD_NTSC,
-               .AudioChannels = 0,
-               .Radio         = 0,
-               .vbi           = 1,
-               .Tuner         = 0,
-               .TunerType     = 0,
-               .X_Offset      = 82,
-               .Y_Offset      = 20,
-               .Dvi_yuv_override = 1,
-               .Dvi_yuv       = 7,
-               .ModelString   = "Global Village GV-007 (NTSC)",
+               .interface      = -1,
+               .codec          = CODEC_SAA7111,
+               .video_channels = 2,
+               .video_norm     = V4L2_STD_NTSC,
+               .audio_channels = 0,
+               .radio          = 0,
+               .vbi            = 1,
+               .tuner          = 0,
+               .tuner_type     = 0,
+               .x_offset       = 82,
+               .y_offset       = 20,
+               .dvi_yuv_override = 1,
+               .dvi_yuv        = 7,
+               .model_string   = "Global Village GV-007 (NTSC)",
        },
        [DAZZLE_DVC_50_REV_1_NTSC] = {
-               .Interface     = 0,
-               .Codec         = CODEC_SAA7113,
-               .VideoChannels = 2,
-               .VideoNorm     = V4L2_STD_NTSC,
-               .AudioChannels = 0,
-               .Radio         = 0,
-               .vbi           = 1,
-               .Tuner         = 0,
-               .TunerType     = 0,
-               .X_Offset      = 0,
-               .Y_Offset      = 3,
-               .Dvi_yuv_override = 1,
-               .Dvi_yuv       = 7,
-               .ModelString   = "Dazzle Fusion Model DVC-50 Rev 1 (NTSC)",
+               .interface      = 0,
+               .codec          = CODEC_SAA7113,
+               .video_channels = 2,
+               .video_norm     = V4L2_STD_NTSC,
+               .audio_channels = 0,
+               .radio          = 0,
+               .vbi            = 1,
+               .tuner          = 0,
+               .tuner_type     = 0,
+               .x_offset       = 0,
+               .y_offset       = 3,
+               .dvi_yuv_override = 1,
+               .dvi_yuv        = 7,
+               .model_string   = "Dazzle Fusion Model DVC-50 Rev 1 (NTSC)",
        },
        [DAZZLE_DVC_80_REV_1_PAL] = {
-               .Interface     = 0,
-               .Codec         = CODEC_SAA7113,
-               .VideoChannels = 2,
-               .VideoNorm     = V4L2_STD_PAL,
-               .AudioChannels = 0,
-               .Radio         = 0,
-               .vbi           = 1,
-               .Tuner         = 0,
-               .TunerType     = 0,
-               .X_Offset      = 0,
-               .Y_Offset      = 3,
-               .Dvi_yuv_override = 1,
-               .Dvi_yuv       = 7,
-               .ModelString   = "Dazzle Fusion Model DVC-80 Rev 1 (PAL)",
+               .interface      = 0,
+               .codec          = CODEC_SAA7113,
+               .video_channels = 2,
+               .video_norm     = V4L2_STD_PAL,
+               .audio_channels = 0,
+               .radio          = 0,
+               .vbi            = 1,
+               .tuner          = 0,
+               .tuner_type     = 0,
+               .x_offset       = 0,
+               .y_offset       = 3,
+               .dvi_yuv_override = 1,
+               .dvi_yuv        = 7,
+               .model_string   = "Dazzle Fusion Model DVC-80 Rev 1 (PAL)",
        },
        [DAZZLE_DVC_90_REV_1_SECAM] = {
-               .Interface     = 0,
-               .Codec         = CODEC_SAA7113,
-               .VideoChannels = 2,
-               .VideoNorm     = V4L2_STD_SECAM,
-               .AudioChannels = 0,
-               .Radio         = 0,
-               .vbi           = 1,
-               .Tuner         = 0,
-               .TunerType     = 0,
-               .X_Offset      = 0,
-               .Y_Offset      = 3,
-               .Dvi_yuv_override = 1,
-               .Dvi_yuv       = 7,
-               .ModelString   = "Dazzle Fusion Model DVC-90 Rev 1 (SECAM)",
+               .interface      = 0,
+               .codec          = CODEC_SAA7113,
+               .video_channels = 2,
+               .video_norm     = V4L2_STD_SECAM,
+               .audio_channels = 0,
+               .radio          = 0,
+               .vbi            = 1,
+               .tuner          = 0,
+               .tuner_type     = 0,
+               .x_offset       = 0,
+               .y_offset       = 3,
+               .dvi_yuv_override = 1,
+               .dvi_yuv        = 7,
+               .model_string   = "Dazzle Fusion Model DVC-90 Rev 1 (SECAM)",
        },
        [ESKAPE_LABS_MYTV2GO] = {
-               .Interface     = 0,
-               .Codec         = CODEC_SAA7113,
-               .VideoChannels = 2,
-               .VideoNorm     = V4L2_STD_PAL,
-               .AudioChannels = 1,
-               .Radio         = 1,
-               .vbi           = 1,
-               .Tuner         = 1,
-               .TunerType     = TUNER_PHILIPS_FM1216ME_MK3,
-               .X_Offset      = 0,
-               .Y_Offset      = 3,
-               .Dvi_yuv_override = 1,
-               .Dvi_yuv       = 7,
-               .ModelString   = "Eskape Labs MyTV2Go",
+               .interface      = 0,
+               .codec          = CODEC_SAA7113,
+               .video_channels = 2,
+               .video_norm     = V4L2_STD_PAL,
+               .audio_channels = 1,
+               .radio          = 1,
+               .vbi            = 1,
+               .tuner          = 1,
+               .tuner_type     = TUNER_PHILIPS_FM1216ME_MK3,
+               .x_offset       = 0,
+               .y_offset       = 3,
+               .dvi_yuv_override = 1,
+               .dvi_yuv        = 7,
+               .model_string   = "Eskape Labs MyTV2Go",
        },
        [PINNA_PCTV_USB_PAL] = {
-               .Interface     = -1,
-               .Codec         = CODEC_SAA7111,
-               .VideoChannels = 3,
-               .VideoNorm     = V4L2_STD_PAL,
-               .AudioChannels = 1,
-               .Radio         = 0,
-               .vbi           = 0,
-               .Tuner         = 1,
-               .TunerType     = TUNER_TEMIC_4066FY5_PAL_I,
-               .X_Offset      = -1,
-               .Y_Offset      = -1,
-               .ModelString   = "Pinnacle Studio PCTV USB (PAL)",
+               .interface      = -1,
+               .codec          = CODEC_SAA7111,
+               .video_channels = 3,
+               .video_norm     = V4L2_STD_PAL,
+               .audio_channels = 1,
+               .radio          = 0,
+               .vbi            = 0,
+               .tuner          = 1,
+               .tuner_type     = TUNER_TEMIC_4066FY5_PAL_I,
+               .x_offset       = -1,
+               .y_offset       = -1,
+               .model_string   = "Pinnacle Studio PCTV USB (PAL)",
        },
        [PINNA_PCTV_USB_SECAM] = {
-               .Interface     = -1,
-               .Codec         = CODEC_SAA7111,
-               .VideoChannels = 3,
-               .VideoNorm     = V4L2_STD_SECAM,
-               .AudioChannels = 1,
-               .Radio         = 0,
-               .vbi           = 1,
-               .Tuner         = 1,
-               .TunerType     = TUNER_PHILIPS_SECAM,
-               .X_Offset      = -1,
-               .Y_Offset      = -1,
-               .ModelString   = "Pinnacle Studio PCTV USB (SECAM)",
+               .interface      = -1,
+               .codec          = CODEC_SAA7111,
+               .video_channels = 3,
+               .video_norm     = V4L2_STD_SECAM,
+               .audio_channels = 1,
+               .radio          = 0,
+               .vbi            = 1,
+               .tuner          = 1,
+               .tuner_type     = TUNER_PHILIPS_SECAM,
+               .x_offset       = -1,
+               .y_offset       = -1,
+               .model_string   = "Pinnacle Studio PCTV USB (SECAM)",
        },
        [PINNA_PCTV_USB_PAL_FM] = {
-               .Interface     = -1,
-               .Codec         = CODEC_SAA7111,
-               .VideoChannels = 3,
-               .VideoNorm     = V4L2_STD_PAL,
-               .AudioChannels = 1,
-               .Radio         = 1,
-               .vbi           = 1,
-               .Tuner         = 1,
-               .TunerType     = TUNER_PHILIPS_PAL,
-               .X_Offset      = 128,
-               .Y_Offset      = 23,
-               .ModelString   = "Pinnacle Studio PCTV USB (PAL) FM",
+               .interface      = -1,
+               .codec          = CODEC_SAA7111,
+               .video_channels = 3,
+               .video_norm     = V4L2_STD_PAL,
+               .audio_channels = 1,
+               .radio          = 1,
+               .vbi            = 1,
+               .tuner          = 1,
+               .tuner_type     = TUNER_PHILIPS_PAL,
+               .x_offset       = 128,
+               .y_offset       = 23,
+               .model_string   = "Pinnacle Studio PCTV USB (PAL) FM",
        },
        [MIRO_PCTV_USB] = {
-               .Interface     = -1,
-               .Codec         = CODEC_SAA7111,
-               .VideoChannels = 3,
-               .VideoNorm     = V4L2_STD_PAL,
-               .AudioChannels = 1,
-               .Radio         = 0,
-               .vbi           = 1,
-               .Tuner         = 1,
-               .TunerType     = TUNER_PHILIPS_PAL,
-               .X_Offset      = -1,
-               .Y_Offset      = -1,
-               .ModelString   = "Miro PCTV USB",
+               .interface      = -1,
+               .codec          = CODEC_SAA7111,
+               .video_channels = 3,
+               .video_norm     = V4L2_STD_PAL,
+               .audio_channels = 1,
+               .radio          = 0,
+               .vbi            = 1,
+               .tuner          = 1,
+               .tuner_type     = TUNER_PHILIPS_PAL,
+               .x_offset       = -1,
+               .y_offset       = -1,
+               .model_string   = "Miro PCTV USB",
        },
        [PINNA_PCTV_USB_NTSC_FM] = {
-               .Interface     = -1,
-               .Codec         = CODEC_SAA7111,
-               .VideoChannels = 3,
-               .VideoNorm     = V4L2_STD_NTSC,
-               .AudioChannels = 1,
-               .Radio         = 1,
-               .vbi           = 1,
-               .Tuner         = 1,
-               .TunerType     = TUNER_PHILIPS_NTSC_M,
-               .X_Offset      = -1,
-               .Y_Offset      = -1,
-               .ModelString   = "Pinnacle Studio PCTV USB (NTSC) FM",
+               .interface      = -1,
+               .codec          = CODEC_SAA7111,
+               .video_channels = 3,
+               .video_norm     = V4L2_STD_NTSC,
+               .audio_channels = 1,
+               .radio          = 1,
+               .vbi            = 1,
+               .tuner          = 1,
+               .tuner_type     = TUNER_PHILIPS_NTSC_M,
+               .x_offset       = -1,
+               .y_offset       = -1,
+               .model_string   = "Pinnacle Studio PCTV USB (NTSC) FM",
        },
        [PINNA_PCTV_USB_NTSC_FM_V3] = {
-               .Interface     = -1,
-               .Codec         = CODEC_SAA7111,
-               .VideoChannels = 3,
-               .VideoNorm     = V4L2_STD_NTSC,
-               .AudioChannels = 1,
-               .Radio         = 1,
-               .vbi           = 1,
-               .Tuner         = 1,
-               .TunerType     = TUNER_PHILIPS_NTSC_M,
-               .X_Offset      = -1,
-               .Y_Offset      = -1,
-               .ModelString   = "Pinnacle Studio PCTV USB (NTSC) FM V3",
+               .interface      = -1,
+               .codec          = CODEC_SAA7111,
+               .video_channels = 3,
+               .video_norm     = V4L2_STD_NTSC,
+               .audio_channels = 1,
+               .radio          = 1,
+               .vbi            = 1,
+               .tuner          = 1,
+               .tuner_type     = TUNER_PHILIPS_NTSC_M,
+               .x_offset       = -1,
+               .y_offset       = -1,
+               .model_string   = "Pinnacle Studio PCTV USB (NTSC) FM V3",
        },
        [PINNA_PCTV_USB_PAL_FM_V2] = {
-               .Interface     = -1,
-               .Codec         = CODEC_SAA7113,
-               .VideoChannels = 3,
-               .VideoNorm     = V4L2_STD_PAL,
-               .AudioChannels = 1,
-               .Radio         = 1,
-               .vbi           = 1,
-               .Tuner         = 1,
-               .TunerType     = TUNER_TEMIC_4009FR5_PAL,
-               .X_Offset      = 0,
-               .Y_Offset      = 3,
-               .Dvi_yuv_override = 1,
-               .Dvi_yuv       = 7,
-               .ModelString   = "Pinnacle Studio PCTV USB (PAL) FM V2",
+               .interface      = -1,
+               .codec          = CODEC_SAA7113,
+               .video_channels = 3,
+               .video_norm     = V4L2_STD_PAL,
+               .audio_channels = 1,
+               .radio          = 1,
+               .vbi            = 1,
+               .tuner          = 1,
+               .tuner_type     = TUNER_TEMIC_4009FR5_PAL,
+               .x_offset       = 0,
+               .y_offset       = 3,
+               .dvi_yuv_override = 1,
+               .dvi_yuv        = 7,
+               .model_string   = "Pinnacle Studio PCTV USB (PAL) FM V2",
        },
        [PINNA_PCTV_USB_NTSC_FM_V2] = {
-               .Interface     = -1,
-               .Codec         = CODEC_SAA7111,
-               .VideoChannels = 3,
-               .VideoNorm     = V4L2_STD_NTSC,
-               .AudioChannels = 1,
-               .Radio         = 1,
-               .vbi           = 1,
-               .Tuner         = 1,
-               .TunerType     = TUNER_TEMIC_4039FR5_NTSC,
-               .X_Offset      = 0,
-               .Y_Offset      = 3,
-               .Dvi_yuv_override = 1,
-               .Dvi_yuv       = 7,
-               .ModelString   = "Pinnacle Studio PCTV USB (NTSC) FM V2",
+               .interface      = -1,
+               .codec          = CODEC_SAA7111,
+               .video_channels = 3,
+               .video_norm     = V4L2_STD_NTSC,
+               .audio_channels = 1,
+               .radio          = 1,
+               .vbi            = 1,
+               .tuner          = 1,
+               .tuner_type     = TUNER_TEMIC_4039FR5_NTSC,
+               .x_offset       = 0,
+               .y_offset       = 3,
+               .dvi_yuv_override = 1,
+               .dvi_yuv        = 7,
+               .model_string   = "Pinnacle Studio PCTV USB (NTSC) FM V2",
        },
        [PINNA_PCTV_USB_PAL_FM_V3] = {
-               .Interface     = -1,
-               .Codec         = CODEC_SAA7113,
-               .VideoChannels = 3,
-               .VideoNorm     = V4L2_STD_PAL,
-               .AudioChannels = 1,
-               .Radio         = 1,
-               .vbi           = 1,
-               .Tuner         = 1,
-               .TunerType     = TUNER_TEMIC_4009FR5_PAL,
-               .X_Offset      = 0,
-               .Y_Offset      = 3,
-               .Dvi_yuv_override = 1,
-               .Dvi_yuv       = 7,
-               .ModelString   = "Pinnacle Studio PCTV USB (PAL) FM V3",
+               .interface      = -1,
+               .codec          = CODEC_SAA7113,
+               .video_channels = 3,
+               .video_norm     = V4L2_STD_PAL,
+               .audio_channels = 1,
+               .radio          = 1,
+               .vbi            = 1,
+               .tuner          = 1,
+               .tuner_type     = TUNER_TEMIC_4009FR5_PAL,
+               .x_offset       = 0,
+               .y_offset       = 3,
+               .dvi_yuv_override = 1,
+               .dvi_yuv        = 7,
+               .model_string   = "Pinnacle Studio PCTV USB (PAL) FM V3",
        },
        [PINNA_LINX_VD_IN_CAB_NTSC] = {
-               .Interface     = -1,
-               .Codec         = CODEC_SAA7113,
-               .VideoChannels = 2,
-               .VideoNorm     = V4L2_STD_NTSC,
-               .AudioChannels = 1,
-               .Radio         = 0,
-               .vbi           = 1,
-               .Tuner         = 0,
-               .TunerType     = 0,
-               .X_Offset      = 0,
-               .Y_Offset      = 3,
-               .Dvi_yuv_override = 1,
-               .Dvi_yuv       = 7,
-               .ModelString   = "Pinnacle Studio Linx Video input cable (NTSC)",
+               .interface      = -1,
+               .codec          = CODEC_SAA7113,
+               .video_channels = 2,
+               .video_norm     = V4L2_STD_NTSC,
+               .audio_channels = 1,
+               .radio          = 0,
+               .vbi            = 1,
+               .tuner          = 0,
+               .tuner_type     = 0,
+               .x_offset       = 0,
+               .y_offset       = 3,
+               .dvi_yuv_override = 1,
+               .dvi_yuv        = 7,
+               .model_string   = "Pinnacle Studio Linx Video input cable (NTSC)",
        },
        [PINNA_LINX_VD_IN_CAB_PAL] = {
-               .Interface     = -1,
-               .Codec         = CODEC_SAA7113,
-               .VideoChannels = 2,
-               .VideoNorm     = V4L2_STD_PAL,
-               .AudioChannels = 1,
-               .Radio         = 0,
-               .vbi           = 1,
-               .Tuner         = 0,
-               .TunerType     = 0,
-               .X_Offset      = 0,
-               .Y_Offset      = 3,
-               .Dvi_yuv_override = 1,
-               .Dvi_yuv       = 7,
-               .ModelString   = "Pinnacle Studio Linx Video input cable (PAL)",
+               .interface      = -1,
+               .codec          = CODEC_SAA7113,
+               .video_channels = 2,
+               .video_norm     = V4L2_STD_PAL,
+               .audio_channels = 1,
+               .radio          = 0,
+               .vbi            = 1,
+               .tuner          = 0,
+               .tuner_type     = 0,
+               .x_offset       = 0,
+               .y_offset       = 3,
+               .dvi_yuv_override = 1,
+               .dvi_yuv        = 7,
+               .model_string   = "Pinnacle Studio Linx Video input cable (PAL)",
        },
        [PINNA_PCTV_BUNGEE_PAL_FM] = {
-               .Interface     = -1,
-               .Codec         = CODEC_SAA7113,
-               .VideoChannels = 3,
-               .VideoNorm     = V4L2_STD_PAL,
-               .AudioChannels = 1,
-               .Radio         = 1,
-               .vbi           = 1,
-               .Tuner         = 1,
-               .TunerType     = TUNER_TEMIC_4009FR5_PAL,
-               .X_Offset      = 0,
-               .Y_Offset      = 3,
-               .Dvi_yuv_override = 1,
-               .Dvi_yuv       = 7,
-               .ModelString   = "Pinnacle PCTV Bungee USB (PAL) FM",
+               .interface      = -1,
+               .codec          = CODEC_SAA7113,
+               .video_channels = 3,
+               .video_norm     = V4L2_STD_PAL,
+               .audio_channels = 1,
+               .radio          = 1,
+               .vbi            = 1,
+               .tuner          = 1,
+               .tuner_type     = TUNER_TEMIC_4009FR5_PAL,
+               .x_offset       = 0,
+               .y_offset       = 3,
+               .dvi_yuv_override = 1,
+               .dvi_yuv        = 7,
+               .model_string   = "Pinnacle PCTV Bungee USB (PAL) FM",
        },
        [HPG_WINTV] = {
-               .Interface     = -1,
-               .Codec         = CODEC_SAA7111,
-               .VideoChannels = 3,
-               .VideoNorm     = V4L2_STD_NTSC,
-               .AudioChannels = 1,
-               .Radio         = 0,
-               .vbi           = 1,
-               .Tuner         = 1,
-               .TunerType     = TUNER_PHILIPS_NTSC_M,
-               .X_Offset      = -1,
-               .Y_Offset      = -1,
-               .ModelString   = "Hauppauge WinTv-USB",
+               .interface      = -1,
+               .codec          = CODEC_SAA7111,
+               .video_channels = 3,
+               .video_norm     = V4L2_STD_NTSC,
+               .audio_channels = 1,
+               .radio          = 0,
+               .vbi            = 1,
+               .tuner          = 1,
+               .tuner_type     = TUNER_PHILIPS_NTSC_M,
+               .x_offset       = -1,
+               .y_offset       = -1,
+               .model_string   = "Hauppauge WinTv-USB",
        },
 };
 const int usbvision_device_data_size=ARRAY_SIZE(usbvision_device_data);
index de58aa7d9e1d5bf44da01d475bf1f4816c08ac3c..372e21b35ed3d69b57fe014e22dd640ad8accd3e 100644 (file)
@@ -53,23 +53,23 @@ static unsigned int force_testpattern;
 module_param(force_testpattern,int,0644);
 MODULE_PARM_DESC(force_testpattern,"enable test pattern display [core]");
 
-static int adjustCompression = 1;      /* Set the compression to be adaptive */
-module_param(adjustCompression, int, 0444);
-MODULE_PARM_DESC(adjustCompression, " Set the ADPCM compression for the device.  Default: 1 (On)");
+static int adjust_compression = 1;     /* Set the compression to be adaptive */
+module_param(adjust_compression, int, 0444);
+MODULE_PARM_DESC(adjust_compression, " Set the ADPCM compression for the device.  Default: 1 (On)");
 
 /* To help people with Black and White output with using s-video input.
  * Some cables and input device are wired differently. */
-static int SwitchSVideoInput;
-module_param(SwitchSVideoInput, int, 0444);
-MODULE_PARM_DESC(SwitchSVideoInput, " Set the S-Video input.  Some cables and input device are wired differently. Default: 0 (Off)");
+static int switch_svideo_input;
+module_param(switch_svideo_input, int, 0444);
+MODULE_PARM_DESC(switch_svideo_input, " Set the S-Video input.  Some cables and input device are wired differently. Default: 0 (Off)");
 
-static unsigned int adjust_X_Offset = -1;
-module_param(adjust_X_Offset, int, 0644);
-MODULE_PARM_DESC(adjust_X_Offset, "adjust X offset display [core]");
+static unsigned int adjust_x_offset = -1;
+module_param(adjust_x_offset, int, 0644);
+MODULE_PARM_DESC(adjust_x_offset, "adjust X offset display [core]");
 
-static unsigned int adjust_Y_Offset = -1;
-module_param(adjust_Y_Offset, int, 0644);
-MODULE_PARM_DESC(adjust_Y_Offset, "adjust Y offset display [core]");
+static unsigned int adjust_y_offset = -1;
+module_param(adjust_y_offset, int, 0644);
+MODULE_PARM_DESC(adjust_y_offset, "adjust Y offset display [core]");
 
 
 #define        ENABLE_HEXDUMP  0       /* Enable if you need it */
@@ -327,7 +327,7 @@ static int scratch_get(struct usb_usbvision *usbvision, unsigned char *data,
 static int scratch_get_header(struct usb_usbvision *usbvision,
                              struct usbvision_frame_header *header)
 {
-       int errCode = 0;
+       int err_code = 0;
 
        PDEBUG(DBG_SCRATCH, "from read_ptr=%d", usbvision->scratch_headermarker_read_ptr);
 
@@ -340,15 +340,15 @@ static int scratch_get_header(struct usb_usbvision *usbvision,
                scratch_get(usbvision, (unsigned char *)header, USBVISION_HEADER_LENGTH);
                if ((header->magic_1 == USBVISION_MAGIC_1)
                         && (header->magic_2 == USBVISION_MAGIC_2)
-                        && (header->headerLength == USBVISION_HEADER_LENGTH)) {
-                       errCode = USBVISION_HEADER_LENGTH;
-                       header->frameWidth  = header->frameWidthLo  + (header->frameWidthHi << 8);
-                       header->frameHeight = header->frameHeightLo + (header->frameHeightHi << 8);
+                        && (header->header_length == USBVISION_HEADER_LENGTH)) {
+                       err_code = USBVISION_HEADER_LENGTH;
+                       header->frame_width  = header->frame_width_lo  + (header->frame_width_hi << 8);
+                       header->frame_height = header->frame_height_lo + (header->frame_height_hi << 8);
                        break;
                }
        }
 
-       return errCode;
+       return err_code;
 }
 
 
@@ -371,7 +371,7 @@ static void scratch_reset(struct usb_usbvision *usbvision)
        usbvision->scratch_write_ptr = 0;
        usbvision->scratch_headermarker_read_ptr = 0;
        usbvision->scratch_headermarker_write_ptr = 0;
-       usbvision->isocstate = IsocState_NoFrame;
+       usbvision->isocstate = isoc_state_no_frame;
 }
 
 int usbvision_scratch_alloc(struct usb_usbvision *usbvision)
@@ -420,13 +420,13 @@ static void usbvision_testpattern(struct usb_usbvision *usbvision,
                printk(KERN_ERR "%s: usbvision == NULL\n", proc);
                return;
        }
-       if (usbvision->curFrame == NULL) {
-               printk(KERN_ERR "%s: usbvision->curFrame is NULL.\n", proc);
+       if (usbvision->cur_frame == NULL) {
+               printk(KERN_ERR "%s: usbvision->cur_frame is NULL.\n", proc);
                return;
        }
 
        /* Grab the current frame */
-       frame = usbvision->curFrame;
+       frame = usbvision->cur_frame;
 
        /* Optionally start at the beginning */
        if (fullframe) {
@@ -473,7 +473,7 @@ static void usbvision_testpattern(struct usb_usbvision *usbvision,
                }
        }
 
-       frame->grabstate = FrameState_Done;
+       frame->grabstate = frame_state_done;
        frame->scanlength += scan_length;
        ++num_pass;
 
@@ -487,8 +487,8 @@ static void usbvision_testpattern(struct usb_usbvision *usbvision,
 int usbvision_decompress_alloc(struct usb_usbvision *usbvision)
 {
        int IFB_size = MAX_FRAME_WIDTH * MAX_FRAME_HEIGHT * 3 / 2;
-       usbvision->IntraFrameBuffer = vmalloc_32(IFB_size);
-       if (usbvision->IntraFrameBuffer == NULL) {
+       usbvision->intra_frame_buffer = vmalloc_32(IFB_size);
+       if (usbvision->intra_frame_buffer == NULL) {
                dev_err(&usbvision->dev->dev,
                        "%s: unable to allocate %d for compr. frame buffer\n",
                                __func__, IFB_size);
@@ -504,8 +504,8 @@ int usbvision_decompress_alloc(struct usb_usbvision *usbvision)
  */
 void usbvision_decompress_free(struct usb_usbvision *usbvision)
 {
-       vfree(usbvision->IntraFrameBuffer);
-       usbvision->IntraFrameBuffer = NULL;
+       vfree(usbvision->intra_frame_buffer);
+       usbvision->intra_frame_buffer = NULL;
 
 }
 
@@ -517,77 +517,77 @@ void usbvision_decompress_free(struct usb_usbvision *usbvision)
  *
  * Locate one of supported header markers in the scratch buffer.
  */
-static enum ParseState usbvision_find_header(struct usb_usbvision *usbvision)
+static enum parse_state usbvision_find_header(struct usb_usbvision *usbvision)
 {
        struct usbvision_frame *frame;
-       int foundHeader = 0;
+       int found_header = 0;
 
-       frame = usbvision->curFrame;
+       frame = usbvision->cur_frame;
 
-       while (scratch_get_header(usbvision, &frame->isocHeader) == USBVISION_HEADER_LENGTH) {
+       while (scratch_get_header(usbvision, &frame->isoc_header) == USBVISION_HEADER_LENGTH) {
                // found header in scratch
                PDEBUG(DBG_HEADER, "found header: 0x%02x%02x %d %d %d %d %#x 0x%02x %u %u",
-                               frame->isocHeader.magic_2,
-                               frame->isocHeader.magic_1,
-                               frame->isocHeader.headerLength,
-                               frame->isocHeader.frameNum,
-                               frame->isocHeader.framePhase,
-                               frame->isocHeader.frameLatency,
-                               frame->isocHeader.dataFormat,
-                               frame->isocHeader.formatParam,
-                               frame->isocHeader.frameWidth,
-                               frame->isocHeader.frameHeight);
-
-               if (usbvision->requestIntra) {
-                       if (frame->isocHeader.formatParam & 0x80) {
-                               foundHeader = 1;
-                               usbvision->lastIsocFrameNum = -1; // do not check for lost frames this time
+                               frame->isoc_header.magic_2,
+                               frame->isoc_header.magic_1,
+                               frame->isoc_header.header_length,
+                               frame->isoc_header.frame_num,
+                               frame->isoc_header.frame_phase,
+                               frame->isoc_header.frame_latency,
+                               frame->isoc_header.data_format,
+                               frame->isoc_header.format_param,
+                               frame->isoc_header.frame_width,
+                               frame->isoc_header.frame_height);
+
+               if (usbvision->request_intra) {
+                       if (frame->isoc_header.format_param & 0x80) {
+                               found_header = 1;
+                               usbvision->last_isoc_frame_num = -1; // do not check for lost frames this time
                                usbvision_unrequest_intra(usbvision);
                                break;
                        }
                }
                else {
-                       foundHeader = 1;
+                       found_header = 1;
                        break;
                }
        }
 
-       if (foundHeader) {
-               frame->frmwidth = frame->isocHeader.frameWidth * usbvision->stretch_width;
-               frame->frmheight = frame->isocHeader.frameHeight * usbvision->stretch_height;
+       if (found_header) {
+               frame->frmwidth = frame->isoc_header.frame_width * usbvision->stretch_width;
+               frame->frmheight = frame->isoc_header.frame_height * usbvision->stretch_height;
                frame->v4l2_linesize = (frame->frmwidth * frame->v4l2_format.depth)>> 3;
        }
        else { // no header found
                PDEBUG(DBG_HEADER, "skipping scratch data, no header");
                scratch_reset(usbvision);
-               return ParseState_EndParse;
+               return parse_state_end_parse;
        }
 
        // found header
-       if (frame->isocHeader.dataFormat==ISOC_MODE_COMPRESS) {
-               //check isocHeader.frameNum for lost frames
-               if (usbvision->lastIsocFrameNum >= 0) {
-                       if (((usbvision->lastIsocFrameNum + 1) % 32) != frame->isocHeader.frameNum) {
+       if (frame->isoc_header.data_format==ISOC_MODE_COMPRESS) {
+               //check isoc_header.frame_num for lost frames
+               if (usbvision->last_isoc_frame_num >= 0) {
+                       if (((usbvision->last_isoc_frame_num + 1) % 32) != frame->isoc_header.frame_num) {
                                // unexpected frame drop: need to request new intra frame
-                               PDEBUG(DBG_HEADER, "Lost frame before %d on USB", frame->isocHeader.frameNum);
+                               PDEBUG(DBG_HEADER, "Lost frame before %d on USB", frame->isoc_header.frame_num);
                                usbvision_request_intra(usbvision);
-                               return ParseState_NextFrame;
+                               return parse_state_next_frame;
                        }
                }
-               usbvision->lastIsocFrameNum = frame->isocHeader.frameNum;
+               usbvision->last_isoc_frame_num = frame->isoc_header.frame_num;
        }
        usbvision->header_count++;
-       frame->scanstate = ScanState_Lines;
+       frame->scanstate = scan_state_lines;
        frame->curline = 0;
 
        if (force_testpattern) {
                usbvision_testpattern(usbvision, 1, 1);
-               return ParseState_NextFrame;
+               return parse_state_next_frame;
        }
-       return ParseState_Continue;
+       return parse_state_continue;
 }
 
-static enum ParseState usbvision_parse_lines_422(struct usb_usbvision *usbvision,
+static enum parse_state usbvision_parse_lines_422(struct usb_usbvision *usbvision,
                                           long *pcopylen)
 {
        volatile struct usbvision_frame *frame;
@@ -599,18 +599,18 @@ static enum ParseState usbvision_parse_lines_422(struct usb_usbvision *usbvision
        int clipmask_index, bytes_per_pixel;
        int stretch_bytes, clipmask_add;
 
-       frame  = usbvision->curFrame;
+       frame  = usbvision->cur_frame;
        f = frame->data + (frame->v4l2_linesize * frame->curline);
 
        /* Make sure there's enough data for the entire line */
-       len = (frame->isocHeader.frameWidth * 2)+5;
+       len = (frame->isoc_header.frame_width * 2)+5;
        if (scratch_len(usbvision) < len) {
                PDEBUG(DBG_PARSE, "out of data in line %d, need %u.\n", frame->curline, len);
-               return ParseState_Out;
+               return parse_state_out;
        }
 
        if ((frame->curline + 1) >= frame->frmheight) {
-               return ParseState_NextFrame;
+               return parse_state_next_frame;
        }
 
        bytes_per_pixel = frame->v4l2_format.bytes_per_pixel;
@@ -699,99 +699,99 @@ static enum ParseState usbvision_parse_lines_422(struct usb_usbvision *usbvision
        *pcopylen += frame->v4l2_linesize * usbvision->stretch_height;
 
        if (frame->curline >= frame->frmheight) {
-               return ParseState_NextFrame;
+               return parse_state_next_frame;
        }
        else {
-               return ParseState_Continue;
+               return parse_state_continue;
        }
 }
 
 /* The decompression routine  */
-static int usbvision_decompress(struct usb_usbvision *usbvision,unsigned char *Compressed,
-                                                               unsigned char *Decompressed, int *StartPos,
-                                                               int *BlockTypeStartPos, int Len)
+static int usbvision_decompress(struct usb_usbvision *usbvision,unsigned char *compressed,
+                                                               unsigned char *decompressed, int *start_pos,
+                                                               int *block_typestart_pos, int len)
 {
-       int RestPixel, Idx, MaxPos, Pos, ExtraPos, BlockLen, BlockTypePos, BlockTypeLen;
-       unsigned char BlockByte, BlockCode, BlockType, BlockTypeByte, Integrator;
-
-       Integrator = 0;
-       Pos = *StartPos;
-       BlockTypePos = *BlockTypeStartPos;
-       MaxPos = 396; //Pos + Len;
-       ExtraPos = Pos;
-       BlockLen = 0;
-       BlockByte = 0;
-       BlockCode = 0;
-       BlockType = 0;
-       BlockTypeByte = 0;
-       BlockTypeLen = 0;
-       RestPixel = Len;
-
-       for (Idx = 0; Idx < Len; Idx++) {
-
-               if (BlockLen == 0) {
-                       if (BlockTypeLen==0) {
-                               BlockTypeByte = Compressed[BlockTypePos];
-                               BlockTypePos++;
-                               BlockTypeLen = 4;
+       int rest_pixel, idx, max_pos, pos, extra_pos, block_len, block_type_pos, block_type_len;
+       unsigned char block_byte, block_code, block_type, block_type_byte, integrator;
+
+       integrator = 0;
+       pos = *start_pos;
+       block_type_pos = *block_typestart_pos;
+       max_pos = 396; //pos + len;
+       extra_pos = pos;
+       block_len = 0;
+       block_byte = 0;
+       block_code = 0;
+       block_type = 0;
+       block_type_byte = 0;
+       block_type_len = 0;
+       rest_pixel = len;
+
+       for (idx = 0; idx < len; idx++) {
+
+               if (block_len == 0) {
+                       if (block_type_len==0) {
+                               block_type_byte = compressed[block_type_pos];
+                               block_type_pos++;
+                               block_type_len = 4;
                        }
-                       BlockType = (BlockTypeByte & 0xC0) >> 6;
+                       block_type = (block_type_byte & 0xC0) >> 6;
 
                        //statistic:
-                       usbvision->ComprBlockTypes[BlockType]++;
-
-                       Pos = ExtraPos;
-                       if (BlockType == 0) {
-                               if(RestPixel >= 24) {
-                                       Idx += 23;
-                                       RestPixel -= 24;
-                                       Integrator = Decompressed[Idx];
+                       usbvision->compr_block_types[block_type]++;
+
+                       pos = extra_pos;
+                       if (block_type == 0) {
+                               if(rest_pixel >= 24) {
+                                       idx += 23;
+                                       rest_pixel -= 24;
+                                       integrator = decompressed[idx];
                                } else {
-                                       Idx += RestPixel - 1;
-                                       RestPixel = 0;
+                                       idx += rest_pixel - 1;
+                                       rest_pixel = 0;
                                }
                        } else {
-                               BlockCode = Compressed[Pos];
-                               Pos++;
-                               if (RestPixel >= 24) {
-                                       BlockLen  = 24;
+                               block_code = compressed[pos];
+                               pos++;
+                               if (rest_pixel >= 24) {
+                                       block_len  = 24;
                                } else {
-                                       BlockLen = RestPixel;
+                                       block_len = rest_pixel;
                                }
-                               RestPixel -= BlockLen;
-                               ExtraPos = Pos + (BlockLen / 4);
+                               rest_pixel -= block_len;
+                               extra_pos = pos + (block_len / 4);
                        }
-                       BlockTypeByte <<= 2;
-                       BlockTypeLen -= 1;
+                       block_type_byte <<= 2;
+                       block_type_len -= 1;
                }
-               if (BlockLen > 0) {
-                       if ((BlockLen%4) == 0) {
-                               BlockByte = Compressed[Pos];
-                               Pos++;
+               if (block_len > 0) {
+                       if ((block_len%4) == 0) {
+                               block_byte = compressed[pos];
+                               pos++;
                        }
-                       if (BlockType == 1) { //inter Block
-                               Integrator = Decompressed[Idx];
+                       if (block_type == 1) { //inter Block
+                               integrator = decompressed[idx];
                        }
-                       switch (BlockByte & 0xC0) {
+                       switch (block_byte & 0xC0) {
                                case 0x03<<6:
-                                       Integrator += Compressed[ExtraPos];
-                                       ExtraPos++;
+                                       integrator += compressed[extra_pos];
+                                       extra_pos++;
                                        break;
                                case 0x02<<6:
-                                       Integrator += BlockCode;
+                                       integrator += block_code;
                                        break;
                                case 0x00:
-                                       Integrator -= BlockCode;
+                                       integrator -= block_code;
                                        break;
                        }
-                       Decompressed[Idx] = Integrator;
-                       BlockByte <<= 2;
-                       BlockLen -= 1;
+                       decompressed[idx] = integrator;
+                       block_byte <<= 2;
+                       block_len -= 1;
                }
        }
-       *StartPos = ExtraPos;
-       *BlockTypeStartPos = BlockTypePos;
-       return Idx;
+       *start_pos = extra_pos;
+       *block_typestart_pos = block_type_pos;
+       return idx;
 }
 
 
@@ -803,7 +803,7 @@ static int usbvision_decompress(struct usb_usbvision *usbvision,unsigned char *C
  * number of bytes (RGB) to the *pcopylen.
  *
  */
-static enum ParseState usbvision_parse_compress(struct usb_usbvision *usbvision,
+static enum parse_state usbvision_parse_compress(struct usb_usbvision *usbvision,
                                           long *pcopylen)
 {
 #define USBVISION_STRIP_MAGIC          0x5A
@@ -812,16 +812,16 @@ static enum ParseState usbvision_parse_compress(struct usb_usbvision *usbvision,
 
        struct usbvision_frame *frame;
        unsigned char *f,*u = NULL ,*v = NULL;
-       unsigned char StripData[USBVISION_STRIP_LEN_MAX];
-       unsigned char StripHeader[USBVISION_STRIP_HEADER_LEN];
-       int Idx, IdxEnd, StripLen, StripPtr, StartBlockPos, BlockPos, BlockTypePos;
+       unsigned char strip_data[USBVISION_STRIP_LEN_MAX];
+       unsigned char strip_header[USBVISION_STRIP_HEADER_LEN];
+       int idx, idx_end, strip_len, strip_ptr, Startblock_pos, block_pos, block_type_pos;
        int clipmask_index, bytes_per_pixel, rc;
-       int imageSize;
+       int image_size;
        unsigned char rv, gv, bv;
        static unsigned char *Y, *U, *V;
 
-       frame  = usbvision->curFrame;
-       imageSize = frame->frmwidth * frame->frmheight;
+       frame  = usbvision->cur_frame;
+       image_size = frame->frmwidth * frame->frmheight;
        if ( (frame->v4l2_format.format == V4L2_PIX_FMT_YUV422P) ||
             (frame->v4l2_format.format == V4L2_PIX_FMT_YVU420) ) {       // this is a planar format
                //... v4l2_linesize not used here.
@@ -833,14 +833,14 @@ static enum ParseState usbvision_parse_compress(struct usb_usbvision *usbvision,
                // get base of u and b planes add halfoffset
 
                u = frame->data
-                       + imageSize
+                       + image_size
                        + (frame->frmwidth >>1) * frame->curline ;
-               v = u + (imageSize >>1 );
+               v = u + (image_size >>1 );
 
        } else if (frame->v4l2_format.format == V4L2_PIX_FMT_YVU420){
 
-               v = frame->data + imageSize + ((frame->curline* (frame->width))>>2) ;
-               u = v + (imageSize >>2) ;
+               v = frame->data + image_size + ((frame->curline* (frame->width))>>2) ;
+               u = v + (image_size >>2) ;
        }
 
        if (frame->curline == 0) {
@@ -848,112 +848,112 @@ static enum ParseState usbvision_parse_compress(struct usb_usbvision *usbvision,
        }
 
        if (scratch_len(usbvision) < USBVISION_STRIP_HEADER_LEN) {
-               return ParseState_Out;
+               return parse_state_out;
        }
 
        //get strip header without changing the scratch_read_ptr
-       scratch_set_extra_ptr(usbvision, &StripPtr, 0);
-       scratch_get_extra(usbvision, &StripHeader[0], &StripPtr,
+       scratch_set_extra_ptr(usbvision, &strip_ptr, 0);
+       scratch_get_extra(usbvision, &strip_header[0], &strip_ptr,
                                USBVISION_STRIP_HEADER_LEN);
 
-       if (StripHeader[0] != USBVISION_STRIP_MAGIC) {
+       if (strip_header[0] != USBVISION_STRIP_MAGIC) {
                // wrong strip magic
-               usbvision->stripMagicErrors++;
-               return ParseState_NextFrame;
+               usbvision->strip_magic_errors++;
+               return parse_state_next_frame;
        }
 
-       if (frame->curline != (int)StripHeader[2]) {
+       if (frame->curline != (int)strip_header[2]) {
                //line number missmatch error
-               usbvision->stripLineNumberErrors++;
+               usbvision->strip_line_number_errors++;
        }
 
-       StripLen = 2 * (unsigned int)StripHeader[1];
-       if (StripLen > USBVISION_STRIP_LEN_MAX) {
+       strip_len = 2 * (unsigned int)strip_header[1];
+       if (strip_len > USBVISION_STRIP_LEN_MAX) {
                // strip overrun
                // I think this never happens
                usbvision_request_intra(usbvision);
        }
 
-       if (scratch_len(usbvision) < StripLen) {
+       if (scratch_len(usbvision) < strip_len) {
                //there is not enough data for the strip
-               return ParseState_Out;
+               return parse_state_out;
        }
 
-       if (usbvision->IntraFrameBuffer) {
-               Y = usbvision->IntraFrameBuffer + frame->frmwidth * frame->curline;
-               U = usbvision->IntraFrameBuffer + imageSize + (frame->frmwidth / 2) * (frame->curline / 2);
-               V = usbvision->IntraFrameBuffer + imageSize / 4 * 5 + (frame->frmwidth / 2) * (frame->curline / 2);
+       if (usbvision->intra_frame_buffer) {
+               Y = usbvision->intra_frame_buffer + frame->frmwidth * frame->curline;
+               U = usbvision->intra_frame_buffer + image_size + (frame->frmwidth / 2) * (frame->curline / 2);
+               V = usbvision->intra_frame_buffer + image_size / 4 * 5 + (frame->frmwidth / 2) * (frame->curline / 2);
        }
        else {
-               return ParseState_NextFrame;
+               return parse_state_next_frame;
        }
 
        bytes_per_pixel = frame->v4l2_format.bytes_per_pixel;
        clipmask_index = frame->curline * MAX_FRAME_WIDTH;
 
-       scratch_get(usbvision, StripData, StripLen);
+       scratch_get(usbvision, strip_data, strip_len);
 
-       IdxEnd = frame->frmwidth;
-       BlockTypePos = USBVISION_STRIP_HEADER_LEN;
-       StartBlockPos = BlockTypePos + (IdxEnd - 1) / 96 + (IdxEnd / 2 - 1) / 96 + 2;
-       BlockPos = StartBlockPos;
+       idx_end = frame->frmwidth;
+       block_type_pos = USBVISION_STRIP_HEADER_LEN;
+       Startblock_pos = block_type_pos + (idx_end - 1) / 96 + (idx_end / 2 - 1) / 96 + 2;
+       block_pos = Startblock_pos;
 
-       usbvision->BlockPos = BlockPos;
+       usbvision->block_pos = block_pos;
 
-       if ((rc = usbvision_decompress(usbvision, StripData, Y, &BlockPos, &BlockTypePos, IdxEnd)) != IdxEnd) {
-               //return ParseState_Continue;
+       if ((rc = usbvision_decompress(usbvision, strip_data, Y, &block_pos, &block_type_pos, idx_end)) != idx_end) {
+               //return parse_state_continue;
        }
-       if (StripLen > usbvision->maxStripLen) {
-               usbvision->maxStripLen = StripLen;
+       if (strip_len > usbvision->max_strip_len) {
+               usbvision->max_strip_len = strip_len;
        }
 
        if (frame->curline%2) {
-               if ((rc = usbvision_decompress(usbvision, StripData, V, &BlockPos, &BlockTypePos, IdxEnd/2)) != IdxEnd/2) {
-               //return ParseState_Continue;
+               if ((rc = usbvision_decompress(usbvision, strip_data, V, &block_pos, &block_type_pos, idx_end/2)) != idx_end/2) {
+               //return parse_state_continue;
                }
        }
        else {
-               if ((rc = usbvision_decompress(usbvision, StripData, U, &BlockPos, &BlockTypePos, IdxEnd/2)) != IdxEnd/2) {
-                       //return ParseState_Continue;
+               if ((rc = usbvision_decompress(usbvision, strip_data, U, &block_pos, &block_type_pos, idx_end/2)) != idx_end/2) {
+                       //return parse_state_continue;
                }
        }
 
-       if (BlockPos > usbvision->comprBlockPos) {
-               usbvision->comprBlockPos = BlockPos;
+       if (block_pos > usbvision->comprblock_pos) {
+               usbvision->comprblock_pos = block_pos;
        }
-       if (BlockPos > StripLen) {
-               usbvision->stripLenErrors++;
+       if (block_pos > strip_len) {
+               usbvision->strip_len_errors++;
        }
 
-       for (Idx = 0; Idx < IdxEnd; Idx++) {
+       for (idx = 0; idx < idx_end; idx++) {
                if(frame->v4l2_format.format == V4L2_PIX_FMT_YUYV) {
-                       *f++ = Y[Idx];
-                       *f++ = Idx & 0x01 ? U[Idx/2] : V[Idx/2];
+                       *f++ = Y[idx];
+                       *f++ = idx & 0x01 ? U[idx/2] : V[idx/2];
                }
                else if(frame->v4l2_format.format == V4L2_PIX_FMT_YUV422P) {
-                       *f++ = Y[Idx];
-                       if ( Idx & 0x01)
-                               *u++ = U[Idx>>1] ;
+                       *f++ = Y[idx];
+                       if ( idx & 0x01)
+                               *u++ = U[idx>>1] ;
                        else
-                               *v++ = V[Idx>>1];
+                               *v++ = V[idx>>1];
                }
                else if (frame->v4l2_format.format == V4L2_PIX_FMT_YVU420) {
-                       *f++ = Y [Idx];
-                       if ( !((  Idx & 0x01  ) | (  frame->curline & 0x01  )) ){
+                       *f++ = Y [idx];
+                       if ( !((  idx & 0x01  ) | (  frame->curline & 0x01  )) ){
 
 /*                              only need do this for 1 in 4 pixels */
 /*                              intraframe buffer is YUV420 format */
 
-                               *u++ = U[Idx >>1];
-                               *v++ = V[Idx >>1];
+                               *u++ = U[idx >>1];
+                               *v++ = V[idx >>1];
                        }
 
                }
                else {
-                       YUV_TO_RGB_BY_THE_BOOK(Y[Idx], U[Idx/2], V[Idx/2], rv, gv, bv);
+                       YUV_TO_RGB_BY_THE_BOOK(Y[idx], U[idx/2], V[idx/2], rv, gv, bv);
                        switch (frame->v4l2_format.format) {
                                case V4L2_PIX_FMT_GREY:
-                                       *f++ = Y[Idx];
+                                       *f++ = Y[idx];
                                        break;
                                case V4L2_PIX_FMT_RGB555:
                                        *f++ = (0x1F & rv) |
@@ -991,10 +991,10 @@ static enum ParseState usbvision_parse_compress(struct usb_usbvision *usbvision,
        frame->curline += 1;
 
        if (frame->curline >= frame->frmheight) {
-               return ParseState_NextFrame;
+               return parse_state_next_frame;
        }
        else {
-               return ParseState_Continue;
+               return parse_state_continue;
        }
 
 }
@@ -1008,7 +1008,7 @@ static enum ParseState usbvision_parse_compress(struct usb_usbvision *usbvision,
  * number of bytes (RGB) to the *pcopylen.
  *
  */
-static enum ParseState usbvision_parse_lines_420(struct usb_usbvision *usbvision,
+static enum parse_state usbvision_parse_lines_420(struct usb_usbvision *usbvision,
                                           long *pcopylen)
 {
        struct usbvision_frame *frame;
@@ -1028,7 +1028,7 @@ static enum ParseState usbvision_parse_lines_420(struct usb_usbvision *usbvision
        int clipmask_even_index, clipmask_odd_index, bytes_per_pixel;
        int clipmask_add, stretch_bytes;
 
-       frame  = usbvision->curFrame;
+       frame  = usbvision->cur_frame;
        f_even = frame->data + (frame->v4l2_linesize * frame->curline);
        f_odd  = f_even + frame->v4l2_linesize * usbvision->stretch_height;
 
@@ -1040,15 +1040,15 @@ static enum ParseState usbvision_parse_lines_420(struct usb_usbvision *usbvision
        clipmask_even_index = frame->curline * MAX_FRAME_WIDTH;
        clipmask_odd_index  = clipmask_even_index + MAX_FRAME_WIDTH;
        clipmask_add = usbvision->stretch_width;
-       pixel_per_line = frame->isocHeader.frameWidth;
+       pixel_per_line = frame->isoc_header.frame_width;
 
        if (scratch_len(usbvision) < (int)pixel_per_line * 3) {
                //printk(KERN_DEBUG "out of data, need %d\n", len);
-               return ParseState_Out;
+               return parse_state_out;
        }
 
        if ((frame->curline + 1) >= frame->frmheight) {
-               return ParseState_NextFrame;
+               return parse_state_next_frame;
        }
 
        block_split = (pixel_per_line%y_block_size) ? 1 : 0;    //are some blocks splitted into different lines?
@@ -1272,9 +1272,9 @@ static enum ParseState usbvision_parse_lines_420(struct usb_usbvision *usbvision
        *pcopylen += frame->v4l2_linesize * 2 * usbvision->stretch_height;
 
        if (frame->curline >= frame->frmheight)
-               return ParseState_NextFrame;
+               return parse_state_next_frame;
        else
-               return ParseState_Continue;
+               return parse_state_continue;
 }
 
 /*
@@ -1288,53 +1288,53 @@ static enum ParseState usbvision_parse_lines_420(struct usb_usbvision *usbvision
 static void usbvision_parse_data(struct usb_usbvision *usbvision)
 {
        struct usbvision_frame *frame;
-       enum ParseState newstate;
+       enum parse_state newstate;
        long copylen = 0;
        unsigned long lock_flags;
 
-       frame = usbvision->curFrame;
+       frame = usbvision->cur_frame;
 
        PDEBUG(DBG_PARSE, "parsing len=%d\n", scratch_len(usbvision));
 
        while (1) {
 
-               newstate = ParseState_Out;
+               newstate = parse_state_out;
                if (scratch_len(usbvision)) {
-                       if (frame->scanstate == ScanState_Scanning) {
+                       if (frame->scanstate == scan_state_scanning) {
                                newstate = usbvision_find_header(usbvision);
                        }
-                       else if (frame->scanstate == ScanState_Lines) {
-                               if (usbvision->isocMode == ISOC_MODE_YUV420) {
+                       else if (frame->scanstate == scan_state_lines) {
+                               if (usbvision->isoc_mode == ISOC_MODE_YUV420) {
                                        newstate = usbvision_parse_lines_420(usbvision, &copylen);
                                }
-                               else if (usbvision->isocMode == ISOC_MODE_YUV422) {
+                               else if (usbvision->isoc_mode == ISOC_MODE_YUV422) {
                                        newstate = usbvision_parse_lines_422(usbvision, &copylen);
                                }
-                               else if (usbvision->isocMode == ISOC_MODE_COMPRESS) {
+                               else if (usbvision->isoc_mode == ISOC_MODE_COMPRESS) {
                                        newstate = usbvision_parse_compress(usbvision, &copylen);
                                }
 
                        }
                }
-               if (newstate == ParseState_Continue) {
+               if (newstate == parse_state_continue) {
                        continue;
                }
-               else if ((newstate == ParseState_NextFrame) || (newstate == ParseState_Out)) {
+               else if ((newstate == parse_state_next_frame) || (newstate == parse_state_out)) {
                        break;
                }
                else {
-                       return; /* ParseState_EndParse */
+                       return; /* parse_state_end_parse */
                }
        }
 
-       if (newstate == ParseState_NextFrame) {
-               frame->grabstate = FrameState_Done;
+       if (newstate == parse_state_next_frame) {
+               frame->grabstate = frame_state_done;
                do_gettimeofday(&(frame->timestamp));
                frame->sequence = usbvision->frame_num;
 
                spin_lock_irqsave(&usbvision->queue_lock, lock_flags);
                list_move_tail(&(frame->frame), &usbvision->outqueue);
-               usbvision->curFrame = NULL;
+               usbvision->cur_frame = NULL;
                spin_unlock_irqrestore(&usbvision->queue_lock, lock_flags);
 
                usbvision->frame_num++;
@@ -1346,7 +1346,7 @@ static void usbvision_parse_data(struct usb_usbvision *usbvision)
                }
        }
        else
-               frame->grabstate = FrameState_Grabbing;
+               frame->grabstate = frame_state_grabbing;
 
 
        /* Update the frame's uncompressed length. */
@@ -1372,32 +1372,32 @@ static int usbvision_compress_isochronous(struct usb_usbvision *usbvision,
                /* Detect and ignore errored packets */
                if (packet_stat) {      // packet_stat != 0 ?????????????
                        PDEBUG(DBG_ISOC, "data error: [%d] len=%d, status=%X", i, packet_len, packet_stat);
-                       usbvision->isocErrCount++;
+                       usbvision->isoc_err_count++;
                        continue;
                }
 
                /* Detect and ignore empty packets */
                if (packet_len < 0) {
                        PDEBUG(DBG_ISOC, "error packet [%d]", i);
-                       usbvision->isocSkipCount++;
+                       usbvision->isoc_skip_count++;
                        continue;
                }
                else if (packet_len == 0) {     /* Frame end ????? */
                        PDEBUG(DBG_ISOC, "null packet [%d]", i);
-                       usbvision->isocstate=IsocState_NoFrame;
-                       usbvision->isocSkipCount++;
+                       usbvision->isocstate=isoc_state_no_frame;
+                       usbvision->isoc_skip_count++;
                        continue;
                }
-               else if (packet_len > usbvision->isocPacketSize) {
-                       PDEBUG(DBG_ISOC, "packet[%d] > isocPacketSize", i);
-                       usbvision->isocSkipCount++;
+               else if (packet_len > usbvision->isoc_packet_size) {
+                       PDEBUG(DBG_ISOC, "packet[%d] > isoc_packet_size", i);
+                       usbvision->isoc_skip_count++;
                        continue;
                }
 
                PDEBUG(DBG_ISOC, "packet ok [%d] len=%d", i, packet_len);
 
-               if (usbvision->isocstate==IsocState_NoFrame) { //new frame begins
-                       usbvision->isocstate=IsocState_InFrame;
+               if (usbvision->isocstate==isoc_state_no_frame) { //new frame begins
+                       usbvision->isocstate=isoc_state_in_frame;
                        scratch_mark_header(usbvision);
                        usbvision_measure_bandwidth(usbvision);
                        PDEBUG(DBG_ISOC, "packet with header");
@@ -1422,8 +1422,8 @@ static int usbvision_compress_isochronous(struct usb_usbvision *usbvision,
                /* Now we know that there is enough room in scratch buffer */
                scratch_put(usbvision, packet_data, packet_len);
                totlen += packet_len;
-               usbvision->isocDataCount += packet_len;
-               usbvision->isocPacketCount++;
+               usbvision->isoc_data_count += packet_len;
+               usbvision->isoc_packet_count++;
        }
 #if ENABLE_HEXDUMP
        if (totlen > 0) {
@@ -1438,13 +1438,13 @@ static int usbvision_compress_isochronous(struct usb_usbvision *usbvision,
  return totlen;
 }
 
-static void usbvision_isocIrq(struct urb *urb)
+static void usbvision_isoc_irq(struct urb *urb)
 {
-       int errCode = 0;
+       int err_code = 0;
        int len;
        struct usb_usbvision *usbvision = urb->context;
        int i;
-       unsigned long startTime = jiffies;
+       unsigned long start_time = jiffies;
        struct usbvision_frame **f;
 
        /* We don't want to do anything if we are about to be removed! */
@@ -1456,14 +1456,14 @@ static void usbvision_isocIrq(struct urb *urb)
                return;
        }
 
-       f = &usbvision->curFrame;
+       f = &usbvision->cur_frame;
 
        /* Manage streaming interruption */
-       if (usbvision->streaming == Stream_Interrupt) {
-               usbvision->streaming = Stream_Idle;
+       if (usbvision->streaming == stream_interrupt) {
+               usbvision->streaming = stream_idle;
                if ((*f)) {
-                       (*f)->grabstate = FrameState_Ready;
-                       (*f)->scanstate = ScanState_Scanning;
+                       (*f)->grabstate = frame_state_ready;
+                       (*f)->scanstate = scan_state_scanning;
                }
                PDEBUG(DBG_IRQ, "stream interrupted");
                wake_up_interruptible(&usbvision->wait_stream);
@@ -1472,10 +1472,10 @@ static void usbvision_isocIrq(struct urb *urb)
        /* Copy the data received into our scratch buffer */
        len = usbvision_compress_isochronous(usbvision, urb);
 
-       usbvision->isocUrbCount++;
+       usbvision->isoc_urb_count++;
        usbvision->urb_length = len;
 
-       if (usbvision->streaming == Stream_On) {
+       if (usbvision->streaming == stream_on) {
 
                /* If we collected enough data let's parse! */
                if ((scratch_len(usbvision) > USBVISION_HEADER_LENGTH) &&
@@ -1500,7 +1500,7 @@ static void usbvision_isocIrq(struct urb *urb)
                scratch_reset(usbvision);
        }
 
-       usbvision->timeInIrq += jiffies - startTime;
+       usbvision->time_in_irq += jiffies - start_time;
 
        for (i = 0; i < USBVISION_URB_FRAMES; i++) {
                urb->iso_frame_desc[i].status = 0;
@@ -1509,12 +1509,12 @@ static void usbvision_isocIrq(struct urb *urb)
 
        urb->status = 0;
        urb->dev = usbvision->dev;
-       errCode = usb_submit_urb (urb, GFP_ATOMIC);
+       err_code = usb_submit_urb (urb, GFP_ATOMIC);
 
-       if(errCode) {
+       if(err_code) {
                dev_err(&usbvision->dev->dev,
                        "%s: usb_submit_urb failed: error %d\n",
-                               __func__, errCode);
+                               __func__, err_code);
        }
 
        return;
@@ -1533,21 +1533,21 @@ static void usbvision_isocIrq(struct urb *urb)
 
 int usbvision_read_reg(struct usb_usbvision *usbvision, unsigned char reg)
 {
-       int errCode = 0;
+       int err_code = 0;
        unsigned char buffer[1];
 
        if (!USBVISION_IS_OPERATIONAL(usbvision))
                return -1;
 
-       errCode = usb_control_msg(usbvision->dev, usb_rcvctrlpipe(usbvision->dev, 1),
+       err_code = usb_control_msg(usbvision->dev, usb_rcvctrlpipe(usbvision->dev, 1),
                                USBVISION_OP_CODE,
                                USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_ENDPOINT,
                                0, (__u16) reg, buffer, 1, HZ);
 
-       if (errCode < 0) {
+       if (err_code < 0) {
                dev_err(&usbvision->dev->dev,
-                       "%s: failed: error %d\n", __func__, errCode);
-               return errCode;
+                       "%s: failed: error %d\n", __func__, err_code);
+               return err_code;
        }
        return buffer[0];
 }
@@ -1563,32 +1563,32 @@ int usbvision_read_reg(struct usb_usbvision *usbvision, unsigned char reg)
 int usbvision_write_reg(struct usb_usbvision *usbvision, unsigned char reg,
                            unsigned char value)
 {
-       int errCode = 0;
+       int err_code = 0;
 
        if (!USBVISION_IS_OPERATIONAL(usbvision))
                return 0;
 
-       errCode = usb_control_msg(usbvision->dev, usb_sndctrlpipe(usbvision->dev, 1),
+       err_code = usb_control_msg(usbvision->dev, usb_sndctrlpipe(usbvision->dev, 1),
                                USBVISION_OP_CODE,
                                USB_DIR_OUT | USB_TYPE_VENDOR |
                                USB_RECIP_ENDPOINT, 0, (__u16) reg, &value, 1, HZ);
 
-       if (errCode < 0) {
+       if (err_code < 0) {
                dev_err(&usbvision->dev->dev,
-                       "%s: failed: error %d\n", __func__, errCode);
+                       "%s: failed: error %d\n", __func__, err_code);
        }
-       return errCode;
+       return err_code;
 }
 
 
-static void usbvision_ctrlUrb_complete(struct urb *urb)
+static void usbvision_ctrl_urb_complete(struct urb *urb)
 {
        struct usb_usbvision *usbvision = (struct usb_usbvision *)urb->context;
 
        PDEBUG(DBG_IRQ, "");
-       usbvision->ctrlUrbBusy = 0;
-       if (waitqueue_active(&usbvision->ctrlUrb_wq)) {
-               wake_up_interruptible(&usbvision->ctrlUrb_wq);
+       usbvision->ctrl_urb_busy = 0;
+       if (waitqueue_active(&usbvision->ctrl_urb_wq)) {
+               wake_up_interruptible(&usbvision->ctrl_urb_wq);
        }
 }
 
@@ -1596,146 +1596,146 @@ static void usbvision_ctrlUrb_complete(struct urb *urb)
 static int usbvision_write_reg_irq(struct usb_usbvision *usbvision,int address,
                                                                        unsigned char *data, int len)
 {
-       int errCode = 0;
+       int err_code = 0;
 
        PDEBUG(DBG_IRQ, "");
        if (len > 8) {
                return -EFAULT;
        }
-       if (usbvision->ctrlUrbBusy) {
+       if (usbvision->ctrl_urb_busy) {
                return -EBUSY;
        }
-       usbvision->ctrlUrbBusy = 1;
+       usbvision->ctrl_urb_busy = 1;
 
-       usbvision->ctrlUrbSetup.bRequestType = USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_ENDPOINT;
-       usbvision->ctrlUrbSetup.bRequest     = USBVISION_OP_CODE;
-       usbvision->ctrlUrbSetup.wValue       = 0;
-       usbvision->ctrlUrbSetup.wIndex       = cpu_to_le16(address);
-       usbvision->ctrlUrbSetup.wLength      = cpu_to_le16(len);
-       usb_fill_control_urb (usbvision->ctrlUrb, usbvision->dev,
+       usbvision->ctrl_urb_setup.bRequestType = USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_ENDPOINT;
+       usbvision->ctrl_urb_setup.bRequest     = USBVISION_OP_CODE;
+       usbvision->ctrl_urb_setup.wValue       = 0;
+       usbvision->ctrl_urb_setup.wIndex       = cpu_to_le16(address);
+       usbvision->ctrl_urb_setup.wLength      = cpu_to_le16(len);
+       usb_fill_control_urb (usbvision->ctrl_urb, usbvision->dev,
                                                        usb_sndctrlpipe(usbvision->dev, 1),
-                                                       (unsigned char *)&usbvision->ctrlUrbSetup,
-                                                       (void *)usbvision->ctrlUrbBuffer, len,
-                                                       usbvision_ctrlUrb_complete,
+                                                       (unsigned char *)&usbvision->ctrl_urb_setup,
+                                                       (void *)usbvision->ctrl_urb_buffer, len,
+                                                       usbvision_ctrl_urb_complete,
                                                        (void *)usbvision);
 
-       memcpy(usbvision->ctrlUrbBuffer, data, len);
+       memcpy(usbvision->ctrl_urb_buffer, data, len);
 
-       errCode = usb_submit_urb(usbvision->ctrlUrb, GFP_ATOMIC);
-       if (errCode < 0) {
+       err_code = usb_submit_urb(usbvision->ctrl_urb, GFP_ATOMIC);
+       if (err_code < 0) {
                // error in usb_submit_urb()
-               usbvision->ctrlUrbBusy = 0;
+               usbvision->ctrl_urb_busy = 0;
        }
-       PDEBUG(DBG_IRQ, "submit %d byte: error %d", len, errCode);
-       return errCode;
+       PDEBUG(DBG_IRQ, "submit %d byte: error %d", len, err_code);
+       return err_code;
 }
 
 
 static int usbvision_init_compression(struct usb_usbvision *usbvision)
 {
-       int errCode = 0;
-
-       usbvision->lastIsocFrameNum = -1;
-       usbvision->isocDataCount = 0;
-       usbvision->isocPacketCount = 0;
-       usbvision->isocSkipCount = 0;
-       usbvision->comprLevel = 50;
-       usbvision->lastComprLevel = -1;
-       usbvision->isocUrbCount = 0;
-       usbvision->requestIntra = 1;
-       usbvision->isocMeasureBandwidthCount = 0;
-
-       return errCode;
+       int err_code = 0;
+
+       usbvision->last_isoc_frame_num = -1;
+       usbvision->isoc_data_count = 0;
+       usbvision->isoc_packet_count = 0;
+       usbvision->isoc_skip_count = 0;
+       usbvision->compr_level = 50;
+       usbvision->last_compr_level = -1;
+       usbvision->isoc_urb_count = 0;
+       usbvision->request_intra = 1;
+       usbvision->isoc_measure_bandwidth_count = 0;
+
+       return err_code;
 }
 
 /* this function measures the used bandwidth since last call
  * return:    0 : no error
- * sets usedBandwidth to 1-100 : 1-100% of full bandwidth resp. to isocPacketSize
+ * sets used_bandwidth to 1-100 : 1-100% of full bandwidth resp. to isoc_packet_size
  */
 static int usbvision_measure_bandwidth (struct usb_usbvision *usbvision)
 {
-       int errCode = 0;
-
-       if (usbvision->isocMeasureBandwidthCount < 2) { // this gives an average bandwidth of 3 frames
-               usbvision->isocMeasureBandwidthCount++;
-               return errCode;
-       }
-       if ((usbvision->isocPacketSize > 0) && (usbvision->isocPacketCount > 0)) {
-               usbvision->usedBandwidth = usbvision->isocDataCount /
-                                       (usbvision->isocPacketCount + usbvision->isocSkipCount) *
-                                       100 / usbvision->isocPacketSize;
-       }
-       usbvision->isocMeasureBandwidthCount = 0;
-       usbvision->isocDataCount = 0;
-       usbvision->isocPacketCount = 0;
-       usbvision->isocSkipCount = 0;
-       return errCode;
+       int err_code = 0;
+
+       if (usbvision->isoc_measure_bandwidth_count < 2) { // this gives an average bandwidth of 3 frames
+               usbvision->isoc_measure_bandwidth_count++;
+               return err_code;
+       }
+       if ((usbvision->isoc_packet_size > 0) && (usbvision->isoc_packet_count > 0)) {
+               usbvision->used_bandwidth = usbvision->isoc_data_count /
+                                       (usbvision->isoc_packet_count + usbvision->isoc_skip_count) *
+                                       100 / usbvision->isoc_packet_size;
+       }
+       usbvision->isoc_measure_bandwidth_count = 0;
+       usbvision->isoc_data_count = 0;
+       usbvision->isoc_packet_count = 0;
+       usbvision->isoc_skip_count = 0;
+       return err_code;
 }
 
 static int usbvision_adjust_compression (struct usb_usbvision *usbvision)
 {
-       int errCode = 0;
+       int err_code = 0;
        unsigned char buffer[6];
 
        PDEBUG(DBG_IRQ, "");
-       if ((adjustCompression) && (usbvision->usedBandwidth > 0)) {
-               usbvision->comprLevel += (usbvision->usedBandwidth - 90) / 2;
-               RESTRICT_TO_RANGE(usbvision->comprLevel, 0, 100);
-               if (usbvision->comprLevel != usbvision->lastComprLevel) {
+       if ((adjust_compression) && (usbvision->used_bandwidth > 0)) {
+               usbvision->compr_level += (usbvision->used_bandwidth - 90) / 2;
+               RESTRICT_TO_RANGE(usbvision->compr_level, 0, 100);
+               if (usbvision->compr_level != usbvision->last_compr_level) {
                        int distorsion;
-                       if (usbvision->bridgeType == BRIDGE_NT1004 || usbvision->bridgeType == BRIDGE_NT1005) {
-                               buffer[0] = (unsigned char)(4 + 16 * usbvision->comprLevel / 100);      // PCM Threshold 1
-                               buffer[1] = (unsigned char)(4 + 8 * usbvision->comprLevel / 100);       // PCM Threshold 2
-                               distorsion = 7 + 248 * usbvision->comprLevel / 100;
+                       if (usbvision->bridge_type == BRIDGE_NT1004 || usbvision->bridge_type == BRIDGE_NT1005) {
+                               buffer[0] = (unsigned char)(4 + 16 * usbvision->compr_level / 100);     // PCM Threshold 1
+                               buffer[1] = (unsigned char)(4 + 8 * usbvision->compr_level / 100);      // PCM Threshold 2
+                               distorsion = 7 + 248 * usbvision->compr_level / 100;
                                buffer[2] = (unsigned char)(distorsion & 0xFF);                         // Average distorsion Threshold (inter)
                                buffer[3] = (unsigned char)(distorsion & 0xFF);                         // Average distorsion Threshold (intra)
-                               distorsion = 1 + 42 * usbvision->comprLevel / 100;
+                               distorsion = 1 + 42 * usbvision->compr_level / 100;
                                buffer[4] = (unsigned char)(distorsion & 0xFF);                         // Maximum distorsion Threshold (inter)
                                buffer[5] = (unsigned char)(distorsion & 0xFF);                         // Maximum distorsion Threshold (intra)
                        }
                        else { //BRIDGE_NT1003
-                               buffer[0] = (unsigned char)(4 + 16 * usbvision->comprLevel / 100);      // PCM threshold 1
-                               buffer[1] = (unsigned char)(4 + 8 * usbvision->comprLevel / 100);       // PCM threshold 2
-                               distorsion = 2 + 253 * usbvision->comprLevel / 100;
+                               buffer[0] = (unsigned char)(4 + 16 * usbvision->compr_level / 100);     // PCM threshold 1
+                               buffer[1] = (unsigned char)(4 + 8 * usbvision->compr_level / 100);      // PCM threshold 2
+                               distorsion = 2 + 253 * usbvision->compr_level / 100;
                                buffer[2] = (unsigned char)(distorsion & 0xFF);                         // distorsion threshold bit0-7
                                buffer[3] = 0;  //(unsigned char)((distorsion >> 8) & 0x0F);            // distorsion threshold bit 8-11
-                               distorsion = 0 + 43 * usbvision->comprLevel / 100;
+                               distorsion = 0 + 43 * usbvision->compr_level / 100;
                                buffer[4] = (unsigned char)(distorsion & 0xFF);                         // maximum distorsion bit0-7
                                buffer[5] = 0; //(unsigned char)((distorsion >> 8) & 0x01);             // maximum distorsion bit 8
                        }
-                       errCode = usbvision_write_reg_irq(usbvision, USBVISION_PCM_THR1, buffer, 6);
-                       if (errCode == 0){
+                       err_code = usbvision_write_reg_irq(usbvision, USBVISION_PCM_THR1, buffer, 6);
+                       if (err_code == 0){
                                PDEBUG(DBG_IRQ, "new compr params %#02x %#02x %#02x %#02x %#02x %#02x", buffer[0],
                                                                buffer[1], buffer[2], buffer[3], buffer[4], buffer[5]);
-                               usbvision->lastComprLevel = usbvision->comprLevel;
+                               usbvision->last_compr_level = usbvision->compr_level;
                        }
                }
        }
-       return errCode;
+       return err_code;
 }
 
 static int usbvision_request_intra (struct usb_usbvision *usbvision)
 {
-       int errCode = 0;
+       int err_code = 0;
        unsigned char buffer[1];
 
        PDEBUG(DBG_IRQ, "");
-       usbvision->requestIntra = 1;
+       usbvision->request_intra = 1;
        buffer[0] = 1;
        usbvision_write_reg_irq(usbvision, USBVISION_FORCE_INTRA, buffer, 1);
-       return errCode;
+       return err_code;
 }
 
 static int usbvision_unrequest_intra (struct usb_usbvision *usbvision)
 {
-       int errCode = 0;
+       int err_code = 0;
        unsigned char buffer[1];
 
        PDEBUG(DBG_IRQ, "");
-       usbvision->requestIntra = 0;
+       usbvision->request_intra = 0;
        buffer[0] = 0;
        usbvision_write_reg_irq(usbvision, USBVISION_FORCE_INTRA, buffer, 1);
-       return errCode;
+       return err_code;
 }
 
 /*******************************
@@ -1744,16 +1744,16 @@ static int usbvision_unrequest_intra (struct usb_usbvision *usbvision)
 
 int usbvision_power_off(struct usb_usbvision *usbvision)
 {
-       int errCode = 0;
+       int err_code = 0;
 
        PDEBUG(DBG_FUNC, "");
 
-       errCode = usbvision_write_reg(usbvision, USBVISION_PWR_REG, USBVISION_SSPND_EN);
-       if (errCode == 1) {
+       err_code = usbvision_write_reg(usbvision, USBVISION_PWR_REG, USBVISION_SSPND_EN);
+       if (err_code == 1) {
                usbvision->power = 0;
        }
-       PDEBUG(DBG_FUNC, "%s: errCode %d", (errCode!=1)?"ERROR":"power is off", errCode);
-       return errCode;
+       PDEBUG(DBG_FUNC, "%s: err_code %d", (err_code!=1)?"ERROR":"power is off", err_code);
+       return err_code;
 }
 
 /*
@@ -1769,7 +1769,7 @@ static int usbvision_set_video_format(struct usb_usbvision *usbvision, int forma
        if (!USBVISION_IS_OPERATIONAL(usbvision))
                return 0;
 
-       PDEBUG(DBG_FUNC, "isocMode %#02x", format);
+       PDEBUG(DBG_FUNC, "isoc_mode %#02x", format);
 
        if ((format != ISOC_MODE_YUV422)
            && (format != ISOC_MODE_YUV420)
@@ -1790,7 +1790,7 @@ static int usbvision_set_video_format(struct usb_usbvision *usbvision, int forma
                printk(KERN_ERR "%s: ERROR=%d. USBVISION stopped - "
                       "reconnect or reload driver.\n", proc, rc);
        }
-       usbvision->isocMode = format;
+       usbvision->isoc_mode = format;
        return rc;
 }
 
@@ -1802,9 +1802,9 @@ static int usbvision_set_video_format(struct usb_usbvision *usbvision, int forma
 int usbvision_set_output(struct usb_usbvision *usbvision, int width,
                         int height)
 {
-       int errCode = 0;
-       int UsbWidth, UsbHeight;
-       unsigned int frameRate=0, frameDrop=0;
+       int err_code = 0;
+       int usb_width, usb_height;
+       unsigned int frame_rate=0, frame_drop=0;
        unsigned char value[4];
 
        if (!USBVISION_IS_OPERATIONAL(usbvision)) {
@@ -1812,86 +1812,86 @@ int usbvision_set_output(struct usb_usbvision *usbvision, int width,
        }
 
        if (width > MAX_USB_WIDTH) {
-               UsbWidth = width / 2;
+               usb_width = width / 2;
                usbvision->stretch_width = 2;
        }
        else {
-               UsbWidth = width;
+               usb_width = width;
                usbvision->stretch_width = 1;
        }
 
        if (height > MAX_USB_HEIGHT) {
-               UsbHeight = height / 2;
+               usb_height = height / 2;
                usbvision->stretch_height = 2;
        }
        else {
-               UsbHeight = height;
+               usb_height = height;
                usbvision->stretch_height = 1;
        }
 
-       RESTRICT_TO_RANGE(UsbWidth, MIN_FRAME_WIDTH, MAX_USB_WIDTH);
-       UsbWidth &= ~(MIN_FRAME_WIDTH-1);
-       RESTRICT_TO_RANGE(UsbHeight, MIN_FRAME_HEIGHT, MAX_USB_HEIGHT);
-       UsbHeight &= ~(1);
+       RESTRICT_TO_RANGE(usb_width, MIN_FRAME_WIDTH, MAX_USB_WIDTH);
+       usb_width &= ~(MIN_FRAME_WIDTH-1);
+       RESTRICT_TO_RANGE(usb_height, MIN_FRAME_HEIGHT, MAX_USB_HEIGHT);
+       usb_height &= ~(1);
 
        PDEBUG(DBG_FUNC, "usb %dx%d; screen %dx%d; stretch %dx%d",
-                                               UsbWidth, UsbHeight, width, height,
+                                               usb_width, usb_height, width, height,
                                                usbvision->stretch_width, usbvision->stretch_height);
 
        /* I'll not rewrite the same values */
-       if ((UsbWidth != usbvision->curwidth) || (UsbHeight != usbvision->curheight)) {
-               value[0] = UsbWidth & 0xff;             //LSB
-               value[1] = (UsbWidth >> 8) & 0x03;      //MSB
-               value[2] = UsbHeight & 0xff;            //LSB
-               value[3] = (UsbHeight >> 8) & 0x03;     //MSB
+       if ((usb_width != usbvision->curwidth) || (usb_height != usbvision->curheight)) {
+               value[0] = usb_width & 0xff;            //LSB
+               value[1] = (usb_width >> 8) & 0x03;     //MSB
+               value[2] = usb_height & 0xff;           //LSB
+               value[3] = (usb_height >> 8) & 0x03;    //MSB
 
-               errCode = usb_control_msg(usbvision->dev, usb_sndctrlpipe(usbvision->dev, 1),
+               err_code = usb_control_msg(usbvision->dev, usb_sndctrlpipe(usbvision->dev, 1),
                             USBVISION_OP_CODE,
                             USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_ENDPOINT,
                                 0, (__u16) USBVISION_LXSIZE_O, value, 4, HZ);
 
-               if (errCode < 0) {
+               if (err_code < 0) {
                        dev_err(&usbvision->dev->dev,
-                               "%s failed: error %d\n", __func__, errCode);
-                       return errCode;
+                               "%s failed: error %d\n", __func__, err_code);
+                       return err_code;
                }
-               usbvision->curwidth = usbvision->stretch_width * UsbWidth;
-               usbvision->curheight = usbvision->stretch_height * UsbHeight;
+               usbvision->curwidth = usbvision->stretch_width * usb_width;
+               usbvision->curheight = usbvision->stretch_height * usb_height;
        }
 
-       if (usbvision->isocMode == ISOC_MODE_YUV422) {
-               frameRate = (usbvision->isocPacketSize * 1000) / (UsbWidth * UsbHeight * 2);
+       if (usbvision->isoc_mode == ISOC_MODE_YUV422) {
+               frame_rate = (usbvision->isoc_packet_size * 1000) / (usb_width * usb_height * 2);
        }
-       else if (usbvision->isocMode == ISOC_MODE_YUV420) {
-               frameRate = (usbvision->isocPacketSize * 1000) / ((UsbWidth * UsbHeight * 12) / 8);
+       else if (usbvision->isoc_mode == ISOC_MODE_YUV420) {
+               frame_rate = (usbvision->isoc_packet_size * 1000) / ((usb_width * usb_height * 12) / 8);
        }
        else {
-               frameRate = FRAMERATE_MAX;
+               frame_rate = FRAMERATE_MAX;
        }
 
-       if (usbvision->tvnormId & V4L2_STD_625_50) {
-               frameDrop = frameRate * 32 / 25 - 1;
+       if (usbvision->tvnorm_id & V4L2_STD_625_50) {
+               frame_drop = frame_rate * 32 / 25 - 1;
        }
-       else if (usbvision->tvnormId & V4L2_STD_525_60) {
-               frameDrop = frameRate * 32 / 30 - 1;
+       else if (usbvision->tvnorm_id & V4L2_STD_525_60) {
+               frame_drop = frame_rate * 32 / 30 - 1;
        }
 
-       RESTRICT_TO_RANGE(frameDrop, FRAMERATE_MIN, FRAMERATE_MAX);
+       RESTRICT_TO_RANGE(frame_drop, FRAMERATE_MIN, FRAMERATE_MAX);
 
-       PDEBUG(DBG_FUNC, "frameRate %d fps, frameDrop %d", frameRate, frameDrop);
+       PDEBUG(DBG_FUNC, "frame_rate %d fps, frame_drop %d", frame_rate, frame_drop);
 
-       frameDrop = FRAMERATE_MAX;      // We can allow the maximum here, because dropping is controlled
+       frame_drop = FRAMERATE_MAX;     // We can allow the maximum here, because dropping is controlled
 
-       /* frameDrop = 7; => framePhase = 1, 5, 9, 13, 17, 21, 25, 0, 4, 8, ...
-               => frameSkip = 4;
-               => frameRate = (7 + 1) * 25 / 32 = 200 / 32 = 6.25;
+       /* frame_drop = 7; => frame_phase = 1, 5, 9, 13, 17, 21, 25, 0, 4, 8, ...
+               => frame_skip = 4;
+               => frame_rate = (7 + 1) * 25 / 32 = 200 / 32 = 6.25;
 
-          frameDrop = 9; => framePhase = 1, 5, 8, 11, 14, 17, 21, 24, 27, 1, 4, 8, ...
-           => frameSkip = 4, 3, 3, 3, 3, 4, 3, 3, 3, 3, 4, ...
-               => frameRate = (9 + 1) * 25 / 32 = 250 / 32 = 7.8125;
+          frame_drop = 9; => frame_phase = 1, 5, 8, 11, 14, 17, 21, 24, 27, 1, 4, 8, ...
+           => frame_skip = 4, 3, 3, 3, 3, 4, 3, 3, 3, 3, 4, ...
+               => frame_rate = (9 + 1) * 25 / 32 = 250 / 32 = 7.8125;
        */
-       errCode = usbvision_write_reg(usbvision, USBVISION_FRM_RATE, frameDrop);
-       return errCode;
+       err_code = usbvision_write_reg(usbvision, USBVISION_FRM_RATE, frame_drop);
+       return err_code;
 }
 
 
@@ -1925,7 +1925,7 @@ int usbvision_frames_alloc(struct usb_usbvision *usbvision, int number_of_frames
        /* Allocate all buffers */
        for (i = 0; i < usbvision->num_frames; i++) {
                usbvision->frame[i].index = i;
-               usbvision->frame[i].grabstate = FrameState_Unused;
+               usbvision->frame[i].grabstate = frame_state_unused;
                usbvision->frame[i].data = usbvision->fbuf +
                        i * usbvision->max_frame_size;
                /*
@@ -1969,7 +1969,7 @@ void usbvision_empty_framequeues(struct usb_usbvision *usbvision)
        INIT_LIST_HEAD(&(usbvision->outqueue));
 
        for (i = 0; i < USBVISION_NUMFRAMES; i++) {
-               usbvision->frame[i].grabstate = FrameState_Unused;
+               usbvision->frame[i].grabstate = frame_state_unused;
                usbvision->frame[i].bytes_read = 0;
        }
 }
@@ -1984,9 +1984,9 @@ int usbvision_stream_interrupt(struct usb_usbvision *usbvision)
 
        /* stop reading from the device */
 
-       usbvision->streaming = Stream_Interrupt;
+       usbvision->streaming = stream_interrupt;
        ret = wait_event_timeout(usbvision->wait_stream,
-                                (usbvision->streaming == Stream_Idle),
+                                (usbvision->streaming == stream_idle),
                                 msecs_to_jiffies(USBVISION_NUMSBUF*USBVISION_URB_FRAMES));
        return ret;
 }
@@ -2030,7 +2030,7 @@ static int usbvision_set_compress_params(struct usb_usbvision *usbvision)
                return rc;
        }
 
-       if (usbvision->bridgeType == BRIDGE_NT1004) {
+       if (usbvision->bridge_type == BRIDGE_NT1004) {
                value[0] =  20; // PCM Threshold 1
                value[1] =  12; // PCM Threshold 2
                value[2] = 255; // Distorsion Threshold inter
@@ -2085,9 +2085,9 @@ int usbvision_set_input(struct usb_usbvision *usbvision)
                return 0;
 
        /* Set input format expected from decoder*/
-       if (usbvision_device_data[usbvision->DevModel].Vin_Reg1_override) {
-               value[0] = usbvision_device_data[usbvision->DevModel].Vin_Reg1;
-       } else if(usbvision_device_data[usbvision->DevModel].Codec == CODEC_SAA7113) {
+       if (usbvision_device_data[usbvision->dev_model].vin_reg1_override) {
+               value[0] = usbvision_device_data[usbvision->dev_model].vin_reg1;
+       } else if(usbvision_device_data[usbvision->dev_model].codec == CODEC_SAA7113) {
                /* SAA7113 uses 8 bit output */
                value[0] = USBVISION_8_422_SYNC;
        } else {
@@ -2105,7 +2105,7 @@ int usbvision_set_input(struct usb_usbvision *usbvision)
        }
 
 
-       if (usbvision->tvnormId & V4L2_STD_PAL) {
+       if (usbvision->tvnorm_id & V4L2_STD_PAL) {
                value[0] = 0xC0;
                value[1] = 0x02;        //0x02C0 -> 704 Input video line length
                value[2] = 0x20;
@@ -2114,7 +2114,7 @@ int usbvision_set_input(struct usb_usbvision *usbvision)
                value[5] = 0x00;        //0x0060 -> 96 Input video h offset
                value[6] = 0x16;
                value[7] = 0x00;        //0x0016 -> 22 Input video v offset
-       } else if (usbvision->tvnormId & V4L2_STD_SECAM) {
+       } else if (usbvision->tvnorm_id & V4L2_STD_SECAM) {
                value[0] = 0xC0;
                value[1] = 0x02;        //0x02C0 -> 704 Input video line length
                value[2] = 0x20;
@@ -2134,24 +2134,24 @@ int usbvision_set_input(struct usb_usbvision *usbvision)
                value[7] = 0x00;        //0x0010 -> 16 Input video v offset
        }
 
-       if (usbvision_device_data[usbvision->DevModel].X_Offset >= 0) {
-               value[4]=usbvision_device_data[usbvision->DevModel].X_Offset & 0xff;
-               value[5]=(usbvision_device_data[usbvision->DevModel].X_Offset & 0x0300) >> 8;
+       if (usbvision_device_data[usbvision->dev_model].x_offset >= 0) {
+               value[4]=usbvision_device_data[usbvision->dev_model].x_offset & 0xff;
+               value[5]=(usbvision_device_data[usbvision->dev_model].x_offset & 0x0300) >> 8;
        }
 
-       if (adjust_X_Offset != -1) {
-               value[4] = adjust_X_Offset & 0xff;
-               value[5] = (adjust_X_Offset & 0x0300) >> 8;
+       if (adjust_x_offset != -1) {
+               value[4] = adjust_x_offset & 0xff;
+               value[5] = (adjust_x_offset & 0x0300) >> 8;
        }
 
-       if (usbvision_device_data[usbvision->DevModel].Y_Offset >= 0) {
-               value[6]=usbvision_device_data[usbvision->DevModel].Y_Offset & 0xff;
-               value[7]=(usbvision_device_data[usbvision->DevModel].Y_Offset & 0x0300) >> 8;
+       if (usbvision_device_data[usbvision->dev_model].y_offset >= 0) {
+               value[6]=usbvision_device_data[usbvision->dev_model].y_offset & 0xff;
+               value[7]=(usbvision_device_data[usbvision->dev_model].y_offset & 0x0300) >> 8;
        }
 
-       if (adjust_Y_Offset != -1) {
-               value[6] = adjust_Y_Offset & 0xff;
-               value[7] = (adjust_Y_Offset & 0x0300) >> 8;
+       if (adjust_y_offset != -1) {
+               value[6] = adjust_y_offset & 0xff;
+               value[7] = (adjust_y_offset & 0x0300) >> 8;
        }
 
        rc = usb_control_msg(usbvision->dev, usb_sndctrlpipe(usbvision->dev, 1),
@@ -2167,10 +2167,10 @@ int usbvision_set_input(struct usb_usbvision *usbvision)
 
        dvi_yuv_value = 0x00;   /* U comes after V, Ya comes after U/V, Yb comes after Yb */
 
-       if(usbvision_device_data[usbvision->DevModel].Dvi_yuv_override){
-               dvi_yuv_value = usbvision_device_data[usbvision->DevModel].Dvi_yuv;
+       if(usbvision_device_data[usbvision->dev_model].dvi_yuv_override){
+               dvi_yuv_value = usbvision_device_data[usbvision->dev_model].dvi_yuv;
        }
-       else if(usbvision_device_data[usbvision->DevModel].Codec == CODEC_SAA7113) {
+       else if(usbvision_device_data[usbvision->dev_model].codec == CODEC_SAA7113) {
        /* This changes as the fine sync control changes. Further investigation necessary */
                dvi_yuv_value = 0x06;
        }
@@ -2192,7 +2192,7 @@ static int usbvision_set_dram_settings(struct usb_usbvision *usbvision)
        int rc;
        unsigned char value[8];
 
-       if (usbvision->isocMode == ISOC_MODE_COMPRESS) {
+       if (usbvision->isoc_mode == ISOC_MODE_COMPRESS) {
                value[0] = 0x42;
                value[1] = 0x71;
                value[2] = 0xff;
@@ -2261,7 +2261,7 @@ static int usbvision_set_dram_settings(struct usb_usbvision *usbvision)
 
 int usbvision_power_on(struct usb_usbvision *usbvision)
 {
-       int errCode = 0;
+       int err_code = 0;
 
        PDEBUG(DBG_FUNC, "");
 
@@ -2271,13 +2271,13 @@ int usbvision_power_on(struct usb_usbvision *usbvision)
 
        usbvision_write_reg(usbvision, USBVISION_PWR_REG,
                         USBVISION_SSPND_EN | USBVISION_PWR_VID);
-       errCode = usbvision_write_reg(usbvision, USBVISION_PWR_REG,
+       err_code = usbvision_write_reg(usbvision, USBVISION_PWR_REG,
                                                USBVISION_SSPND_EN | USBVISION_PWR_VID | USBVISION_RES2);
-       if (errCode == 1) {
+       if (err_code == 1) {
                usbvision->power = 1;
        }
-       PDEBUG(DBG_FUNC, "%s: errCode %d", (errCode<0)?"ERROR":"power is on", errCode);
-       return errCode;
+       PDEBUG(DBG_FUNC, "%s: err_code %d", (err_code<0)?"ERROR":"power is on", err_code);
+       return err_code;
 }
 
 
@@ -2288,7 +2288,7 @@ int usbvision_power_on(struct usb_usbvision *usbvision)
 // to call usbvision_power_off from task queue
 static void call_usbvision_power_off(struct work_struct *work)
 {
-       struct usb_usbvision *usbvision = container_of(work, struct usb_usbvision, powerOffWork);
+       struct usb_usbvision *usbvision = container_of(work, struct usb_usbvision, power_off_work);
 
        PDEBUG(DBG_FUNC, "");
        if (mutex_lock_interruptible(&usbvision->v4l2_lock))
@@ -2303,32 +2303,32 @@ static void call_usbvision_power_off(struct work_struct *work)
        mutex_unlock(&usbvision->v4l2_lock);
 }
 
-static void usbvision_powerOffTimer(unsigned long data)
+static void usbvision_power_off_timer(unsigned long data)
 {
        struct usb_usbvision *usbvision = (void *) data;
 
        PDEBUG(DBG_FUNC, "");
-       del_timer(&usbvision->powerOffTimer);
-       INIT_WORK(&usbvision->powerOffWork, call_usbvision_power_off);
-       (void) schedule_work(&usbvision->powerOffWork);
+       del_timer(&usbvision->power_off_timer);
+       INIT_WORK(&usbvision->power_off_work, call_usbvision_power_off);
+       (void) schedule_work(&usbvision->power_off_work);
 }
 
-void usbvision_init_powerOffTimer(struct usb_usbvision *usbvision)
+void usbvision_init_power_off_timer(struct usb_usbvision *usbvision)
 {
-       init_timer(&usbvision->powerOffTimer);
-       usbvision->powerOffTimer.data = (long) usbvision;
-       usbvision->powerOffTimer.function = usbvision_powerOffTimer;
+       init_timer(&usbvision->power_off_timer);
+       usbvision->power_off_timer.data = (long) usbvision;
+       usbvision->power_off_timer.function = usbvision_power_off_timer;
 }
 
-void usbvision_set_powerOffTimer(struct usb_usbvision *usbvision)
+void usbvision_set_power_off_timer(struct usb_usbvision *usbvision)
 {
-       mod_timer(&usbvision->powerOffTimer, jiffies + USBVISION_POWEROFF_TIME);
+       mod_timer(&usbvision->power_off_timer, jiffies + USBVISION_POWEROFF_TIME);
 }
 
-void usbvision_reset_powerOffTimer(struct usb_usbvision *usbvision)
+void usbvision_reset_power_off_timer(struct usb_usbvision *usbvision)
 {
-       if (timer_pending(&usbvision->powerOffTimer)) {
-               del_timer(&usbvision->powerOffTimer);
+       if (timer_pending(&usbvision->power_off_timer)) {
+               del_timer(&usbvision->power_off_timer);
        }
 }
 
@@ -2339,14 +2339,14 @@ void usbvision_reset_powerOffTimer(struct usb_usbvision *usbvision)
  */
 int usbvision_begin_streaming(struct usb_usbvision *usbvision)
 {
-       int errCode = 0;
+       int err_code = 0;
 
-       if (usbvision->isocMode == ISOC_MODE_COMPRESS) {
+       if (usbvision->isoc_mode == ISOC_MODE_COMPRESS) {
                usbvision_init_compression(usbvision);
        }
-       errCode = usbvision_write_reg(usbvision, USBVISION_VIN_REG2, USBVISION_NOHVALID |
-                                                                               usbvision->Vin_Reg2_Preset);
-       return errCode;
+       err_code = usbvision_write_reg(usbvision, USBVISION_VIN_REG2, USBVISION_NOHVALID |
+                                                                               usbvision->vin_reg2_preset);
+       return err_code;
 }
 
 /*
@@ -2373,7 +2373,7 @@ int usbvision_restart_isoc(struct usb_usbvision *usbvision)
            (ret =
             usbvision_write_reg(usbvision, USBVISION_VIN_REG2,
                              USBVISION_KEEP_BLANK | USBVISION_NOHVALID |
-                                 usbvision->Vin_Reg2_Preset)) < 0) return ret;
+                                 usbvision->vin_reg2_preset)) < 0) return ret;
 
        /* TODO: schedule timeout */
        while ((usbvision_read_reg(usbvision, USBVISION_STATUS_REG) & 0x01) != 1);
@@ -2387,20 +2387,20 @@ int usbvision_audio_off(struct usb_usbvision *usbvision)
                printk(KERN_ERR "usbvision_audio_off: can't wirte reg\n");
                return -1;
        }
-       usbvision->AudioMute = 0;
-       usbvision->AudioChannel = USBVISION_AUDIO_MUTE;
+       usbvision->audio_mute = 0;
+       usbvision->audio_channel = USBVISION_AUDIO_MUTE;
        return 0;
 }
 
-int usbvision_set_audio(struct usb_usbvision *usbvision, int AudioChannel)
+int usbvision_set_audio(struct usb_usbvision *usbvision, int audio_channel)
 {
-       if (!usbvision->AudioMute) {
-               if (usbvision_write_reg(usbvision, USBVISION_IOPIN_REG, AudioChannel) < 0) {
+       if (!usbvision->audio_mute) {
+               if (usbvision_write_reg(usbvision, USBVISION_IOPIN_REG, audio_channel) < 0) {
                        printk(KERN_ERR "usbvision_set_audio: can't write iopin register for audio switching\n");
                        return -1;
                }
        }
-       usbvision->AudioChannel = AudioChannel;
+       usbvision->audio_channel = audio_channel;
        return 0;
 }
 
@@ -2419,27 +2419,27 @@ int usbvision_setup(struct usb_usbvision *usbvision,int format)
 
 int usbvision_set_alternate(struct usb_usbvision *dev)
 {
-       int errCode, prev_alt = dev->ifaceAlt;
+       int err_code, prev_alt = dev->iface_alt;
        int i;
 
-       dev->ifaceAlt=0;
+       dev->iface_alt=0;
        for(i=0;i< dev->num_alt; i++)
-               if(dev->alt_max_pkt_size[i]>dev->alt_max_pkt_size[dev->ifaceAlt])
-                       dev->ifaceAlt=i;
-
-       if (dev->ifaceAlt != prev_alt) {
-               dev->isocPacketSize = dev->alt_max_pkt_size[dev->ifaceAlt];
-               PDEBUG(DBG_FUNC,"setting alternate %d with wMaxPacketSize=%u", dev->ifaceAlt,dev->isocPacketSize);
-               errCode = usb_set_interface(dev->dev, dev->iface, dev->ifaceAlt);
-               if (errCode < 0) {
+               if(dev->alt_max_pkt_size[i]>dev->alt_max_pkt_size[dev->iface_alt])
+                       dev->iface_alt=i;
+
+       if (dev->iface_alt != prev_alt) {
+               dev->isoc_packet_size = dev->alt_max_pkt_size[dev->iface_alt];
+               PDEBUG(DBG_FUNC,"setting alternate %d with max_packet_size=%u", dev->iface_alt,dev->isoc_packet_size);
+               err_code = usb_set_interface(dev->dev, dev->iface, dev->iface_alt);
+               if (err_code < 0) {
                        dev_err(&dev->dev->dev,
                                "cannot change alternate number to %d (error=%i)\n",
-                                       dev->ifaceAlt, errCode);
-                       return errCode;
+                                       dev->iface_alt, err_code);
+                       return err_code;
                }
        }
 
-       PDEBUG(DBG_ISOC, "ISO Packet Length:%d", dev->isocPacketSize);
+       PDEBUG(DBG_ISOC, "ISO Packet Length:%d", dev->isoc_packet_size);
 
        return 0;
 }
@@ -2451,27 +2451,27 @@ int usbvision_set_alternate(struct usb_usbvision *dev)
 int usbvision_init_isoc(struct usb_usbvision *usbvision)
 {
        struct usb_device *dev = usbvision->dev;
-       int bufIdx, errCode, regValue;
+       int buf_idx, err_code, reg_value;
        int sb_size;
 
        if (!USBVISION_IS_OPERATIONAL(usbvision))
                return -EFAULT;
 
-       usbvision->curFrame = NULL;
+       usbvision->cur_frame = NULL;
        scratch_reset(usbvision);
 
        /* Alternate interface 1 is is the biggest frame size */
-       errCode = usbvision_set_alternate(usbvision);
-       if (errCode < 0) {
-               usbvision->last_error = errCode;
+       err_code = usbvision_set_alternate(usbvision);
+       if (err_code < 0) {
+               usbvision->last_error = err_code;
                return -EBUSY;
        }
-       sb_size = USBVISION_URB_FRAMES * usbvision->isocPacketSize;
+       sb_size = USBVISION_URB_FRAMES * usbvision->isoc_packet_size;
 
-       regValue = (16 - usbvision_read_reg(usbvision,
+       reg_value = (16 - usbvision_read_reg(usbvision,
                                            USBVISION_ALTER_REG)) & 0x0F;
 
-       usbvision->usb_bandwidth = regValue >> 1;
+       usbvision->usb_bandwidth = reg_value >> 1;
        PDEBUG(DBG_ISOC, "USB Bandwidth Usage: %dMbit/Sec",
               usbvision->usb_bandwidth);
 
@@ -2479,7 +2479,7 @@ int usbvision_init_isoc(struct usb_usbvision *usbvision)
 
        /* We double buffer the Iso lists */
 
-       for (bufIdx = 0; bufIdx < USBVISION_NUMSBUF; bufIdx++) {
+       for (buf_idx = 0; buf_idx < USBVISION_NUMSBUF; buf_idx++) {
                int j, k;
                struct urb *urb;
 
@@ -2489,8 +2489,8 @@ int usbvision_init_isoc(struct usb_usbvision *usbvision)
                                "%s: usb_alloc_urb() failed\n", __func__);
                        return -ENOMEM;
                }
-               usbvision->sbuf[bufIdx].urb = urb;
-               usbvision->sbuf[bufIdx].data =
+               usbvision->sbuf[buf_idx].urb = urb;
+               usbvision->sbuf[buf_idx].data =
                        usb_alloc_coherent(usbvision->dev,
                                           sb_size,
                                           GFP_KERNEL,
@@ -2500,31 +2500,31 @@ int usbvision_init_isoc(struct usb_usbvision *usbvision)
                urb->pipe = usb_rcvisocpipe(dev, usbvision->video_endp);
                urb->transfer_flags = URB_ISO_ASAP | URB_NO_TRANSFER_DMA_MAP;
                urb->interval = 1;
-               urb->transfer_buffer = usbvision->sbuf[bufIdx].data;
-               urb->complete = usbvision_isocIrq;
+               urb->transfer_buffer = usbvision->sbuf[buf_idx].data;
+               urb->complete = usbvision_isoc_irq;
                urb->number_of_packets = USBVISION_URB_FRAMES;
                urb->transfer_buffer_length =
-                   usbvision->isocPacketSize * USBVISION_URB_FRAMES;
+                   usbvision->isoc_packet_size * USBVISION_URB_FRAMES;
                for (j = k = 0; j < USBVISION_URB_FRAMES; j++,
-                    k += usbvision->isocPacketSize) {
+                    k += usbvision->isoc_packet_size) {
                        urb->iso_frame_desc[j].offset = k;
                        urb->iso_frame_desc[j].length =
-                               usbvision->isocPacketSize;
+                               usbvision->isoc_packet_size;
                }
        }
 
        /* Submit all URBs */
-       for (bufIdx = 0; bufIdx < USBVISION_NUMSBUF; bufIdx++) {
-                       errCode = usb_submit_urb(usbvision->sbuf[bufIdx].urb,
+       for (buf_idx = 0; buf_idx < USBVISION_NUMSBUF; buf_idx++) {
+                       err_code = usb_submit_urb(usbvision->sbuf[buf_idx].urb,
                                                 GFP_KERNEL);
-               if (errCode) {
+               if (err_code) {
                        dev_err(&usbvision->dev->dev,
                                "%s: usb_submit_urb(%d) failed: error %d\n",
-                                       __func__, bufIdx, errCode);
+                                       __func__, buf_idx, err_code);
                }
        }
 
-       usbvision->streaming = Stream_Idle;
+       usbvision->streaming = stream_idle;
        PDEBUG(DBG_ISOC, "%s: streaming=1 usbvision->video_endp=$%02x",
               __func__,
               usbvision->video_endp);
@@ -2540,47 +2540,47 @@ int usbvision_init_isoc(struct usb_usbvision *usbvision)
  */
 void usbvision_stop_isoc(struct usb_usbvision *usbvision)
 {
-       int bufIdx, errCode, regValue;
-       int sb_size = USBVISION_URB_FRAMES * usbvision->isocPacketSize;
+       int buf_idx, err_code, reg_value;
+       int sb_size = USBVISION_URB_FRAMES * usbvision->isoc_packet_size;
 
-       if ((usbvision->streaming == Stream_Off) || (usbvision->dev == NULL))
+       if ((usbvision->streaming == stream_off) || (usbvision->dev == NULL))
                return;
 
        /* Unschedule all of the iso td's */
-       for (bufIdx = 0; bufIdx < USBVISION_NUMSBUF; bufIdx++) {
-               usb_kill_urb(usbvision->sbuf[bufIdx].urb);
-               if (usbvision->sbuf[bufIdx].data){
+       for (buf_idx = 0; buf_idx < USBVISION_NUMSBUF; buf_idx++) {
+               usb_kill_urb(usbvision->sbuf[buf_idx].urb);
+               if (usbvision->sbuf[buf_idx].data){
                        usb_free_coherent(usbvision->dev,
                                          sb_size,
-                                         usbvision->sbuf[bufIdx].data,
-                                         usbvision->sbuf[bufIdx].urb->transfer_dma);
+                                         usbvision->sbuf[buf_idx].data,
+                                         usbvision->sbuf[buf_idx].urb->transfer_dma);
                }
-               usb_free_urb(usbvision->sbuf[bufIdx].urb);
-               usbvision->sbuf[bufIdx].urb = NULL;
+               usb_free_urb(usbvision->sbuf[buf_idx].urb);
+               usbvision->sbuf[buf_idx].urb = NULL;
        }
 
-       PDEBUG(DBG_ISOC, "%s: streaming=Stream_Off\n", __func__);
-       usbvision->streaming = Stream_Off;
+       PDEBUG(DBG_ISOC, "%s: streaming=stream_off\n", __func__);
+       usbvision->streaming = stream_off;
 
        if (!usbvision->remove_pending) {
 
                /* Set packet size to 0 */
-               usbvision->ifaceAlt=0;
-               errCode = usb_set_interface(usbvision->dev, usbvision->iface,
-                                           usbvision->ifaceAlt);
-               if (errCode < 0) {
+               usbvision->iface_alt=0;
+               err_code = usb_set_interface(usbvision->dev, usbvision->iface,
+                                           usbvision->iface_alt);
+               if (err_code < 0) {
                        dev_err(&usbvision->dev->dev,
                                "%s: usb_set_interface() failed: error %d\n",
-                                       __func__, errCode);
-                       usbvision->last_error = errCode;
+                                       __func__, err_code);
+                       usbvision->last_error = err_code;
                }
-               regValue = (16-usbvision_read_reg(usbvision, USBVISION_ALTER_REG)) & 0x0F;
-               usbvision->isocPacketSize =
-                       (regValue == 0) ? 0 : (regValue * 64) - 1;
+               reg_value = (16-usbvision_read_reg(usbvision, USBVISION_ALTER_REG)) & 0x0F;
+               usbvision->isoc_packet_size =
+                       (reg_value == 0) ? 0 : (reg_value * 64) - 1;
                PDEBUG(DBG_ISOC, "ISO Packet Length:%d",
-                      usbvision->isocPacketSize);
+                      usbvision->isoc_packet_size);
 
-               usbvision->usb_bandwidth = regValue >> 1;
+               usbvision->usb_bandwidth = reg_value >> 1;
                PDEBUG(DBG_ISOC, "USB Bandwidth Usage: %dMbit/Sec",
                       usbvision->usb_bandwidth);
        }
@@ -2604,12 +2604,12 @@ int usbvision_muxsel(struct usb_usbvision *usbvision, int channel)
        // Regular USB TV Tuners -> channel: 0 = Television, 1 = Composite, 2 = S-Video
        // Four video input devices -> channel: 0 = Chan White, 1 = Chan Green, 2 = Chan Yellow, 3 = Chan Red
 
-       switch (usbvision_device_data[usbvision->DevModel].Codec) {
+       switch (usbvision_device_data[usbvision->dev_model].codec) {
                case CODEC_SAA7113:
                        mode[1] = SAA7115_COMPOSITE2;
-                       if (SwitchSVideoInput) {
+                       if (switch_svideo_input) {
                                /* To handle problems with S-Video Input for
-                                * some devices.  Use SwitchSVideoInput
+                                * some devices.  Use switch_svideo_input
                                 * parameter when loading the module.*/
                                mode[2] = SAA7115_COMPOSITE1;
                        }
index 81dd53bb52673c5e5efdc1ba20a9b73429e80cfc..7b2cd00bf00476d9ce2662ca7dcefd0ee0bc1535 100644 (file)
@@ -244,7 +244,7 @@ int usbvision_i2c_register(struct usb_usbvision *usbvision)
        PDEBUG(DBG_I2C, "i2c bus for %s registered", usbvision->i2c_adap.name);
 
        /* Request the load of the i2c modules we need */
-       switch (usbvision_device_data[usbvision->DevModel].Codec) {
+       switch (usbvision_device_data[usbvision->dev_model].codec) {
        case CODEC_SAA7113:
        case CODEC_SAA7111:
                /* Without this delay the detection of the saa711x is
@@ -255,7 +255,7 @@ int usbvision_i2c_register(struct usb_usbvision *usbvision)
                                "saa7115_auto", 0, saa711x_addrs);
                break;
        }
-       if (usbvision_device_data[usbvision->DevModel].Tuner == 1) {
+       if (usbvision_device_data[usbvision->dev_model].tuner == 1) {
                struct v4l2_subdev *sd;
                enum v4l2_i2c_tuner_type type;
                struct tuner_setup tun_setup;
@@ -426,18 +426,18 @@ static int usbvision_i2c_write_max4(struct usb_usbvision *usbvision,
 static int usbvision_i2c_write(struct usb_usbvision *usbvision, unsigned char addr, char *buf,
                            short len)
 {
-       char *bufPtr = buf;
+       char *buf_ptr = buf;
        int retval;
        int wrcount = 0;
        int count;
-       int maxLen = 4;
+       int max_len = 4;
 
        while (len > 0) {
-               count = (len > maxLen) ? maxLen : len;
-               retval = usbvision_i2c_write_max4(usbvision, addr, bufPtr, count);
+               count = (len > max_len) ? max_len : len;
+               retval = usbvision_i2c_write_max4(usbvision, addr, buf_ptr, count);
                if (retval > 0) {
                        len -= count;
-                       bufPtr += count;
+                       buf_ptr += count;
                        wrcount += count;
                } else
                        return (retval < 0) ? retval : -EFAULT;
index a5709a576772ad6accfbf760e481db043e511493..4882ea087b92ed0f7dd7bb08d787182103894dc0 100644 (file)
@@ -127,11 +127,11 @@ static void usbvision_release(struct usb_usbvision *usbvision);
 
 /* Default initialization of device driver parameters */
 /* Set the default format for ISOC endpoint */
-static int isocMode = ISOC_MODE_COMPRESS;
+static int isoc_mode = ISOC_MODE_COMPRESS;
 /* Set the default Debug Mode of the device driver */
 static int video_debug;
 /* Set the default device to power on at startup */
-static int PowerOnAtOpen = 1;
+static int power_on_at_open = 1;
 /* Sequential Number of Video Device */
 static int video_nr = -1;
 /* Sequential Number of Radio Device */
@@ -140,15 +140,15 @@ static int radio_nr = -1;
 /* Grab parameters for the device driver */
 
 /* Showing parameters under SYSFS */
-module_param(isocMode, int, 0444);
+module_param(isoc_mode, int, 0444);
 module_param(video_debug, int, 0444);
-module_param(PowerOnAtOpen, int, 0444);
+module_param(power_on_at_open, int, 0444);
 module_param(video_nr, int, 0444);
 module_param(radio_nr, int, 0444);
 
-MODULE_PARM_DESC(isocMode, " Set the default format for ISOC endpoint.  Default: 0x60 (Compression On)");
+MODULE_PARM_DESC(isoc_mode, " Set the default format for ISOC endpoint.  Default: 0x60 (Compression On)");
 MODULE_PARM_DESC(video_debug, " Set the default Debug Mode of the device driver.  Default: 0 (Off)");
-MODULE_PARM_DESC(PowerOnAtOpen, " Set the default device to power on when device is opened.  Default: 1 (On)");
+MODULE_PARM_DESC(power_on_at_open, " Set the default device to power on when device is opened.  Default: 1 (On)");
 MODULE_PARM_DESC(video_nr, "Set video device number (/dev/videoX).  Default: -1 (autodetect)");
 MODULE_PARM_DESC(radio_nr, "Set radio device number (/dev/radioX).  Default: -1 (autodetect)");
 
@@ -192,7 +192,7 @@ static ssize_t show_model(struct device *cd,
                container_of(cd, struct video_device, dev);
        struct usb_usbvision *usbvision = video_get_drvdata(vdev);
        return sprintf(buf, "%s\n",
-                      usbvision_device_data[usbvision->DevModel].ModelString);
+                      usbvision_device_data[usbvision->dev_model].model_string);
 }
 static DEVICE_ATTR(model, S_IRUGO, show_model, NULL);
 
@@ -263,7 +263,7 @@ static ssize_t show_streaming(struct device *cd,
                container_of(cd, struct video_device, dev);
        struct usb_usbvision *usbvision = video_get_drvdata(vdev);
        return sprintf(buf, "%s\n",
-                      YES_NO(usbvision->streaming==Stream_On?1:0));
+                      YES_NO(usbvision->streaming==stream_on?1:0));
 }
 static DEVICE_ATTR(streaming, S_IRUGO, show_streaming, NULL);
 
@@ -274,7 +274,7 @@ static ssize_t show_compression(struct device *cd,
                container_of(cd, struct video_device, dev);
        struct usb_usbvision *usbvision = video_get_drvdata(vdev);
        return sprintf(buf, "%s\n",
-                      YES_NO(usbvision->isocMode==ISOC_MODE_COMPRESS));
+                      YES_NO(usbvision->isoc_mode==ISOC_MODE_COMPRESS));
 }
 static DEVICE_ATTR(compression, S_IRUGO, show_compression, NULL);
 
@@ -284,7 +284,7 @@ static ssize_t show_device_bridge(struct device *cd,
        struct video_device *vdev =
                container_of(cd, struct video_device, dev);
        struct usb_usbvision *usbvision = video_get_drvdata(vdev);
-       return sprintf(buf, "%d\n", usbvision->bridgeType);
+       return sprintf(buf, "%d\n", usbvision->bridge_type);
 }
 static DEVICE_ATTR(bridge, S_IRUGO, show_device_bridge, NULL);
 
@@ -352,23 +352,23 @@ static void usbvision_remove_sysfs(struct video_device *vdev)
 static int usbvision_v4l2_open(struct file *file)
 {
        struct usb_usbvision *usbvision = video_drvdata(file);
-       int errCode = 0;
+       int err_code = 0;
 
        PDEBUG(DBG_IO, "open");
 
-       usbvision_reset_powerOffTimer(usbvision);
+       usbvision_reset_power_off_timer(usbvision);
 
        if (usbvision->user)
-               errCode = -EBUSY;
+               err_code = -EBUSY;
        else {
                /* Allocate memory for the scratch ring buffer */
-               errCode = usbvision_scratch_alloc(usbvision);
-               if (isocMode==ISOC_MODE_COMPRESS) {
+               err_code = usbvision_scratch_alloc(usbvision);
+               if (isoc_mode==ISOC_MODE_COMPRESS) {
                        /* Allocate intermediate decompression buffers
                           only if needed */
-                       errCode = usbvision_decompress_alloc(usbvision);
+                       err_code = usbvision_decompress_alloc(usbvision);
                }
-               if (errCode) {
+               if (err_code) {
                        /* Deallocate all buffers if trouble */
                        usbvision_scratch_free(usbvision);
                        usbvision_decompress_free(usbvision);
@@ -376,7 +376,7 @@ static int usbvision_v4l2_open(struct file *file)
        }
 
        /* If so far no errors then we shall start the camera */
-       if (!errCode) {
+       if (!err_code) {
                if (usbvision->power == 0) {
                        usbvision_power_on(usbvision);
                        usbvision_i2c_register(usbvision);
@@ -385,21 +385,21 @@ static int usbvision_v4l2_open(struct file *file)
                /* Send init sequence only once, it's large! */
                if (!usbvision->initialized) {
                        int setup_ok = 0;
-                       setup_ok = usbvision_setup(usbvision,isocMode);
+                       setup_ok = usbvision_setup(usbvision,isoc_mode);
                        if (setup_ok)
                                usbvision->initialized = 1;
                        else
-                               errCode = -EBUSY;
+                               err_code = -EBUSY;
                }
 
-               if (!errCode) {
+               if (!err_code) {
                        usbvision_begin_streaming(usbvision);
-                       errCode = usbvision_init_isoc(usbvision);
+                       err_code = usbvision_init_isoc(usbvision);
                        /* device must be initialized before isoc transfer */
                        usbvision_muxsel(usbvision,0);
                        usbvision->user++;
                } else {
-                       if (PowerOnAtOpen) {
+                       if (power_on_at_open) {
                                usbvision_i2c_unregister(usbvision);
                                usbvision_power_off(usbvision);
                                usbvision->initialized = 0;
@@ -411,7 +411,7 @@ static int usbvision_v4l2_open(struct file *file)
        usbvision_empty_framequeues(usbvision);
 
        PDEBUG(DBG_IO, "success");
-       return errCode;
+       return err_code;
 }
 
 /*
@@ -439,10 +439,10 @@ static int usbvision_v4l2_close(struct file *file)
 
        usbvision->user--;
 
-       if (PowerOnAtOpen) {
+       if (power_on_at_open) {
                /* power off in a little while
                   to avoid off/on every close/open short sequences */
-               usbvision_set_powerOffTimer(usbvision);
+               usbvision_set_power_off_timer(usbvision);
                usbvision->initialized = 0;
        }
 
@@ -467,19 +467,19 @@ static int vidioc_g_register (struct file *file, void *priv,
                                struct v4l2_dbg_register *reg)
 {
        struct usb_usbvision *usbvision = video_drvdata(file);
-       int errCode;
+       int err_code;
 
        if (!v4l2_chip_match_host(&reg->match))
                return -EINVAL;
        /* NT100x has a 8-bit register space */
-       errCode = usbvision_read_reg(usbvision, reg->reg&0xff);
-       if (errCode < 0) {
+       err_code = usbvision_read_reg(usbvision, reg->reg&0xff);
+       if (err_code < 0) {
                dev_err(&usbvision->vdev->dev,
                        "%s: VIDIOC_DBG_G_REGISTER failed: error %d\n",
-                               __func__, errCode);
-               return errCode;
+                               __func__, err_code);
+               return err_code;
        }
-       reg->val = errCode;
+       reg->val = err_code;
        reg->size = 1;
        return 0;
 }
@@ -488,17 +488,17 @@ static int vidioc_s_register (struct file *file, void *priv,
                                struct v4l2_dbg_register *reg)
 {
        struct usb_usbvision *usbvision = video_drvdata(file);
-       int errCode;
+       int err_code;
 
        if (!v4l2_chip_match_host(&reg->match))
                return -EINVAL;
        /* NT100x has a 8-bit register space */
-       errCode = usbvision_write_reg(usbvision, reg->reg&0xff, reg->val);
-       if (errCode < 0) {
+       err_code = usbvision_write_reg(usbvision, reg->reg&0xff, reg->val);
+       if (err_code < 0) {
                dev_err(&usbvision->vdev->dev,
                        "%s: VIDIOC_DBG_S_REGISTER failed: error %d\n",
-                               __func__, errCode);
-               return errCode;
+                               __func__, err_code);
+               return err_code;
        }
        return 0;
 }
@@ -511,7 +511,7 @@ static int vidioc_querycap (struct file *file, void  *priv,
 
        strlcpy(vc->driver, "USBVision", sizeof(vc->driver));
        strlcpy(vc->card,
-               usbvision_device_data[usbvision->DevModel].ModelString,
+               usbvision_device_data[usbvision->dev_model].model_string,
                sizeof(vc->card));
        usb_make_path(usbvision->dev, vc->bus_info, sizeof(vc->bus_info));
        vc->version = USBVISION_DRIVER_VERSION;
@@ -540,7 +540,7 @@ static int vidioc_enum_input (struct file *file, void *priv,
           specific for each usbvision card model */
        switch(chan) {
        case 0:
-               if (usbvision_device_data[usbvision->DevModel].VideoChannels == 4) {
+               if (usbvision_device_data[usbvision->dev_model].video_channels == 4) {
                        strcpy(vi->name, "White Video Input");
                } else {
                        strcpy(vi->name, "Television");
@@ -552,7 +552,7 @@ static int vidioc_enum_input (struct file *file, void *priv,
                break;
        case 1:
                vi->type = V4L2_INPUT_TYPE_CAMERA;
-               if (usbvision_device_data[usbvision->DevModel].VideoChannels == 4) {
+               if (usbvision_device_data[usbvision->dev_model].video_channels == 4) {
                        strcpy(vi->name, "Green Video Input");
                } else {
                        strcpy(vi->name, "Composite Video Input");
@@ -561,7 +561,7 @@ static int vidioc_enum_input (struct file *file, void *priv,
                break;
        case 2:
                vi->type = V4L2_INPUT_TYPE_CAMERA;
-               if (usbvision_device_data[usbvision->DevModel].VideoChannels == 4) {
+               if (usbvision_device_data[usbvision->dev_model].video_channels == 4) {
                        strcpy(vi->name, "Yellow Video Input");
                } else {
                        strcpy(vi->name, "S-Video Input");
@@ -604,9 +604,9 @@ static int vidioc_s_std (struct file *file, void *priv, v4l2_std_id *id)
 {
        struct usb_usbvision *usbvision = video_drvdata(file);
 
-       usbvision->tvnormId=*id;
+       usbvision->tvnorm_id=*id;
 
-       call_all(usbvision, core, s_std, usbvision->tvnormId);
+       call_all(usbvision, core, s_std, usbvision->tvnorm_id);
        /* propagate the change to the decoder */
        usbvision_muxsel(usbvision, usbvision->ctl_input);
 
@@ -744,7 +744,7 @@ static int vidioc_reqbufs (struct file *file,
        if (vr->memory != V4L2_MEMORY_MMAP)
                return -EINVAL;
 
-       if(usbvision->streaming == Stream_On) {
+       if(usbvision->streaming == stream_on) {
                if ((ret = usbvision_stream_interrupt(usbvision)))
                        return ret;
        }
@@ -753,7 +753,7 @@ static int vidioc_reqbufs (struct file *file,
        usbvision_empty_framequeues(usbvision);
        vr->count = usbvision_frames_alloc(usbvision,vr->count);
 
-       usbvision->curFrame = NULL;
+       usbvision->cur_frame = NULL;
 
        return 0;
 }
@@ -772,11 +772,11 @@ static int vidioc_querybuf (struct file *file,
        /* Updating the corresponding frame state */
        vb->flags = 0;
        frame = &usbvision->frame[vb->index];
-       if(frame->grabstate >= FrameState_Ready)
+       if(frame->grabstate >= frame_state_ready)
                vb->flags |= V4L2_BUF_FLAG_QUEUED;
-       if(frame->grabstate >= FrameState_Done)
+       if(frame->grabstate >= frame_state_done)
                vb->flags |= V4L2_BUF_FLAG_DONE;
-       if(frame->grabstate == FrameState_Unused)
+       if(frame->grabstate == frame_state_unused)
                vb->flags |= V4L2_BUF_FLAG_MAPPED;
        vb->memory = V4L2_MEMORY_MMAP;
 
@@ -805,13 +805,13 @@ static int vidioc_qbuf (struct file *file, void *priv, struct v4l2_buffer *vb)
 
        frame = &usbvision->frame[vb->index];
 
-       if (frame->grabstate != FrameState_Unused) {
+       if (frame->grabstate != frame_state_unused) {
                return -EAGAIN;
        }
 
        /* Mark it as ready and enqueue frame */
-       frame->grabstate = FrameState_Ready;
-       frame->scanstate = ScanState_Scanning;
+       frame->grabstate = frame_state_ready;
+       frame->scanstate = scan_state_scanning;
        frame->scanlength = 0;  /* Accumulated in usbvision_parse_data() */
 
        vb->flags &= ~V4L2_BUF_FLAG_DONE;
@@ -834,7 +834,7 @@ static int vidioc_dqbuf (struct file *file, void *priv, struct v4l2_buffer *vb)
        unsigned long lock_flags;
 
        if (list_empty(&(usbvision->outqueue))) {
-               if (usbvision->streaming == Stream_Idle)
+               if (usbvision->streaming == stream_idle)
                        return -EINVAL;
                ret = wait_event_interruptible
                        (usbvision->wait_frame,
@@ -849,7 +849,7 @@ static int vidioc_dqbuf (struct file *file, void *priv, struct v4l2_buffer *vb)
        list_del(usbvision->outqueue.next);
        spin_unlock_irqrestore(&usbvision->queue_lock, lock_flags);
 
-       f->grabstate = FrameState_Unused;
+       f->grabstate = frame_state_unused;
 
        vb->memory = V4L2_MEMORY_MMAP;
        vb->flags = V4L2_BUF_FLAG_MAPPED |
@@ -868,7 +868,7 @@ static int vidioc_streamon(struct file *file, void *priv, enum v4l2_buf_type i)
 {
        struct usb_usbvision *usbvision = video_drvdata(file);
 
-       usbvision->streaming = Stream_On;
+       usbvision->streaming = stream_on;
        call_all(usbvision, video, s_stream, 1);
 
        return 0;
@@ -882,7 +882,7 @@ static int vidioc_streamoff(struct file *file,
        if (type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
                return -EINVAL;
 
-       if(usbvision->streaming == Stream_On) {
+       if(usbvision->streaming == stream_on) {
                usbvision_stream_interrupt(usbvision);
                /* Stop all video streamings */
                call_all(usbvision, video, s_stream, 0);
@@ -923,18 +923,18 @@ static int vidioc_try_fmt_vid_cap (struct file *file, void *priv,
                               struct v4l2_format *vf)
 {
        struct usb_usbvision *usbvision = video_drvdata(file);
-       int formatIdx;
+       int format_idx;
 
        /* Find requested format in available ones */
-       for(formatIdx=0;formatIdx<USBVISION_SUPPORTED_PALETTES;formatIdx++) {
+       for(format_idx=0;format_idx<USBVISION_SUPPORTED_PALETTES;format_idx++) {
                if(vf->fmt.pix.pixelformat ==
-                  usbvision_v4l2_format[formatIdx].format) {
-                       usbvision->palette = usbvision_v4l2_format[formatIdx];
+                  usbvision_v4l2_format[format_idx].format) {
+                       usbvision->palette = usbvision_v4l2_format[format_idx];
                        break;
                }
        }
        /* robustness */
-       if(formatIdx == USBVISION_SUPPORTED_PALETTES) {
+       if(format_idx == USBVISION_SUPPORTED_PALETTES) {
                return -EINVAL;
        }
        RESTRICT_TO_RANGE(vf->fmt.pix.width, MIN_FRAME_WIDTH, MAX_FRAME_WIDTH);
@@ -958,14 +958,14 @@ static int vidioc_s_fmt_vid_cap(struct file *file, void *priv,
        }
 
        /* stop io in case it is already in progress */
-       if(usbvision->streaming == Stream_On) {
+       if(usbvision->streaming == stream_on) {
                if ((ret = usbvision_stream_interrupt(usbvision)))
                        return ret;
        }
        usbvision_frames_free(usbvision);
        usbvision_empty_framequeues(usbvision);
 
-       usbvision->curFrame = NULL;
+       usbvision->cur_frame = NULL;
 
        /* by now we are committed to the new data... */
        usbvision_set_output(usbvision, vf->fmt.pix.width, vf->fmt.pix.height);
@@ -1000,9 +1000,9 @@ static ssize_t usbvision_v4l2_read(struct file *file, char __user *buf,
                usbvision_frames_alloc(usbvision,USBVISION_NUMFRAMES);
        }
 
-       if(usbvision->streaming != Stream_On) {
+       if(usbvision->streaming != stream_on) {
                /* no stream is running, make it running ! */
-               usbvision->streaming = Stream_On;
+               usbvision->streaming = stream_on;
                call_all(usbvision, video, s_stream, 1);
        }
 
@@ -1010,10 +1010,10 @@ static ssize_t usbvision_v4l2_read(struct file *file, char __user *buf,
           (like a user of VIDIOC_QBUF would do) */
        for(i=0;i<usbvision->num_frames;i++) {
                frame = &usbvision->frame[i];
-               if(frame->grabstate == FrameState_Unused) {
+               if(frame->grabstate == frame_state_unused) {
                        /* Mark it as ready and enqueue frame */
-                       frame->grabstate = FrameState_Ready;
-                       frame->scanstate = ScanState_Scanning;
+                       frame->grabstate = frame_state_ready;
+                       frame->scanstate = scan_state_scanning;
                        /* Accumulated in usbvision_parse_data() */
                        frame->scanlength = 0;
 
@@ -1046,7 +1046,7 @@ static ssize_t usbvision_v4l2_read(struct file *file, char __user *buf,
        spin_unlock_irqrestore(&usbvision->queue_lock, lock_flags);
 
        /* An error returns an empty frame */
-       if (frame->grabstate == FrameState_Error) {
+       if (frame->grabstate == frame_state_error) {
                frame->bytes_read = 0;
                return 0;
        }
@@ -1073,7 +1073,7 @@ static ssize_t usbvision_v4l2_read(struct file *file, char __user *buf,
                frame->bytes_read = 0;
 
                /* Mark it as available to be used again. */
-               frame->grabstate = FrameState_Unused;
+               frame->grabstate = frame_state_unused;
 /*     } */
 
        return count;
@@ -1136,7 +1136,7 @@ static int usbvision_v4l2_mmap(struct file *file, struct vm_area_struct *vma)
 static int usbvision_radio_open(struct file *file)
 {
        struct usb_usbvision *usbvision = video_drvdata(file);
-       int errCode = 0;
+       int err_code = 0;
 
        PDEBUG(DBG_IO, "%s:", __func__);
 
@@ -1144,11 +1144,11 @@ static int usbvision_radio_open(struct file *file)
                dev_err(&usbvision->rdev->dev,
                        "%s: Someone tried to open an already opened USBVision Radio!\n",
                                __func__);
-               errCode = -EBUSY;
+               err_code = -EBUSY;
        }
        else {
-               if(PowerOnAtOpen) {
-                       usbvision_reset_powerOffTimer(usbvision);
+               if(power_on_at_open) {
+                       usbvision_reset_power_off_timer(usbvision);
                        if (usbvision->power == 0) {
                                usbvision_power_on(usbvision);
                                usbvision_i2c_register(usbvision);
@@ -1156,10 +1156,10 @@ static int usbvision_radio_open(struct file *file)
                }
 
                /* Alternate interface 1 is is the biggest frame size */
-               errCode = usbvision_set_alternate(usbvision);
-               if (errCode < 0) {
-                       usbvision->last_error = errCode;
-                       errCode = -EBUSY;
+               err_code = usbvision_set_alternate(usbvision);
+               if (err_code < 0) {
+                       usbvision->last_error = err_code;
+                       err_code = -EBUSY;
                        goto out;
                }
 
@@ -1170,36 +1170,36 @@ static int usbvision_radio_open(struct file *file)
                usbvision->user++;
        }
 
-       if (errCode) {
-               if (PowerOnAtOpen) {
+       if (err_code) {
+               if (power_on_at_open) {
                        usbvision_i2c_unregister(usbvision);
                        usbvision_power_off(usbvision);
                        usbvision->initialized = 0;
                }
        }
 out:
-       return errCode;
+       return err_code;
 }
 
 
 static int usbvision_radio_close(struct file *file)
 {
        struct usb_usbvision *usbvision = video_drvdata(file);
-       int errCode = 0;
+       int err_code = 0;
 
        PDEBUG(DBG_IO, "");
 
        /* Set packet size to 0 */
-       usbvision->ifaceAlt=0;
-       errCode = usb_set_interface(usbvision->dev, usbvision->iface,
-                                   usbvision->ifaceAlt);
+       usbvision->iface_alt=0;
+       err_code = usb_set_interface(usbvision->dev, usbvision->iface,
+                                   usbvision->iface_alt);
 
        usbvision_audio_off(usbvision);
        usbvision->radio=0;
        usbvision->user--;
 
-       if (PowerOnAtOpen) {
-               usbvision_set_powerOffTimer(usbvision);
+       if (power_on_at_open) {
+               usbvision_set_power_off_timer(usbvision);
                usbvision->initialized = 0;
        }
 
@@ -1209,7 +1209,7 @@ static int usbvision_radio_close(struct file *file)
        }
 
        PDEBUG(DBG_IO, "success");
-       return errCode;
+       return err_code;
 }
 
 //
@@ -1375,7 +1375,7 @@ static int __devinit usbvision_register_video(struct usb_usbvision *usbvision)
               usbvision->nr, video_device_node_name(usbvision->vdev));
 
        // Radio Device:
-       if (usbvision_device_data[usbvision->DevModel].Radio) {
+       if (usbvision_device_data[usbvision->dev_model].radio) {
                // usbvision has radio
                usbvision->rdev = usbvision_vdev_init(usbvision,
                                                      &usbvision_radio_template,
@@ -1427,12 +1427,12 @@ static struct usb_usbvision *usbvision_alloc(struct usb_device *dev,
        mutex_init(&usbvision->v4l2_lock);
 
        // prepare control urb for control messages during interrupts
-       usbvision->ctrlUrb = usb_alloc_urb(USBVISION_URB_FRAMES, GFP_KERNEL);
-       if (usbvision->ctrlUrb == NULL)
+       usbvision->ctrl_urb = usb_alloc_urb(USBVISION_URB_FRAMES, GFP_KERNEL);
+       if (usbvision->ctrl_urb == NULL)
                goto err_unreg;
-       init_waitqueue_head(&usbvision->ctrlUrb_wq);
+       init_waitqueue_head(&usbvision->ctrl_urb_wq);
 
-       usbvision_init_powerOffTimer(usbvision);
+       usbvision_init_power_off_timer(usbvision);
 
        return usbvision;
 
@@ -1454,15 +1454,15 @@ static void usbvision_release(struct usb_usbvision *usbvision)
 {
        PDEBUG(DBG_PROBE, "");
 
-       usbvision_reset_powerOffTimer(usbvision);
+       usbvision_reset_power_off_timer(usbvision);
 
        usbvision->initialized = 0;
 
        usbvision_remove_sysfs(usbvision->vdev);
        usbvision_unregister_video(usbvision);
 
-       if (usbvision->ctrlUrb) {
-               usb_free_urb(usbvision->ctrlUrb);
+       if (usbvision->ctrl_urb) {
+               usb_free_urb(usbvision->ctrl_urb);
        }
 
        v4l2_device_unregister(&usbvision->v4l2_dev);
@@ -1481,25 +1481,25 @@ static void usbvision_configure_video(struct usb_usbvision *usbvision)
        if (usbvision == NULL)
                return;
 
-       model = usbvision->DevModel;
+       model = usbvision->dev_model;
        usbvision->palette = usbvision_v4l2_format[2]; // V4L2_PIX_FMT_RGB24;
 
-       if (usbvision_device_data[usbvision->DevModel].Vin_Reg2_override) {
-               usbvision->Vin_Reg2_Preset =
-                       usbvision_device_data[usbvision->DevModel].Vin_Reg2;
+       if (usbvision_device_data[usbvision->dev_model].vin_reg2_override) {
+               usbvision->vin_reg2_preset =
+                       usbvision_device_data[usbvision->dev_model].vin_reg2;
        } else {
-               usbvision->Vin_Reg2_Preset = 0;
+               usbvision->vin_reg2_preset = 0;
        }
 
-       usbvision->tvnormId = usbvision_device_data[model].VideoNorm;
+       usbvision->tvnorm_id = usbvision_device_data[model].video_norm;
 
-       usbvision->video_inputs = usbvision_device_data[model].VideoChannels;
+       usbvision->video_inputs = usbvision_device_data[model].video_channels;
        usbvision->ctl_input = 0;
 
        /* This should be here to make i2c clients to be able to register */
        /* first switch off audio */
        usbvision_audio_off(usbvision);
-       if (!PowerOnAtOpen) {
+       if (!power_on_at_open) {
                /* and then power up the noisy tuner */
                usbvision_power_on(usbvision);
                usbvision_i2c_register(usbvision);
@@ -1534,10 +1534,10 @@ static int __devinit usbvision_probe(struct usb_interface *intf,
                return -ENODEV;
        }
        printk(KERN_INFO "%s: %s found\n", __func__,
-                               usbvision_device_data[model].ModelString);
+                               usbvision_device_data[model].model_string);
 
-       if (usbvision_device_data[model].Interface >= 0) {
-               interface = &dev->actconfig->interface[usbvision_device_data[model].Interface]->altsetting[0];
+       if (usbvision_device_data[model].interface >= 0) {
+               interface = &dev->actconfig->interface[usbvision_device_data[model].interface]->altsetting[0];
        } else {
                interface = &dev->actconfig->interface[ifnum]->altsetting[0];
        }
@@ -1562,13 +1562,13 @@ static int __devinit usbvision_probe(struct usb_interface *intf,
        }
 
        if (dev->descriptor.bNumConfigurations > 1) {
-               usbvision->bridgeType = BRIDGE_NT1004;
+               usbvision->bridge_type = BRIDGE_NT1004;
        } else if (model == DAZZLE_DVC_90_REV_1_SECAM) {
-               usbvision->bridgeType = BRIDGE_NT1005;
+               usbvision->bridge_type = BRIDGE_NT1005;
        } else {
-               usbvision->bridgeType = BRIDGE_NT1003;
+               usbvision->bridge_type = BRIDGE_NT1003;
        }
-       PDEBUG(DBG_PROBE, "bridgeType %d", usbvision->bridgeType);
+       PDEBUG(DBG_PROBE, "bridge_type %d", usbvision->bridge_type);
 
        /* compute alternate max packet sizes */
        uif = dev->actconfig->interface[0];
@@ -1594,20 +1594,20 @@ static int __devinit usbvision_probe(struct usb_interface *intf,
 
        usbvision->nr = usbvision_nr++;
 
-       usbvision->have_tuner = usbvision_device_data[model].Tuner;
+       usbvision->have_tuner = usbvision_device_data[model].tuner;
        if (usbvision->have_tuner) {
-               usbvision->tuner_type = usbvision_device_data[model].TunerType;
+               usbvision->tuner_type = usbvision_device_data[model].tuner_type;
        }
 
-       usbvision->DevModel = model;
+       usbvision->dev_model = model;
        usbvision->remove_pending = 0;
        usbvision->iface = ifnum;
-       usbvision->ifaceAlt = 0;
+       usbvision->iface_alt = 0;
        usbvision->video_endp = endpoint->bEndpointAddress;
-       usbvision->isocPacketSize = 0;
+       usbvision->isoc_packet_size = 0;
        usbvision->usb_bandwidth = 0;
        usbvision->user = 0;
-       usbvision->streaming = Stream_Off;
+       usbvision->streaming = stream_off;
        usbvision_configure_video(usbvision);
        usbvision_register_video(usbvision);
 
@@ -1682,7 +1682,7 @@ static struct usb_driver usbvision_driver = {
  */
 static int __init usbvision_init(void)
 {
-       int errCode;
+       int err_code;
 
        PDEBUG(DBG_PROBE, "");
 
@@ -1691,19 +1691,19 @@ static int __init usbvision_init(void)
        PDEBUG(DBG_MMAP, "MMAP    debugging is enabled [video]");
 
        /* disable planar mode support unless compression enabled */
-       if (isocMode != ISOC_MODE_COMPRESS ) {
+       if (isoc_mode != ISOC_MODE_COMPRESS ) {
                // FIXME : not the right way to set supported flag
                usbvision_v4l2_format[6].supported = 0; // V4L2_PIX_FMT_YVU420
                usbvision_v4l2_format[7].supported = 0; // V4L2_PIX_FMT_YUV422P
        }
 
-       errCode = usb_register(&usbvision_driver);
+       err_code = usb_register(&usbvision_driver);
 
-       if (errCode == 0) {
+       if (err_code == 0) {
                printk(KERN_INFO DRIVER_DESC " : " USBVISION_VERSION_STRING "\n");
                PDEBUG(DBG_PROBE, "success");
        }
-       return errCode;
+       return err_code;
 }
 
 static void __exit usbvision_exit(void)
index 2271ede78ddf67184de200001bf57b90317df311..42189e50014332f7284f91d0e23f59e5c895812d 100644 (file)
@@ -223,39 +223,39 @@ enum {
 /* ----------------------------------------------------------------- */
 /* usbvision video structures                                        */
 /* ----------------------------------------------------------------- */
-enum ScanState {
-       ScanState_Scanning,     /* Scanning for header */
-       ScanState_Lines         /* Parsing lines */
+enum scan_state {
+       scan_state_scanning,    /* Scanning for header */
+       scan_state_lines        /* Parsing lines */
 };
 
 /* Completion states of the data parser */
-enum ParseState {
-       ParseState_Continue,    /* Just parse next item */
-       ParseState_NextFrame,   /* Frame done, send it to V4L */
-       ParseState_Out,         /* Not enough data for frame */
-       ParseState_EndParse     /* End parsing */
+enum parse_state {
+       parse_state_continue,   /* Just parse next item */
+       parse_state_next_frame, /* Frame done, send it to V4L */
+       parse_state_out,        /* Not enough data for frame */
+       parse_state_end_parse   /* End parsing */
 };
 
-enum FrameState {
-       FrameState_Unused,      /* Unused (no MCAPTURE) */
-       FrameState_Ready,       /* Ready to start grabbing */
-       FrameState_Grabbing,    /* In the process of being grabbed into */
-       FrameState_Done,        /* Finished grabbing, but not been synced yet */
-       FrameState_DoneHold,    /* Are syncing or reading */
-       FrameState_Error,       /* Something bad happened while processing */
+enum frame_state {
+       frame_state_unused,     /* Unused (no MCAPTURE) */
+       frame_state_ready,      /* Ready to start grabbing */
+       frame_state_grabbing,   /* In the process of being grabbed into */
+       frame_state_done,       /* Finished grabbing, but not been synced yet */
+       frame_state_done_hold,  /* Are syncing or reading */
+       frame_state_error,      /* Something bad happened while processing */
 };
 
 /* stream states */
-enum StreamState {
-       Stream_Off,             /* Driver streaming is completely OFF */
-       Stream_Idle,            /* Driver streaming is ready to be put ON by the application */
-       Stream_Interrupt,       /* Driver streaming must be interrupted */
-       Stream_On,              /* Driver streaming is put ON by the application */
+enum stream_state {
+       stream_off,             /* Driver streaming is completely OFF */
+       stream_idle,            /* Driver streaming is ready to be put ON by the application */
+       stream_interrupt,       /* Driver streaming must be interrupted */
+       stream_on,              /* Driver streaming is put ON by the application */
 };
 
-enum IsocState {
-       IsocState_InFrame,      /* Isoc packet is member of frame */
-       IsocState_NoFrame,      /* Isoc packet is not member of any frame */
+enum isoc_state {
+       isoc_state_in_frame,    /* Isoc packet is member of frame */
+       isoc_state_no_frame,    /* Isoc packet is not member of any frame */
 };
 
 struct usb_device;
@@ -286,23 +286,23 @@ struct usbvision_v4l2_format_st {
 struct usbvision_frame_header {
        unsigned char magic_1;                          /* 0 magic */
        unsigned char magic_2;                          /* 1  magic */
-       unsigned char headerLength;                     /* 2 */
-       unsigned char frameNum;                         /* 3 */
-       unsigned char framePhase;                       /* 4 */
-       unsigned char frameLatency;                     /* 5 */
-       unsigned char dataFormat;                       /* 6 */
-       unsigned char formatParam;                      /* 7 */
-       unsigned char frameWidthLo;                     /* 8 */
-       unsigned char frameWidthHi;                     /* 9 */
-       unsigned char frameHeightLo;                    /* 10 */
-       unsigned char frameHeightHi;                    /* 11 */
-       __u16 frameWidth;                               /* 8 - 9 after endian correction*/
-       __u16 frameHeight;                              /* 10 - 11 after endian correction*/
+       unsigned char header_length;                    /* 2 */
+       unsigned char frame_num;                                /* 3 */
+       unsigned char frame_phase;                      /* 4 */
+       unsigned char frame_latency;                    /* 5 */
+       unsigned char data_format;                      /* 6 */
+       unsigned char format_param;                     /* 7 */
+       unsigned char frame_width_lo;                   /* 8 */
+       unsigned char frame_width_hi;                   /* 9 */
+       unsigned char frame_height_lo;                  /* 10 */
+       unsigned char frame_height_hi;                  /* 11 */
+       __u16 frame_width;                              /* 8 - 9 after endian correction*/
+       __u16 frame_height;                             /* 10 - 11 after endian correction*/
 };
 
 struct usbvision_frame {
        char *data;                                     /* Frame buffer */
-       struct usbvision_frame_header isocHeader;       /* Header from stream */
+       struct usbvision_frame_header isoc_header;      /* Header from stream */
 
        int width;                                      /* Width application is expecting */
        int height;                                     /* Height */
@@ -332,24 +332,24 @@ struct usbvision_frame {
 #define BRIDGE_NT1005   1005
 
 struct usbvision_device_data_st {
-       __u64 VideoNorm;
-       const char *ModelString;
-       int Interface; /* to handle special interface number like BELKIN and Hauppauge WinTV-USB II */
-       __u16 Codec;
-       unsigned VideoChannels:3;
-       unsigned AudioChannels:2;
-       unsigned Radio:1;
+       __u64 video_norm;
+       const char *model_string;
+       int interface; /* to handle special interface number like BELKIN and Hauppauge WinTV-USB II */
+       __u16 codec;
+       unsigned video_channels:3;
+       unsigned audio_channels:2;
+       unsigned radio:1;
        unsigned vbi:1;
-       unsigned Tuner:1;
-       unsigned Vin_Reg1_override:1;   /* Override default value with */
-       unsigned Vin_Reg2_override:1;   /* Vin_Reg1, Vin_Reg2, etc. */
-       unsigned Dvi_yuv_override:1;
-       __u8 Vin_Reg1;
-       __u8 Vin_Reg2;
-       __u8 Dvi_yuv;
-       __u8 TunerType;
-       __s16 X_Offset;
-       __s16 Y_Offset;
+       unsigned tuner:1;
+       unsigned vin_reg1_override:1;   /* Override default value with */
+       unsigned vin_reg2_override:1;   /* vin_reg1, vin_reg2, etc. */
+       unsigned dvi_yuv_override:1;
+       __u8 vin_reg1;
+       __u8 vin_reg2;
+       __u8 dvi_yuv;
+       __u8 tuner_type;
+       __s16 x_offset;
+       __s16 y_offset;
 };
 
 /* Declared on usbvision-cards.c */
@@ -365,40 +365,40 @@ struct usb_usbvision {
        struct i2c_adapter i2c_adap;
        int registered_i2c;
 
-       struct urb *ctrlUrb;
-       unsigned char ctrlUrbBuffer[8];
-       int ctrlUrbBusy;
-       struct usb_ctrlrequest ctrlUrbSetup;
-       wait_queue_head_t ctrlUrb_wq;                                   // Processes waiting
+       struct urb *ctrl_urb;
+       unsigned char ctrl_urb_buffer[8];
+       int ctrl_urb_busy;
+       struct usb_ctrlrequest ctrl_urb_setup;
+       wait_queue_head_t ctrl_urb_wq;                                  // Processes waiting
 
        /* configuration part */
        int have_tuner;
        int tuner_type;
-       int bridgeType;                                                 // NT1003, NT1004, NT1005
+       int bridge_type;                                                        // NT1003, NT1004, NT1005
        int radio;
        int video_inputs;                                               // # of inputs
        unsigned long freq;
-       int AudioMute;
-       int AudioChannel;
-       int isocMode;                                                   // format of video data for the usb isoc-transfer
+       int audio_mute;
+       int audio_channel;
+       int isoc_mode;                                                  // format of video data for the usb isoc-transfer
        unsigned int nr;                                                // Number of the device
 
        /* Device structure */
        struct usb_device *dev;
        /* usb transfer */
        int num_alt;            /* Number of alternative settings */
-       unsigned int *alt_max_pkt_size; /* array of wMaxPacketSize */
+       unsigned int *alt_max_pkt_size; /* array of max_packet_size */
        unsigned char iface;                                            /* Video interface number */
-       unsigned char ifaceAlt;                 /* Alt settings */
-       unsigned char Vin_Reg2_Preset;
+       unsigned char iface_alt;                        /* Alt settings */
+       unsigned char vin_reg2_preset;
        struct mutex v4l2_lock;
-       struct timer_list powerOffTimer;
-       struct work_struct powerOffWork;
+       struct timer_list power_off_timer;
+       struct work_struct power_off_work;
        int power;                                                      /* is the device powered on? */
        int user;                                                       /* user count for exclusive use */
        int initialized;                                                /* Had we already sent init sequence? */
-       int DevModel;                                                   /* What type of USBVISION device we got? */
-       enum StreamState streaming;                                     /* Are we streaming Isochronous? */
+       int dev_model;                                                  /* What type of USBVISION device we got? */
+       enum stream_state streaming;                                    /* Are we streaming Isochronous? */
        int last_error;                                                 /* What calamity struck us? */
        int curwidth;                                                   /* width of the frame the device is currently set to*/
        int curheight;                                                  /* height of the frame the device is currently set to*/
@@ -411,7 +411,7 @@ struct usb_usbvision {
        struct list_head inqueue, outqueue;                             /* queued frame list and ready to dequeue frame list */
        wait_queue_head_t wait_frame;                                   /* Processes waiting */
        wait_queue_head_t wait_stream;                                  /* Processes waiting */
-       struct usbvision_frame *curFrame;                               // pointer to current frame, set by usbvision_find_header
+       struct usbvision_frame *cur_frame;                              // pointer to current frame, set by usbvision_find_header
        struct usbvision_frame frame[USBVISION_NUMFRAMES];              // frame buffer
        int num_frames;                                                 // number of frames allocated
        struct usbvision_sbuf sbuf[USBVISION_NUMSBUF];                  // S buffering
@@ -424,43 +424,43 @@ struct usb_usbvision {
        int scratch_headermarker[USBVISION_NUM_HEADERMARKER];
        int scratch_headermarker_read_ptr;
        int scratch_headermarker_write_ptr;
-       enum IsocState isocstate;
+       enum isoc_state isocstate;
        struct usbvision_v4l2_format_st palette;
 
        struct v4l2_capability vcap;                                    /* Video capabilities */
        unsigned int ctl_input;                                         /* selected input */
-       v4l2_std_id tvnormId;                                           /* selected tv norm */
+       v4l2_std_id tvnorm_id;                                          /* selected tv norm */
        unsigned char video_endp;                                       /* 0x82 for USBVISION devices based */
 
        // Decompression stuff:
-       unsigned char *IntraFrameBuffer;                                /* Buffer for reference frame */
-       int BlockPos;                                                   //for test only
-       int requestIntra;                                               // 0 = normal; 1 = intra frame is requested;
-       int lastIsocFrameNum;                                           // check for lost isoc frames
-       int isocPacketSize;                                             // need to calculate usedBandwidth
-       int usedBandwidth;                                              // used bandwidth 0-100%, need to set comprLevel
-       int comprLevel;                                                 // How strong (100) or weak (0) is compression
-       int lastComprLevel;                                             // How strong (100) or weak (0) was compression
+       unsigned char *intra_frame_buffer;                              /* Buffer for reference frame */
+       int block_pos;                                                  //for test only
+       int request_intra;                                              // 0 = normal; 1 = intra frame is requested;
+       int last_isoc_frame_num;                                                // check for lost isoc frames
+       int isoc_packet_size;                                           // need to calculate used_bandwidth
+       int used_bandwidth;                                             // used bandwidth 0-100%, need to set compr_level
+       int compr_level;                                                        // How strong (100) or weak (0) is compression
+       int last_compr_level;                                           // How strong (100) or weak (0) was compression
        int usb_bandwidth;                                              /* Mbit/s */
 
        /* Statistics that can be overlayed on the screen */
-       unsigned long isocUrbCount;                     // How many URBs we received so far
+       unsigned long isoc_urb_count;                   // How many URBs we received so far
        unsigned long urb_length;                       /* Length of last URB */
-       unsigned long isocDataCount;                    /* How many bytes we received */
+       unsigned long isoc_data_count;                  /* How many bytes we received */
        unsigned long header_count;                     /* How many frame headers we found */
        unsigned long scratch_ovf_count;                /* How many times we overflowed scratch */
-       unsigned long isocSkipCount;                    /* How many empty ISO packets received */
-       unsigned long isocErrCount;                     /* How many bad ISO packets received */
-       unsigned long isocPacketCount;                  // How many packets we totally got
-       unsigned long timeInIrq;                        // How long do we need for interrupt
-       int isocMeasureBandwidthCount;
+       unsigned long isoc_skip_count;                  /* How many empty ISO packets received */
+       unsigned long isoc_err_count;                   /* How many bad ISO packets received */
+       unsigned long isoc_packet_count;                        // How many packets we totally got
+       unsigned long time_in_irq;                      // How long do we need for interrupt
+       int isoc_measure_bandwidth_count;
        int frame_num;                                  // How many video frames we send to user
-       int maxStripLen;                                // How big is the biggest strip
-       int comprBlockPos;
-       int stripLenErrors;                             // How many times was BlockPos greater than StripLen
-       int stripMagicErrors;
-       int stripLineNumberErrors;
-       int ComprBlockTypes[4];
+       int max_strip_len;                              // How big is the biggest strip
+       int comprblock_pos;
+       int strip_len_errors;                           // How many times was block_pos greater than strip_len
+       int strip_magic_errors;
+       int strip_line_number_errors;
+       int compr_block_types[4];
 };
 
 static inline struct usb_usbvision *to_usbvision(struct v4l2_device *v4l2_dev)
@@ -500,7 +500,7 @@ int usbvision_restart_isoc(struct usb_usbvision *usbvision);
 void usbvision_stop_isoc(struct usb_usbvision *usbvision);
 int usbvision_set_alternate(struct usb_usbvision *dev);
 
-int usbvision_set_audio(struct usb_usbvision *usbvision, int AudioChannel);
+int usbvision_set_audio(struct usb_usbvision *usbvision, int audio_channel);
 int usbvision_audio_off(struct usb_usbvision *usbvision);
 
 int usbvision_begin_streaming(struct usb_usbvision *usbvision);
@@ -511,9 +511,9 @@ int usbvision_muxsel(struct usb_usbvision *usbvision, int channel);
 int usbvision_set_input(struct usb_usbvision *usbvision);
 int usbvision_set_output(struct usb_usbvision *usbvision, int width, int height);
 
-void usbvision_init_powerOffTimer(struct usb_usbvision *usbvision);
-void usbvision_set_powerOffTimer(struct usb_usbvision *usbvision);
-void usbvision_reset_powerOffTimer(struct usb_usbvision *usbvision);
+void usbvision_init_power_off_timer(struct usb_usbvision *usbvision);
+void usbvision_set_power_off_timer(struct usb_usbvision *usbvision);
+void usbvision_reset_power_off_timer(struct usb_usbvision *usbvision);
 int usbvision_power_off(struct usb_usbvision *usbvision);
 int usbvision_power_on(struct usb_usbvision *usbvision);