diff --git a/drivers/media/Kconfig b/drivers/media/Kconfig index ef52e6da01ed9bc8a0d3ea0f0a43c3dfb2e523c5..ed4aa4e7912c39fd3ed764eab623e64490735073 100644 --- a/drivers/media/Kconfig +++ b/drivers/media/Kconfig @@ -53,7 +53,7 @@ config VIDEO_V4L1_COMPAT If you are unsure as to whether this is required, answer Y. config VIDEO_V4L2 - tristate + bool default y source "drivers/media/video/Kconfig" diff --git a/drivers/media/common/saa7146_video.c b/drivers/media/common/saa7146_video.c index 8393d472d3b81acced0acf7848cac92021ae85ef..7e0cedc557df2a17e8ed8b38114c27c75e321332 100644 --- a/drivers/media/common/saa7146_video.c +++ b/drivers/media/common/saa7146_video.c @@ -1190,6 +1190,7 @@ int saa7146_video_do_ioctl(struct inode *inode, struct file *file, unsigned int } return err; } +#ifdef CONFIG_VIDEO_V4L1_COMPAT case VIDIOCGMBUF: { struct video_mbuf *mbuf = arg; @@ -1218,6 +1219,7 @@ int saa7146_video_do_ioctl(struct inode *inode, struct file *file, unsigned int mutex_unlock(&q->lock); return 0; } +#endif default: return v4l_compat_translate_ioctl(inode,file,cmd,arg, saa7146_video_do_ioctl); diff --git a/drivers/media/dvb/b2c2/Kconfig b/drivers/media/dvb/b2c2/Kconfig index d7f1fd5b7b02a8c62c74d9867a3a228f24b46fda..49a06fc54c51add4cb30df21303b0419db633171 100644 --- a/drivers/media/dvb/b2c2/Kconfig +++ b/drivers/media/dvb/b2c2/Kconfig @@ -1,6 +1,7 @@ config DVB_B2C2_FLEXCOP tristate "Technisat/B2C2 FlexCopII(b) and FlexCopIII adapters" depends on DVB_CORE && I2C + select DVB_PLL select DVB_STV0299 select DVB_MT352 select DVB_MT312 diff --git a/drivers/media/dvb/bt8xx/Kconfig b/drivers/media/dvb/bt8xx/Kconfig index f394002118f81d48da7aca9846bc7271d4ea19e5..7d0ee1ab2903c4bb06b5c16c7146f21f14f2ce9a 100644 --- a/drivers/media/dvb/bt8xx/Kconfig +++ b/drivers/media/dvb/bt8xx/Kconfig @@ -1,6 +1,7 @@ config DVB_BT8XX tristate "BT8xx based PCI cards" depends on DVB_CORE && PCI && I2C && VIDEO_BT848 + select DVB_PLL select DVB_MT352 select DVB_SP887X select DVB_NXT6000 diff --git a/drivers/media/dvb/dvb-usb/Kconfig b/drivers/media/dvb/dvb-usb/Kconfig index 3bc6722a6443e1e29e80382114a75c46a7d21527..75824b77198ab2a2524f5d123c719455a1fdadfb 100644 --- a/drivers/media/dvb/dvb-usb/Kconfig +++ b/drivers/media/dvb/dvb-usb/Kconfig @@ -2,6 +2,7 @@ config DVB_USB tristate "Support for various USB DVB devices" depends on DVB_CORE && USB && I2C select FW_LOADER + select DVB_PLL help By enabling this you will be able to choose the various supported USB1.1 and USB2.0 DVB devices. diff --git a/drivers/media/dvb/frontends/Kconfig b/drivers/media/dvb/frontends/Kconfig index 0ef361f0309b59b72ebe10632bae24c4fa5ecbdf..db978555b1eb34d2c5819cf2b5380f6e52450c8d 100644 --- a/drivers/media/dvb/frontends/Kconfig +++ b/drivers/media/dvb/frontends/Kconfig @@ -6,43 +6,43 @@ comment "DVB-S (satellite) frontends" config DVB_STV0299 tristate "ST STV0299 based" - depends on DVB_CORE + depends on DVB_CORE && I2C help A DVB-S tuner module. Say Y when you want to support this frontend. config DVB_CX24110 tristate "Conexant CX24110 based" - depends on DVB_CORE + depends on DVB_CORE && I2C help A DVB-S tuner module. Say Y when you want to support this frontend. config DVB_CX24123 tristate "Conexant CX24123 based" - depends on DVB_CORE + depends on DVB_CORE && I2C help A DVB-S tuner module. Say Y when you want to support this frontend. config DVB_TDA8083 tristate "Philips TDA8083 based" - depends on DVB_CORE + depends on DVB_CORE && I2C help A DVB-S tuner module. Say Y when you want to support this frontend. config DVB_MT312 tristate "Zarlink VP310/MT312 based" - depends on DVB_CORE + depends on DVB_CORE && I2C help A DVB-S tuner module. Say Y when you want to support this frontend. config DVB_VES1X93 tristate "VLSI VES1893 or VES1993 based" - depends on DVB_CORE + depends on DVB_CORE && I2C help A DVB-S tuner module. Say Y when you want to support this frontend. config DVB_S5H1420 tristate "Samsung S5H1420 based" - depends on DVB_CORE + depends on DVB_CORE && I2C help A DVB-S tuner module. Say Y when you want to support this frontend. @@ -51,7 +51,7 @@ comment "DVB-T (terrestrial) frontends" config DVB_SP8870 tristate "Spase sp8870 based" - depends on DVB_CORE + depends on DVB_CORE && I2C select FW_LOADER help A DVB-T tuner module. Say Y when you want to support this frontend. @@ -63,7 +63,7 @@ config DVB_SP8870 config DVB_SP887X tristate "Spase sp887x based" - depends on DVB_CORE + depends on DVB_CORE && I2C select FW_LOADER help A DVB-T tuner module. Say Y when you want to support this frontend. @@ -75,25 +75,25 @@ config DVB_SP887X config DVB_CX22700 tristate "Conexant CX22700 based" - depends on DVB_CORE + depends on DVB_CORE && I2C help A DVB-T tuner module. Say Y when you want to support this frontend. config DVB_CX22702 tristate "Conexant cx22702 demodulator (OFDM)" - depends on DVB_CORE + depends on DVB_CORE && I2C help A DVB-T tuner module. Say Y when you want to support this frontend. config DVB_L64781 tristate "LSI L64781" - depends on DVB_CORE + depends on DVB_CORE && I2C help A DVB-T tuner module. Say Y when you want to support this frontend. config DVB_TDA1004X tristate "Philips TDA10045H/TDA10046H based" - depends on DVB_CORE + depends on DVB_CORE && I2C select FW_LOADER help A DVB-T tuner module. Say Y when you want to support this frontend. @@ -106,32 +106,32 @@ config DVB_TDA1004X config DVB_NXT6000 tristate "NxtWave Communications NXT6000 based" - depends on DVB_CORE + depends on DVB_CORE && I2C help A DVB-T tuner module. Say Y when you want to support this frontend. config DVB_MT352 tristate "Zarlink MT352 based" - depends on DVB_CORE + depends on DVB_CORE && I2C help A DVB-T tuner module. Say Y when you want to support this frontend. config DVB_ZL10353 tristate "Zarlink ZL10353 based" - depends on DVB_CORE + depends on DVB_CORE && I2C help A DVB-T tuner module. Say Y when you want to support this frontend. config DVB_DIB3000MB tristate "DiBcom 3000M-B" - depends on DVB_CORE + depends on DVB_CORE && I2C help A DVB-T tuner module. Designed for mobile usage. Say Y when you want to support this frontend. config DVB_DIB3000MC tristate "DiBcom 3000P/M-C" - depends on DVB_CORE + depends on DVB_CORE && I2C help A DVB-T tuner module. Designed for mobile usage. Say Y when you want to support this frontend. @@ -141,19 +141,19 @@ comment "DVB-C (cable) frontends" config DVB_VES1820 tristate "VLSI VES1820 based" - depends on DVB_CORE + depends on DVB_CORE && I2C help A DVB-C tuner module. Say Y when you want to support this frontend. config DVB_TDA10021 tristate "Philips TDA10021 based" - depends on DVB_CORE + depends on DVB_CORE && I2C help A DVB-C tuner module. Say Y when you want to support this frontend. config DVB_STV0297 tristate "ST STV0297 based" - depends on DVB_CORE + depends on DVB_CORE && I2C help A DVB-C tuner module. Say Y when you want to support this frontend. @@ -162,7 +162,7 @@ comment "ATSC (North American/Korean Terrestrial/Cable DTV) frontends" config DVB_NXT200X tristate "NxtWave Communications NXT2002/NXT2004 based" - depends on DVB_CORE + depends on DVB_CORE && I2C select FW_LOADER help An ATSC 8VSB and QAM64/256 tuner module. Say Y when you want @@ -176,7 +176,7 @@ config DVB_NXT200X config DVB_OR51211 tristate "Oren OR51211 based" - depends on DVB_CORE + depends on DVB_CORE && I2C select FW_LOADER help An ATSC 8VSB tuner module. Say Y when you want to support this frontend. @@ -188,7 +188,7 @@ config DVB_OR51211 config DVB_OR51132 tristate "Oren OR51132 based" - depends on DVB_CORE + depends on DVB_CORE && I2C select FW_LOADER help An ATSC 8VSB and QAM64/256 tuner module. Say Y when you want @@ -203,7 +203,7 @@ config DVB_OR51132 config DVB_BCM3510 tristate "Broadcom BCM3510" - depends on DVB_CORE + depends on DVB_CORE && I2C select FW_LOADER help An ATSC 8VSB/16VSB and QAM64/256 tuner module. Say Y when you want to @@ -211,7 +211,7 @@ config DVB_BCM3510 config DVB_LGDT330X tristate "LG Electronics LGDT3302/LGDT3303 based" - depends on DVB_CORE + depends on DVB_CORE && I2C help An ATSC 8VSB and QAM64/256 tuner module. Say Y when you want to support this frontend. @@ -220,15 +220,19 @@ config DVB_LGDT330X comment "Miscellaneous devices" depends on DVB_CORE +config DVB_PLL + tristate + depends on DVB_CORE && I2C + config DVB_LNBP21 tristate "LNBP21 SEC controller" - depends on DVB_CORE + depends on DVB_CORE && I2C help An SEC control chip. config DVB_ISL6421 tristate "ISL6421 SEC controller" - depends on DVB_CORE + depends on DVB_CORE && I2C help An SEC control chip. diff --git a/drivers/media/dvb/frontends/Makefile b/drivers/media/dvb/frontends/Makefile index 5222245c7f592573b1708102c8d56035a06950e7..0e4880b6db14699c8204295884b3a9b0e0454cfc 100644 --- a/drivers/media/dvb/frontends/Makefile +++ b/drivers/media/dvb/frontends/Makefile @@ -4,7 +4,7 @@ EXTRA_CFLAGS = -Idrivers/media/dvb/dvb-core/ -obj-$(CONFIG_DVB_CORE) += dvb-pll.o +obj-$(CONFIG_DVB_PLL) += dvb-pll.o obj-$(CONFIG_DVB_STV0299) += stv0299.o obj-$(CONFIG_DVB_SP8870) += sp8870.o obj-$(CONFIG_DVB_CX22700) += cx22700.o diff --git a/drivers/media/dvb/pluto2/Kconfig b/drivers/media/dvb/pluto2/Kconfig index 7d8e6e87bdbb23e63b8ec06c55a6c2972457dcba..9b84b1bdc31323108920dafea84045229c5256a0 100644 --- a/drivers/media/dvb/pluto2/Kconfig +++ b/drivers/media/dvb/pluto2/Kconfig @@ -2,6 +2,7 @@ config DVB_PLUTO2 tristate "Pluto2 cards" depends on DVB_CORE && PCI && I2C select I2C_ALGOBIT + select DVB_PLL select DVB_TDA1004X help Support for PCI cards based on the Pluto2 FPGA like the Satelco diff --git a/drivers/media/dvb/ttpci/Kconfig b/drivers/media/dvb/ttpci/Kconfig index 987881fa988ccaba688bd6b08c6ac89e4222e8fc..5fb097595cfbdab39188b56005cca785de0a6c70 100644 --- a/drivers/media/dvb/ttpci/Kconfig +++ b/drivers/media/dvb/ttpci/Kconfig @@ -3,6 +3,7 @@ config DVB_AV7110 depends on DVB_CORE && PCI && I2C && VIDEO_V4L1 select FW_LOADER select VIDEO_SAA7146_VV + select DVB_PLL select DVB_VES1820 select DVB_VES1X93 select DVB_STV0299 @@ -61,6 +62,7 @@ config DVB_BUDGET tristate "Budget cards" depends on DVB_CORE && PCI && I2C && VIDEO_V4L1 select VIDEO_SAA7146 + select DVB_PLL select DVB_STV0299 select DVB_VES1X93 select DVB_VES1820 @@ -83,6 +85,7 @@ config DVB_BUDGET_CI tristate "Budget cards with onboard CI connector" depends on DVB_CORE && PCI && I2C && VIDEO_V4L1 select VIDEO_SAA7146 + select DVB_PLL select DVB_STV0297 select DVB_STV0299 select DVB_TDA1004X @@ -104,6 +107,7 @@ config DVB_BUDGET_AV tristate "Budget cards with analog video inputs" depends on DVB_CORE && PCI && I2C && VIDEO_V4L1 select VIDEO_SAA7146_VV + select DVB_PLL select DVB_STV0299 select DVB_TDA1004X select DVB_TDA10021 @@ -122,6 +126,7 @@ config DVB_BUDGET_PATCH tristate "AV7110 cards with Budget Patch" depends on DVB_CORE && DVB_BUDGET && VIDEO_V4L1 select DVB_AV7110 + select DVB_PLL select DVB_STV0299 select DVB_VES1X93 select DVB_TDA8083 diff --git a/drivers/media/dvb/ttusb-budget/Kconfig b/drivers/media/dvb/ttusb-budget/Kconfig index 92c7cdcf89815750113d68f866aa220aded41b3c..46a6a60d2ab9b9751ff2b9262bbe045866b0baa5 100644 --- a/drivers/media/dvb/ttusb-budget/Kconfig +++ b/drivers/media/dvb/ttusb-budget/Kconfig @@ -1,6 +1,7 @@ config DVB_TTUSB_BUDGET tristate "Technotrend/Hauppauge Nova-USB devices" - depends on DVB_CORE && USB + depends on DVB_CORE && USB && I2C + select DVB_PLL select DVB_CX22700 select DVB_TDA1004X select DVB_VES1820 diff --git a/drivers/media/video/Kconfig b/drivers/media/video/Kconfig index 732bf1e7c326bc806c46073d01d8f0891ec53c55..94d078b77bab4a7373f5dc278e4921a2a2c10700 100644 --- a/drivers/media/video/Kconfig +++ b/drivers/media/video/Kconfig @@ -260,7 +260,7 @@ source "drivers/media/video/saa7134/Kconfig" config VIDEO_MXB tristate "Siemens-Nixdorf 'Multimedia eXtension Board'" - depends on PCI && VIDEO_V4L1 + depends on PCI && VIDEO_V4L1 && I2C select VIDEO_SAA7146_VV select VIDEO_TUNER ---help--- @@ -272,7 +272,7 @@ config VIDEO_MXB config VIDEO_DPC tristate "Philips-Semiconductors 'dpc7146 demonstration board'" - depends on PCI && VIDEO_V4L1 + depends on PCI && VIDEO_V4L1 && I2C select VIDEO_SAA7146_VV select VIDEO_V4L2 ---help--- @@ -287,7 +287,7 @@ config VIDEO_DPC config VIDEO_HEXIUM_ORION tristate "Hexium HV-PCI6 and Orion frame grabber" - depends on PCI && VIDEO_V4L1 + depends on PCI && VIDEO_V4L1 && I2C select VIDEO_SAA7146_VV select VIDEO_V4L2 ---help--- @@ -299,7 +299,7 @@ config VIDEO_HEXIUM_ORION config VIDEO_HEXIUM_GEMINI tristate "Hexium Gemini frame grabber" - depends on PCI && VIDEO_V4L1 + depends on PCI && VIDEO_V4L1 && I2C select VIDEO_SAA7146_VV select VIDEO_V4L2 ---help--- diff --git a/drivers/media/video/bt8xx/bttv-input.c b/drivers/media/video/bt8xx/bttv-input.c index b41f81d2372ccd8b4e0a25d95c8a57e6491d4915..933d6db09acb377025c8e23c8a67d8ac51dd39d2 100644 --- a/drivers/media/video/bt8xx/bttv-input.c +++ b/drivers/media/video/bt8xx/bttv-input.c @@ -303,6 +303,7 @@ int bttv_input_init(struct bttv *btv) ir->mask_keyup = 0x010000; ir->polling = 50; // ms break; + case BTTV_BOARD_PV_M4900: case BTTV_BOARD_PV_BT878P_9B: case BTTV_BOARD_PV_BT878P_PLUS: ir_codes = ir_codes_pixelview; diff --git a/drivers/media/video/cx88/Kconfig b/drivers/media/video/cx88/Kconfig index 80e23ee9801cbed321d4fd467481af6f4a1cc711..7a94e6a11927bdf877b7f8440fc5b499adff002c 100644 --- a/drivers/media/video/cx88/Kconfig +++ b/drivers/media/video/cx88/Kconfig @@ -51,6 +51,7 @@ config VIDEO_CX88_DVB tristate "DVB/ATSC Support for cx2388x based TV cards" depends on VIDEO_CX88 && DVB_CORE select VIDEO_BUF_DVB + select DVB_PLL ---help--- This adds support for DVB/ATSC cards based on the Conexant 2388x chip. diff --git a/drivers/media/video/saa7134/Kconfig b/drivers/media/video/saa7134/Kconfig index e1c1805df1fb67661729c603af70bf3045b5ad03..f5543166d1930fce988fc0c32f39abe5e57b4d08 100644 --- a/drivers/media/video/saa7134/Kconfig +++ b/drivers/media/video/saa7134/Kconfig @@ -40,6 +40,7 @@ config VIDEO_SAA7134_DVB depends on VIDEO_SAA7134 && DVB_CORE select VIDEO_BUF_DVB select FW_LOADER + select DVB_PLL ---help--- This adds support for DVB cards based on the Philips saa7134 chip. diff --git a/drivers/media/video/tuner-types.c b/drivers/media/video/tuner-types.c index d7eadc2c298da68f3b0ccc8ad8cdfa89f0d276c9..8b542599ed471c0f84c9e4247d627178d87a4fd9 100644 --- a/drivers/media/video/tuner-types.c +++ b/drivers/media/video/tuner-types.c @@ -926,11 +926,17 @@ static struct tuner_params tuner_lg_tdvs_h06xf_params[] = { /* ------------ TUNER_YMEC_TVF66T5_B_DFF - Philips PAL ------------ */ +static struct tuner_range tuner_ymec_tvf66t5_b_dff_pal_ranges[] = { + { 16 * 160.25 /*MHz*/, 0x8e, 0x01, }, + { 16 * 464.25 /*MHz*/, 0x8e, 0x02, }, + { 16 * 999.99 , 0x8e, 0x08, }, +}; + static struct tuner_params tuner_ymec_tvf66t5_b_dff_params[] = { { .type = TUNER_PARAM_TYPE_PAL, - .ranges = tuner_tena_9533_di_pal_ranges, - .count = ARRAY_SIZE(tuner_tena_9533_di_pal_ranges), + .ranges = tuner_ymec_tvf66t5_b_dff_pal_ranges, + .count = ARRAY_SIZE(tuner_ymec_tvf66t5_b_dff_pal_ranges), }, }; diff --git a/drivers/media/video/zoran.h b/drivers/media/video/zoran.h index ffcda95ed9d4720eba3dcfb16f1e6a473cd29e86..8fb4a3414e0a7441d0f13ca3749bc551051447d1 100644 --- a/drivers/media/video/zoran.h +++ b/drivers/media/video/zoran.h @@ -267,7 +267,7 @@ struct zoran_v4l_settings { }; /* whoops, this one is undeclared if !v4l2 */ -#ifndef HAVE_V4L2 +#ifndef CONFIG_VIDEO_V4L2 struct v4l2_jpegcompression { int quality; int APPn; diff --git a/drivers/media/video/zoran_driver.c b/drivers/media/video/zoran_driver.c index d9a5876eb386f6ac411905e022a273fc9d8fe7bd..5f90db27892b9386a5b7c56f3a81e2bf6d7954ce 100644 --- a/drivers/media/video/zoran_driver.c +++ b/drivers/media/video/zoran_driver.c @@ -86,7 +86,7 @@ #include "zoran_device.h" #include "zoran_card.h" -#ifdef HAVE_V4L2 +#ifdef CONFIG_VIDEO_V4L2 /* we declare some card type definitions here, they mean * the same as the v4l1 ZORAN_VID_TYPE above, except it's v4l2 */ #define ZORAN_V4L2_VID_FLAGS ( \ @@ -103,7 +103,7 @@ const struct zoran_format zoran_formats[] = { { .name = "15-bit RGB", .palette = VIDEO_PALETTE_RGB555, -#ifdef HAVE_V4L2 +#ifdef CONFIG_VIDEO_V4L2 #ifdef __LITTLE_ENDIAN .fourcc = V4L2_PIX_FMT_RGB555, #else @@ -117,7 +117,7 @@ const struct zoran_format zoran_formats[] = { }, { .name = "16-bit RGB", .palette = VIDEO_PALETTE_RGB565, -#ifdef HAVE_V4L2 +#ifdef CONFIG_VIDEO_V4L2 #ifdef __LITTLE_ENDIAN .fourcc = V4L2_PIX_FMT_RGB565, #else @@ -131,7 +131,7 @@ const struct zoran_format zoran_formats[] = { }, { .name = "24-bit RGB", .palette = VIDEO_PALETTE_RGB24, -#ifdef HAVE_V4L2 +#ifdef CONFIG_VIDEO_V4L2 #ifdef __LITTLE_ENDIAN .fourcc = V4L2_PIX_FMT_BGR24, #else @@ -145,7 +145,7 @@ const struct zoran_format zoran_formats[] = { }, { .name = "32-bit RGB", .palette = VIDEO_PALETTE_RGB32, -#ifdef HAVE_V4L2 +#ifdef CONFIG_VIDEO_V4L2 #ifdef __LITTLE_ENDIAN .fourcc = V4L2_PIX_FMT_BGR32, #else @@ -159,7 +159,7 @@ const struct zoran_format zoran_formats[] = { }, { .name = "4:2:2, packed, YUYV", .palette = VIDEO_PALETTE_YUV422, -#ifdef HAVE_V4L2 +#ifdef CONFIG_VIDEO_V4L2 .fourcc = V4L2_PIX_FMT_YUYV, .colorspace = V4L2_COLORSPACE_SMPTE170M, #endif @@ -169,7 +169,7 @@ const struct zoran_format zoran_formats[] = { }, { .name = "Hardware-encoded Motion-JPEG", .palette = -1, -#ifdef HAVE_V4L2 +#ifdef CONFIG_VIDEO_V4L2 .fourcc = V4L2_PIX_FMT_MJPEG, .colorspace = V4L2_COLORSPACE_SMPTE170M, #endif @@ -210,7 +210,7 @@ static int lock_norm = 0; /* 1=Don't change TV standard (norm) */ module_param(lock_norm, int, 0); MODULE_PARM_DESC(lock_norm, "Users can't change norm"); -#ifdef HAVE_V4L2 +#ifdef CONFIG_VIDEO_V4L2 /* small helper function for calculating buffersizes for v4l2 * we calculate the nearest higher power-of-two, which * will be the recommended buffersize */ @@ -1761,7 +1761,7 @@ setup_overlay (struct file *file, return wait_grab_pending(zr); } -#ifdef HAVE_V4L2 +#ifdef CONFIG_VIDEO_V4L2 /* get the status of a buffer in the clients buffer queue */ static int zoran_v4l2_buffer_status (struct file *file, @@ -2676,7 +2676,7 @@ zoran_do_ioctl (struct inode *inode, } break; -#ifdef HAVE_V4L2 +#ifdef CONFIG_VIDEO_V4L2 /* The new video4linux2 capture interface - much nicer than video4linux1, since * it allows for integrating the JPEG capturing calls inside standard v4l2 @@ -4689,7 +4689,7 @@ static struct file_operations zoran_fops = { struct video_device zoran_template __devinitdata = { .name = ZORAN_NAME, .type = ZORAN_VID_TYPE, -#ifdef HAVE_V4L2 +#ifdef CONFIG_VIDEO_V4L2 .type2 = ZORAN_V4L2_VID_FLAGS, #endif .hardware = ZORAN_HARDWARE, diff --git a/include/linux/videodev.h b/include/linux/videodev.h index 518c7a32175eb6314f47b1cd76e214a3987256f4..8dba97a291f67dda20e69bd7d35f11a43881587b 100644 --- a/include/linux/videodev.h +++ b/include/linux/videodev.h @@ -14,8 +14,7 @@ #include -#ifdef CONFIG_VIDEO_V4L1_COMPAT -#define HAVE_V4L1 1 +#if defined(CONFIG_VIDEO_V4L1_COMPAT) || !defined (__KERNEL__) struct video_capability { diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h index b7146956a9293be2091787ec445d7da2f8cead1a..e3715d7741977715a34326940033a674fd0b8b15 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h @@ -22,8 +22,6 @@ #endif #include -#define HAVE_V4L2 1 - /* * Common stuff for both V4L1 and V4L2 * Moved from videodev.h diff --git a/include/media/v4l2-dev.h b/include/media/v4l2-dev.h index 600d61d7d2ab8e190b1c8a763cd6f107efa20d7d..810462f8a374b63ac3096414ada7b9aff6d5732d 100644 --- a/include/media/v4l2-dev.h +++ b/include/media/v4l2-dev.h @@ -194,7 +194,7 @@ struct video_device int (*vidioc_overlay) (struct file *file, void *fh, unsigned int i); -#ifdef HAVE_V4L1 +#ifdef CONFIG_VIDEO_V4L1_COMPAT /* buffer type is struct vidio_mbuf * */ int (*vidiocgmbuf) (struct file *file, void *fh, struct video_mbuf *p); #endif @@ -335,7 +335,7 @@ extern int video_usercopy(struct inode *inode, struct file *file, unsigned int cmd, void *arg)); -#ifdef HAVE_V4L1 +#ifdef CONFIG_VIDEO_V4L1_COMPAT #include extern struct video_device* video_devdata(struct file*); @@ -357,6 +357,8 @@ video_device_remove_file(struct video_device *vfd, class_device_remove_file(&vfd->class_dev, attr); } +#endif /* CONFIG_VIDEO_V4L1_COMPAT */ + #ifdef OBSOLETE_OWNER /* to be removed soon */ /* helper functions to access driver private data. */ static inline void *video_get_drvdata(struct video_device *dev) @@ -372,6 +374,5 @@ static inline void video_set_drvdata(struct video_device *dev, void *data) extern int video_exclusive_open(struct inode *inode, struct file *file); extern int video_exclusive_release(struct inode *inode, struct file *file); -#endif /* HAVE_V4L1 */ #endif /* _V4L2_DEV_H */