diff options
Diffstat (limited to 'linux/drivers/media/video/saa6588.c')
-rw-r--r-- | linux/drivers/media/video/saa6588.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/linux/drivers/media/video/saa6588.c b/linux/drivers/media/video/saa6588.c index 4b2375c80..ff6f29eac 100644 --- a/linux/drivers/media/video/saa6588.c +++ b/linux/drivers/media/video/saa6588.c @@ -331,9 +331,17 @@ static void saa6588_timer(unsigned long data) schedule_work(&s->work); } +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20) static void saa6588_work(void *data) +#else +static void saa6588_work(struct work_struct *work) +#endif { +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20) struct saa6588 *s = (struct saa6588 *)data; +#else + struct saa6588 *s = container_of(work, struct saa6588, work); +#endif saa6588_i2c_poll(s); mod_timer(&s->timer, jiffies + msecs_to_jiffies(20)); @@ -430,7 +438,11 @@ static int saa6588_attach(struct i2c_adapter *adap, int addr, unsigned short fla saa6588_configure(s); /* start polling via eventd */ +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20) INIT_WORK(&s->work, saa6588_work, s); +#else + INIT_WORK(&s->work, saa6588_work); +#endif init_timer(&s->timer); s->timer.function = saa6588_timer; s->timer.data = (unsigned long)s; |