From 9c9fd460173573929daf32f42a502283a9aaae26 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Wed, 27 May 2009 15:32:23 -0300 Subject: Building system: Restore compilation with kernels older than 2.6.29 From: Mauro Carvalho Chehab Mostly due to ir-kdb-i2c, but also due to two new drivers, compilation with kernels older than 2.6.29 were broken. This quick and dirty changeset, generated semi-automatically, restaures backport to the subsystem by adding lots of #ifs. It is possible to write a much more small changeset that would restore backport without adding so many ifs, but, due to the lack of time, this will also solve it. Signed-off-by: Mauro Carvalho Chehab --- linux/drivers/media/video/pvrusb2/pvrusb2-i2c-core.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'linux/drivers/media/video/pvrusb2/pvrusb2-i2c-core.c') diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-i2c-core.c b/linux/drivers/media/video/pvrusb2/pvrusb2-i2c-core.c index 694e51f58..24644fc96 100644 --- a/linux/drivers/media/video/pvrusb2/pvrusb2-i2c-core.c +++ b/linux/drivers/media/video/pvrusb2/pvrusb2-i2c-core.c @@ -651,6 +651,7 @@ static void do_i2c_scan(struct pvr2_hdw *hdw) static void pvr2_i2c_register_ir(struct pvr2_hdw *hdw) { +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 30) struct i2c_board_info info; unsigned char addr = 0; if (pvr2_disable_ir_video) { @@ -672,6 +673,7 @@ static void pvr2_i2c_register_ir(struct pvr2_hdw *hdw) strlcpy(info.type, "ir_video", I2C_NAME_SIZE); info.addr = addr; i2c_new_device(&hdw->i2c_adap, &info); +#endif } void pvr2_i2c_core_init(struct pvr2_hdw *hdw) -- cgit v1.2.3