From 792ee989bae4e2a54629b2b819619163297648ee Mon Sep 17 00:00:00 2001 From: Douglas Schilling Landgraf Date: Thu, 14 Feb 2008 00:13:36 -0200 Subject: radio-si470x: Add kernel validation to work queue From: Douglas Schilling Landgraf Added kernel validation to support work_struct/delayed_work. (kernel < 2.6.20) Signed-off-by: Douglas Schilling Landgraf --- linux/drivers/media/radio/radio-si470x.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'linux/drivers') diff --git a/linux/drivers/media/radio/radio-si470x.c b/linux/drivers/media/radio/radio-si470x.c index d7fe70a00..e999b2fc3 100644 --- a/linux/drivers/media/radio/radio-si470x.c +++ b/linux/drivers/media/radio/radio-si470x.c @@ -432,7 +432,12 @@ struct si470x_device { unsigned short registers[RADIO_REGISTER_NUM]; /* RDS receive buffer */ +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20) + struct work_struct work; +#else struct delayed_work work; +#endif + wait_queue_head_t read_queue; #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 16) struct mutex lock; /* buffer locking */ -- cgit v1.2.3