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/cx231xx/cx231xx-cards.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'linux/drivers/media/video/cx231xx/cx231xx-cards.c') diff --git a/linux/drivers/media/video/cx231xx/cx231xx-cards.c b/linux/drivers/media/video/cx231xx/cx231xx-cards.c index 68f92da9e..f388262bd 100644 --- a/linux/drivers/media/video/cx231xx/cx231xx-cards.c +++ b/linux/drivers/media/video/cx231xx/cx231xx-cards.c @@ -282,12 +282,25 @@ static void cx231xx_config_tuner(struct cx231xx *dev) } /* ----------------------------------------------------------------------- */ +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 30) +void cx231xx_set_ir(struct cx231xx *dev, struct IR_i2c *ir) +#else void cx231xx_register_i2c_ir(struct cx231xx *dev) +#endif { +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 30) + if (disable_ir) { + ir->get_key = NULL; +#else if (disable_ir) +#endif return; +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 30) + } +#else /* REVISIT: instantiate IR device */ +#endif /* detect & configure */ switch (dev->model) { -- cgit v1.2.3