From 9da10a20ba6b92d9756eeaaad204e108b2b214af Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Thu, 5 Jun 2008 10:06:53 -0300 Subject: backport I2C changes on several files From: Mauro Carvalho Chehab Some I2C API change patches were committed at kernel. Backport those changes to V4L/DVB tree. Signed-off-by: Mauro Carvalho Chehab --- linux/include/media/v4l2-i2c-drv-legacy.h | 10 +++++++--- linux/include/media/v4l2-i2c-drv.h | 9 +++++++-- 2 files changed, 14 insertions(+), 5 deletions(-) (limited to 'linux/include/media') diff --git a/linux/include/media/v4l2-i2c-drv-legacy.h b/linux/include/media/v4l2-i2c-drv-legacy.h index 7494bdcc3..e95e2a072 100644 --- a/linux/include/media/v4l2-i2c-drv-legacy.h +++ b/linux/include/media/v4l2-i2c-drv-legacy.h @@ -35,6 +35,9 @@ struct v4l2_i2c_driver_data { #else int legacy_id; #endif +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26) + const struct i2c_device_id *id_table; +#endif }; static struct v4l2_i2c_driver_data v4l2_i2c_data; @@ -167,9 +170,7 @@ static struct i2c_driver v4l2_i2c_driver = { .resume = v4l2_i2c_drv_resume_helper, }; #endif - - -#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 26) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) static int compat_legacy_probe(struct i2c_client *client) { return v4l2_i2c_data.probe(client, NULL); @@ -212,6 +213,9 @@ static int __init v4l2_i2c_drv_init(void) v4l2_i2c_driver.probe = compat_legacy_probe; #endif v4l2_i2c_driver.remove = v4l2_i2c_data.remove; +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26) + v4l2_i2c_driver.id_table = v4l2_i2c_data.id_table; +#endif err = i2c_add_driver(&v4l2_i2c_driver); if (err) i2c_del_driver(&v4l2_i2c_driver_legacy); diff --git a/linux/include/media/v4l2-i2c-drv.h b/linux/include/media/v4l2-i2c-drv.h index 5b4959620..73d713f07 100644 --- a/linux/include/media/v4l2-i2c-drv.h +++ b/linux/include/media/v4l2-i2c-drv.h @@ -40,18 +40,20 @@ struct v4l2_i2c_driver_data { #else int legacy_id; #endif +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26) + const struct i2c_device_id *id_table; +#endif }; static struct v4l2_i2c_driver_data v4l2_i2c_data; static struct i2c_driver v4l2_i2c_driver; -#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 26) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) static int compat_legacy_probe(struct i2c_client *client) { return v4l2_i2c_data.probe(client, NULL); } #endif - #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22) /* Bus-based I2C implementation for kernels >= 2.6.22 */ @@ -69,6 +71,9 @@ static int __init v4l2_i2c_drv_init(void) v4l2_i2c_driver.remove = v4l2_i2c_data.remove; v4l2_i2c_driver.suspend = v4l2_i2c_data.suspend; v4l2_i2c_driver.resume = v4l2_i2c_data.resume; +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26) + v4l2_i2c_driver.id_table = v4l2_i2c_data.id_table; +#endif return i2c_add_driver(&v4l2_i2c_driver); } -- cgit v1.2.3 From 3aa632bff5132aadd1c8d786f29225ccf09ae862 Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Sat, 7 Jun 2008 13:18:17 +0200 Subject: cx18/cx25840: the S-Video LUMA input can use all In1-In8 inputs From: Hans Verkuil The S-Video LUMA input was restricted to the In1-In4 inputs, but it turns out that it can use the full range of In1-In8. Signed-off-by: Hans Verkuil --- linux/include/media/cx25840.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'linux/include/media') diff --git a/linux/include/media/cx25840.h b/linux/include/media/cx25840.h index cd599ad29..db431d513 100644 --- a/linux/include/media/cx25840.h +++ b/linux/include/media/cx25840.h @@ -32,12 +32,16 @@ enum cx25840_video_input { CX25840_COMPOSITE7, CX25840_COMPOSITE8, - /* S-Video inputs consist of one luma input (In1-In4) ORed with one + /* S-Video inputs consist of one luma input (In1-In8) ORed with one chroma input (In5-In8) */ CX25840_SVIDEO_LUMA1 = 0x10, CX25840_SVIDEO_LUMA2 = 0x20, CX25840_SVIDEO_LUMA3 = 0x30, CX25840_SVIDEO_LUMA4 = 0x40, + CX25840_SVIDEO_LUMA5 = 0x50, + CX25840_SVIDEO_LUMA6 = 0x60, + CX25840_SVIDEO_LUMA7 = 0x70, + CX25840_SVIDEO_LUMA8 = 0x80, CX25840_SVIDEO_CHROMA4 = 0x400, CX25840_SVIDEO_CHROMA5 = 0x500, CX25840_SVIDEO_CHROMA6 = 0x600, -- cgit v1.2.3 From 315835dc9411165ec78b2d11b6d025a6db5f10d4 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Sun, 15 Jun 2008 10:33:42 -0300 Subject: saa7134: Fix entries for Avermedia A16d and Avermedia E506 From: Tim Farrington Also, adds IR table for Avermedia A16d Signed-off-by: Tim Farrington Signed-off-by: Mauro Carvalho Chehab --- linux/include/media/ir-common.h | 1 + 1 file changed, 1 insertion(+) (limited to 'linux/include/media') diff --git a/linux/include/media/ir-common.h b/linux/include/media/ir-common.h index bfee8be5d..b8e8aa919 100644 --- a/linux/include/media/ir-common.h +++ b/linux/include/media/ir-common.h @@ -146,6 +146,7 @@ extern IR_KEYTAB_TYPE ir_codes_behold_columbus[IR_KEYTAB_SIZE]; extern IR_KEYTAB_TYPE ir_codes_pinnacle_pctv_hd[IR_KEYTAB_SIZE]; extern IR_KEYTAB_TYPE ir_codes_genius_tvgo_a11mce[IR_KEYTAB_SIZE]; extern IR_KEYTAB_TYPE ir_codes_powercolor_real_angel[IR_KEYTAB_SIZE]; +extern IR_KEYTAB_TYPE ir_codes_avermedia_a16d[IR_KEYTAB_SIZE]; #endif -- cgit v1.2.3 From 2e87dc4bc0ada9acabcc0d704444e8f361490624 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Fri, 20 Jun 2008 22:58:53 +0000 Subject: Introduce "index" attribute for persistent video4linux device nodes From: brandon@ifup.org A number of V4L drivers have a mod param to specify their preferred minors. This is because it is often desirable for applications to have a static /dev name for a particular device. However, using minors has several disadvantages: 1) the requested minor may already be taken 2) using a mod param is driver specific 3) it requires every driver to add a param 4) requires configuration by hand This patch introduces an "index" attribute that when combined with udev rules can create static device paths like this: /dev/v4l/by-path/pci-0000\:00\:1d.2-usb-0\:1\:1.0-video0 /dev/v4l/by-path/pci-0000\:00\:1d.2-usb-0\:1\:1.0-video1 /dev/v4l/by-path/pci-0000\:00\:1d.2-usb-0\:1\:1.0-video2 $ ls -la /dev/v4l/by-path/pci-0000\:00\:1d.2-usb-0\:1\:1.0-video0 lrwxrwxrwx 1 root root 12 2008-04-28 00:02 /dev/v4l/by-path/pci-0000:00:1d.2-usb-0:1:1.0-video0 -> ../../video1 These paths are steady across reboots and should be resistant to rearranging across Kernel versions. video_register_device_index is available to drivers to request a specific index number. Signed-off-by: Brandon Philips Signed-off-by: Kees Cook Signed-off-by: Kay Sievers Signed-off-by: Mauro Carvalho Chehab --- linux/include/media/v4l2-dev.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'linux/include/media') diff --git a/linux/include/media/v4l2-dev.h b/linux/include/media/v4l2-dev.h index 484090509..f94919e9b 100644 --- a/linux/include/media/v4l2-dev.h +++ b/linux/include/media/v4l2-dev.h @@ -112,6 +112,8 @@ struct video_device int type; /* v4l1 */ int type2; /* v4l2 */ int minor; + /* attribute to diferentiate multiple indexs on one physical device */ + int index; int debug; /* Activates debug level*/ @@ -377,6 +379,8 @@ void *priv; /* Version 2 functions */ extern int video_register_device(struct video_device *vfd, int type, int nr); +int video_register_device_index(struct video_device *vfd, int type, int nr, + int index); void video_unregister_device(struct video_device *); extern int video_ioctl2(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg); -- cgit v1.2.3 From e2ecbd5491755142d00345bdf9c7ed4204cf75d4 Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Sat, 21 Jun 2008 15:23:27 +0200 Subject: videodev: simplify and fix standard enumeration From: Hans Verkuil VIDIOC_ENUMSTD did not return all the PAL/SECAM/NTSC variants: it just returned one single PAL/SECAM/NTSC standard without separate entries for the trickier standards like NTSC-JP. Changed the code so that it behaves better. Also simplified the if/switch statements into a common standards lookup table. Signed-off-by: Hans Verkuil --- linux/include/media/v4l2-dev.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'linux/include/media') diff --git a/linux/include/media/v4l2-dev.h b/linux/include/media/v4l2-dev.h index 484090509..0a03fa2f4 100644 --- a/linux/include/media/v4l2-dev.h +++ b/linux/include/media/v4l2-dev.h @@ -46,9 +46,9 @@ #define VFL_TYPE_VTX 3 /* Video standard functions */ -extern char *v4l2_norm_to_name(v4l2_std_id id); +extern const char *v4l2_norm_to_name(v4l2_std_id id); extern int v4l2_video_std_construct(struct v4l2_standard *vs, - int id, char *name); + int id, const char *name); /* Prints the ioctl in a human-readable format */ extern void v4l_printk_ioctl(unsigned int cmd); -- cgit v1.2.3 From b37f653a50cd90598a56f6c60c839ef62f5e8545 Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Sun, 22 Jun 2008 13:55:09 +0200 Subject: videodev: fix/improve ioctl debugging From: Hans Verkuil Various ioctl debugging fixes and improvements: - use %x rather than %d for control IDs and bitmask fields - make two arrays const - show the whole control array for the ext_ctrl ioctls - print pix_fmt for V4L2_BUF_TYPE_VIDEO_OUTPUT - show full type name rather than an integer - fix CROPCAP debugging - fix G/S_TUNER debugging - show error code in case of an error - other small cleanups Signed-off-by: Hans Verkuil --- linux/include/media/v4l2-dev.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'linux/include/media') diff --git a/linux/include/media/v4l2-dev.h b/linux/include/media/v4l2-dev.h index dff99a024..d1ca9664e 100644 --- a/linux/include/media/v4l2-dev.h +++ b/linux/include/media/v4l2-dev.h @@ -65,8 +65,8 @@ enum v4l2_priority v4l2_prio_max(struct v4l2_prio_state *global); int v4l2_prio_check(struct v4l2_prio_state *global, enum v4l2_priority *local); /* names for fancy debug output */ -extern char *v4l2_field_names[]; -extern char *v4l2_type_names[]; +extern const char *v4l2_field_names[]; +extern const char *v4l2_type_names[]; /* Compatibility layer interface -- v4l1-compat module */ typedef int (*v4l2_kioctl)(struct inode *inode, struct file *file, -- cgit v1.2.3 From 58699616d9a85b5cccbdd1587cdfc39ba84af902 Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Sun, 22 Jun 2008 14:03:28 +0200 Subject: cx2341x: add TS capability From: Hans Verkuil The cx18 can support transport streams with newer firmwares. Add a TS capability to the generic cx2341x module. Signed-off-by: Hans Verkuil --- linux/include/media/cx2341x.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'linux/include/media') diff --git a/linux/include/media/cx2341x.h b/linux/include/media/cx2341x.h index 5f4608e88..9ec4d5889 100644 --- a/linux/include/media/cx2341x.h +++ b/linux/include/media/cx2341x.h @@ -27,6 +27,7 @@ enum cx2341x_port { enum cx2341x_cap { CX2341X_CAP_HAS_SLICED_VBI = 1 << 0, + CX2341X_CAP_HAS_TS = 1 << 1, }; struct cx2341x_mpeg_params { @@ -88,13 +89,13 @@ typedef int (*cx2341x_mbox_func)(void *priv, u32 cmd, int in, int out, int cx2341x_update(void *priv, cx2341x_mbox_func func, const struct cx2341x_mpeg_params *old, const struct cx2341x_mpeg_params *new); -int cx2341x_ctrl_query(struct cx2341x_mpeg_params *params, +int cx2341x_ctrl_query(const struct cx2341x_mpeg_params *params, struct v4l2_queryctrl *qctrl); -const char **cx2341x_ctrl_get_menu(u32 id); +const char **cx2341x_ctrl_get_menu(const struct cx2341x_mpeg_params *p, u32 id); int cx2341x_ext_ctrls(struct cx2341x_mpeg_params *params, int busy, struct v4l2_ext_controls *ctrls, unsigned int cmd); void cx2341x_fill_defaults(struct cx2341x_mpeg_params *p); -void cx2341x_log_status(struct cx2341x_mpeg_params *p, const char *prefix); +void cx2341x_log_status(const struct cx2341x_mpeg_params *p, const char *prefix); /* Firmware names */ #define CX2341X_FIRM_ENC_FILENAME "v4l-cx2341x-enc.fw" -- cgit v1.2.3 From 5c51bb04555feb9d92e1a2f95d7f931d3c23dc3c Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Sun, 22 Jun 2008 14:19:19 +0000 Subject: saa7146: ->cpu_addr and friends are little-endian From: Al Viro Annotations + stop saa7146_i2c from playing fast and loose with reuse of ->cpu_addr for host-endian. Signed-off-by: Al Viro Signed-off-by: Mauro Carvalho Chehab --- linux/include/media/saa7146.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'linux/include/media') diff --git a/linux/include/media/saa7146.h b/linux/include/media/saa7146.h index f13a8c58a..e4a7aa2aa 100644 --- a/linux/include/media/saa7146.h +++ b/linux/include/media/saa7146.h @@ -65,7 +65,7 @@ struct saa7146_vv; /* saa7146 page table */ struct saa7146_pgtable { unsigned int size; - u32 *cpu; + __le32 *cpu; dma_addr_t dma; /* used for offsets for u,v planes for planar capture modes */ unsigned long offset; @@ -113,7 +113,7 @@ struct saa7146_extension struct saa7146_dma { dma_addr_t dma_handle; - u32 *cpu_addr; + __le32 *cpu_addr; }; struct saa7146_dev -- cgit v1.2.3 From 7ce87336c2f386ab6c35e985a5832d21b5cd7fab Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Tue, 8 Jul 2008 00:19:19 +0200 Subject: v4l-dvb: remove support for kernels < 2.6.0 From: Hans Verkuil First phase of the backwards compatibility cleanup: stop supporting kernels older than 2.6.0. Signed-off-by: Hans Verkuil --- linux/include/media/v4l2-dev.h | 6 ------ linux/include/media/v4l2-i2c-drv-legacy.h | 15 +-------------- linux/include/media/v4l2-i2c-drv.h | 15 +-------------- 3 files changed, 2 insertions(+), 34 deletions(-) (limited to 'linux/include/media') diff --git a/linux/include/media/v4l2-dev.h b/linux/include/media/v4l2-dev.h index d1ca9664e..178989285 100644 --- a/linux/include/media/v4l2-dev.h +++ b/linux/include/media/v4l2-dev.h @@ -14,9 +14,7 @@ #include #include -#if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0) #include -#endif #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15) #include #else @@ -97,7 +95,6 @@ struct video_device struct file_operations *fops; #endif -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) /* sysfs */ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,13) struct device class_dev; /* v4l device */ @@ -105,7 +102,6 @@ struct video_device struct class_device class_dev; #endif struct device *dev; /* device parent */ -#endif /* device info */ char name[32]; @@ -399,7 +395,6 @@ extern int video_usercopy(struct inode *inode, struct file *file, #ifdef CONFIG_VIDEO_V4L1_COMPAT #include -#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,0) static inline int __must_check #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13) video_device_create_file(struct video_device *vfd, @@ -420,7 +415,6 @@ video_device_remove_file(struct video_device *vfd, { device_remove_file(&vfd->class_dev, attr); } -#endif #endif /* CONFIG_VIDEO_V4L1_COMPAT */ diff --git a/linux/include/media/v4l2-i2c-drv-legacy.h b/linux/include/media/v4l2-i2c-drv-legacy.h index e95e2a072..f8172f3d6 100644 --- a/linux/include/media/v4l2-i2c-drv-legacy.h +++ b/linux/include/media/v4l2-i2c-drv-legacy.h @@ -49,12 +49,7 @@ static struct i2c_client_address_data addr_data; static struct i2c_driver v4l2_i2c_driver_legacy; static char v4l2_i2c_drv_name_legacy[32]; -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) static int v4l2_i2c_drv_attach_legacy(struct i2c_adapter *adapter, int address, int kind) -#else -static int v4l2_i2c_drv_attach_legacy(struct i2c_adapter *adapter, int address, - unsigned short flags, int kind) -#endif { return v4l2_i2c_attach(adapter, address, &v4l2_i2c_driver_legacy, v4l2_i2c_drv_name_legacy, v4l2_i2c_data.probe); @@ -87,14 +82,9 @@ static int v4l2_i2c_drv_detach_legacy(struct i2c_client *client) if (err) return err; kfree(client); - -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) - MOD_DEC_USE_COUNT; -#endif return 0; } -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0) #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,14) #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,20) static int v4l2_i2c_drv_suspend_helper(struct i2c_client *client, pm_message_t state) @@ -130,19 +120,17 @@ static int v4l2_i2c_drv_resume_helper(struct device * dev, u32 level) #endif return v4l2_i2c_data.resume ? v4l2_i2c_data.resume(client) : 0; } -#endif /* ----------------------------------------------------------------------- */ /* i2c implementation */ static struct i2c_driver v4l2_i2c_driver_legacy = { -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)) && (LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)) +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15) .owner = THIS_MODULE, #endif #if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15) .flags = I2C_DF_NOTIFY, #endif -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) .driver = { #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15) .owner = THIS_MODULE, @@ -152,7 +140,6 @@ static struct i2c_driver v4l2_i2c_driver_legacy = { .resume = v4l2_i2c_drv_resume_helper, #endif }, -#endif .attach_adapter = v4l2_i2c_drv_probe_legacy, .detach_client = v4l2_i2c_drv_detach_legacy, #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,20) diff --git a/linux/include/media/v4l2-i2c-drv.h b/linux/include/media/v4l2-i2c-drv.h index 73d713f07..86b575200 100644 --- a/linux/include/media/v4l2-i2c-drv.h +++ b/linux/include/media/v4l2-i2c-drv.h @@ -83,12 +83,7 @@ static struct i2c_client_address_data addr_data; /* Bus-based I2C API is not present, add legacy code */ -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) static int v4l2_i2c_drv_attach_legacy(struct i2c_adapter *adapter, int address, int kind) -#else -static int v4l2_i2c_drv_attach_legacy(struct i2c_adapter *adapter, int address, - unsigned short flags, int kind) -#endif { return v4l2_i2c_attach(adapter, address, &v4l2_i2c_driver, v4l2_i2c_data.name, v4l2_i2c_data.probe); @@ -121,14 +116,9 @@ static int v4l2_i2c_drv_detach_legacy(struct i2c_client *client) if (err) return err; kfree(client); - -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) - MOD_DEC_USE_COUNT; -#endif return 0; } -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0) #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,14) #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,20) static int v4l2_i2c_drv_suspend_helper(struct i2c_client *client, pm_message_t state) @@ -164,18 +154,16 @@ static int v4l2_i2c_drv_resume_helper(struct device * dev, u32 level) #endif return v4l2_i2c_data.resume ? v4l2_i2c_data.resume(client) : 0; } -#endif /* ----------------------------------------------------------------------- */ static struct i2c_driver v4l2_i2c_driver = { -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)) && (LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)) +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15) .owner = THIS_MODULE, #endif #if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15) .flags = I2C_DF_NOTIFY, #endif -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) .driver = { #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15) .owner = THIS_MODULE, @@ -185,7 +173,6 @@ static struct i2c_driver v4l2_i2c_driver = { .resume = v4l2_i2c_drv_resume_helper, #endif }, -#endif .attach_adapter = v4l2_i2c_drv_probe_legacy, .detach_client = v4l2_i2c_drv_detach_legacy, #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,20) -- cgit v1.2.3 From 1e35850ac2509c324478d38091880e60ab28795f Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Tue, 8 Jul 2008 01:17:00 +0200 Subject: v4l-dvb: remove support for kernels < 2.6.10 From: Hans Verkuil Phase 2 removes support for kernels < 2.6.10. Signed-off-by: Hans Verkuil --- linux/include/media/v4l2-i2c-drv-legacy.h | 13 ------------- linux/include/media/v4l2-i2c-drv.h | 13 ------------- 2 files changed, 26 deletions(-) (limited to 'linux/include/media') diff --git a/linux/include/media/v4l2-i2c-drv-legacy.h b/linux/include/media/v4l2-i2c-drv-legacy.h index f8172f3d6..738f87454 100644 --- a/linux/include/media/v4l2-i2c-drv-legacy.h +++ b/linux/include/media/v4l2-i2c-drv-legacy.h @@ -30,11 +30,7 @@ struct v4l2_i2c_driver_data { int (*suspend)(struct i2c_client *client, pm_message_t state); int (*resume)(struct i2c_client *client); int (*legacy_probe)(struct i2c_adapter *adapter); -#ifdef I2C_CLASS_TV_ANALOG int legacy_class; -#else - int legacy_id; -#endif #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26) const struct i2c_device_id *id_table; #endif @@ -62,11 +58,7 @@ static int v4l2_i2c_drv_probe_legacy(struct i2c_adapter *adapter) return i2c_probe(adapter, &addr_data, v4l2_i2c_drv_attach_legacy); return 0; } -#ifdef I2C_CLASS_TV_ANALOG if (adapter->class & v4l2_i2c_data.legacy_class) -#else - if (adapter->id == v4l2_i2c_data.legacy_id) -#endif return i2c_probe(adapter, &addr_data, v4l2_i2c_drv_attach_legacy); return 0; } @@ -171,13 +163,8 @@ static int __init v4l2_i2c_drv_init(void) strlcpy(v4l2_i2c_drv_name_legacy, v4l2_i2c_data.name, sizeof(v4l2_i2c_drv_name_legacy)); strlcat(v4l2_i2c_drv_name_legacy, "'", sizeof(v4l2_i2c_drv_name_legacy)); -#ifdef I2C_CLASS_TV_ANALOG if (v4l2_i2c_data.legacy_class == 0) v4l2_i2c_data.legacy_class = I2C_CLASS_TV_ANALOG; -#else - if (v4l2_i2c_data.legacy_id == 0) - v4l2_i2c_data.legacy_id = I2C_HW_B_BT848; -#endif #if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15) strlcpy(v4l2_i2c_driver_legacy.name, v4l2_i2c_drv_name_legacy, sizeof(v4l2_i2c_driver_legacy.name)); diff --git a/linux/include/media/v4l2-i2c-drv.h b/linux/include/media/v4l2-i2c-drv.h index 86b575200..f74c8a64a 100644 --- a/linux/include/media/v4l2-i2c-drv.h +++ b/linux/include/media/v4l2-i2c-drv.h @@ -35,11 +35,7 @@ struct v4l2_i2c_driver_data { int (*suspend)(struct i2c_client *client, pm_message_t state); int (*resume)(struct i2c_client *client); int (*legacy_probe)(struct i2c_adapter *adapter); -#ifdef I2C_CLASS_TV_ANALOG int legacy_class; -#else - int legacy_id; -#endif #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26) const struct i2c_device_id *id_table; #endif @@ -96,11 +92,7 @@ static int v4l2_i2c_drv_probe_legacy(struct i2c_adapter *adapter) return i2c_probe(adapter, &addr_data, v4l2_i2c_drv_attach_legacy); return 0; } -#ifdef I2C_CLASS_TV_ANALOG if (adapter->class & v4l2_i2c_data.legacy_class) -#else - if (adapter->id == v4l2_i2c_data.legacy_id) -#endif return i2c_probe(adapter, &addr_data, v4l2_i2c_drv_attach_legacy); return 0; } @@ -185,13 +177,8 @@ static struct i2c_driver v4l2_i2c_driver = { static int __init v4l2_i2c_drv_init(void) { -#ifdef I2C_CLASS_TV_ANALOG if (v4l2_i2c_data.legacy_class == 0) v4l2_i2c_data.legacy_class = I2C_CLASS_TV_ANALOG; -#else - if (v4l2_i2c_data.legacy_id == 0) - v4l2_i2c_data.legacy_id = I2C_HW_B_BT848; -#endif #if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15) strlcpy(v4l2_i2c_driver.name, v4l2_i2c_data.name, sizeof(v4l2_i2c_driver.name)); -- cgit v1.2.3 From ea33affdbd8d71fab71e3f62845b9239d6f60ff8 Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Tue, 8 Jul 2008 08:26:19 +0200 Subject: v4l-dvb: remove support for kernels < 2.6.13 From: Hans Verkuil Phase 3 of the compat cleanup. Signed-off-by: Hans Verkuil --- linux/include/media/pwc-ioctl.h | 7 +------ linux/include/media/v4l2-dev.h | 9 --------- linux/include/media/videobuf-dvb.h | 4 ---- 3 files changed, 1 insertion(+), 19 deletions(-) (limited to 'linux/include/media') diff --git a/linux/include/media/pwc-ioctl.h b/linux/include/media/pwc-ioctl.h index 6e32ef4e2..0f19779c4 100644 --- a/linux/include/media/pwc-ioctl.h +++ b/linux/include/media/pwc-ioctl.h @@ -55,12 +55,7 @@ #include #include -#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 10) -/* Compatibility for older kernel */ -typedef __u16 __le16; -#endif - - /* Enumeration of image sizes */ +/* Enumeration of image sizes */ #define PSZ_SQCIF 0x00 #define PSZ_QSIF 0x01 #define PSZ_QCIF 0x02 diff --git a/linux/include/media/v4l2-dev.h b/linux/include/media/v4l2-dev.h index 178989285..fb356eb57 100644 --- a/linux/include/media/v4l2-dev.h +++ b/linux/include/media/v4l2-dev.h @@ -96,11 +96,7 @@ struct video_device #endif /* sysfs */ -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,13) struct device class_dev; /* v4l device */ -#else - struct class_device class_dev; -#endif struct device *dev; /* device parent */ /* device info */ @@ -396,13 +392,8 @@ extern int video_usercopy(struct inode *inode, struct file *file, #include static inline int __must_check -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13) -video_device_create_file(struct video_device *vfd, - struct class_device_attribute *attr) -#else video_device_create_file(struct video_device *vfd, struct device_attribute *attr) -#endif { int ret = device_create_file(&vfd->class_dev, attr); if (ret < 0) diff --git a/linux/include/media/videobuf-dvb.h b/linux/include/media/videobuf-dvb.h index 14438bc98..84886be5e 100644 --- a/linux/include/media/videobuf-dvb.h +++ b/linux/include/media/videobuf-dvb.h @@ -20,11 +20,7 @@ struct videobuf_dvb { int nfeeds; /* videobuf_dvb_(un)register manges this */ -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,12)) struct dvb_adapter adapter; -#else - struct dvb_adapter *adapter; -#endif struct dvb_demux demux; struct dmxdev dmxdev; struct dmx_frontend fe_hw; -- cgit v1.2.3