diff -u lirc-0.8.4a/debian/changelog lirc-0.8.4a/debian/changelog --- lirc-0.8.4a/debian/changelog +++ lirc-0.8.4a/debian/changelog @@ -1,3 +1,10 @@ +lirc (0.8.4a-0ubuntu4) jaunty; urgency=low + + * debian/patches/12_pvr150_transmit_support: + - Fix compilation for latest kernels (LP: #306346). + + -- Kenny Millington Tue, 03 Mar 2009 12:44:27 +0000 + lirc (0.8.4a-0ubuntu3) jaunty; urgency=low * debian/udev.rules: Rename to debian/lirc.udev diff -u lirc-0.8.4a/debian/patches/12_pvr150_transmit_support lirc-0.8.4a/debian/patches/12_pvr150_transmit_support --- lirc-0.8.4a/debian/patches/12_pvr150_transmit_support +++ lirc-0.8.4a/debian/patches/12_pvr150_transmit_support @@ -537,7 +537,7 @@ diff -urNad lirc-0.8.4a~/drivers/lirc_pvr150/lirc_pvr150.c lirc-0.8.4a/drivers/lirc_pvr150/lirc_pvr150.c --- lirc-0.8.4a~/drivers/lirc_pvr150/lirc_pvr150.c 1969-12-31 18:00:00.000000000 -0600 +++ lirc-0.8.4a/drivers/lirc_pvr150/lirc_pvr150.c 2008-11-08 19:13:49.000000000 -0600 -@@ -0,0 +1,1483 @@ +@@ -0,0 +1,1517 @@ +/* $Id: $ */ + +/* @@ -597,12 +597,18 @@ +#include +#include +#include -+ ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 27) +#include ++#else ++#include ++#endif + +#include "drivers/kcompat.h" +#include "drivers/lirc_dev/lirc_dev.h" +#include "drivers/lirc.h" ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 23) ++#include ++#endif + +/* We need to be able to reset the crappy IR chip by talking to the ivtv driver */ +struct ivtv; @@ -624,10 +630,14 @@ + struct semaphore buf_sem; + + /* RX polling thread data */ ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 23) + struct completion *t_notify; + struct completion *t_notify2; + int shutdown; + int tpid; ++#else ++ struct task_struct *task; ++#endif + + /* RX read data */ + unsigned char b[3]; @@ -793,6 +803,7 @@ +{ + struct IR *ir = arg; + ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 23) + /* This thread doesn't need any user-level access, + * so get rid of all our resources + */ @@ -801,6 +812,7 @@ + if (ir->t_notify != NULL) { + complete(ir->t_notify); + } ++#endif + + dprintk("poll thread started\n"); + @@ -820,7 +832,11 @@ + lost keypresses. + */ + schedule_timeout((260 * HZ) / 1000); ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 23) + if (ir->shutdown) { ++#else ++ if (kthread_should_stop()) { ++#endif + break; + } + if (!add_to_buf(ir)) { @@ -831,6 +847,7 @@ + set_current_state(TASK_INTERRUPTIBLE); + schedule_timeout(HZ/2); + } ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 23) + } while (!ir->shutdown); + + if (ir->t_notify2 != NULL) { @@ -841,7 +858,9 @@ + if (ir->t_notify != NULL) { + complete(ir->t_notify); + } -+ ++#else ++ } while (!kthread_should_stop()); ++#endif + dprintk("poll thread ended\n"); + return 0; +} @@ -1766,10 +1785,12 @@ + init_MUTEX(&ir->buf_sem); + ir->open = 0; + ir->devs = 0; -+ ir->tpid = 0; + ir->need_boot = 1; ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 23) ++ ir->tpid = 0; + ir->shutdown = 0; + ir->t_notify = ir->t_notify2 = NULL; ++#endif + for (i = 0; i < sizeof(ir->b); ++i) + ir->b[0] = 0; + @@ -1790,16 +1811,23 @@ + goto err; + + /* try to fire up polling thread */ ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 23) + ir->t_notify = &tn; + ir->tpid = kernel_thread(lirc_thread, ir, 0); + if (ir->tpid < 0) { ++#else ++ ir->task = kthread_run(lirc_thread, (void *)ir, "lirc_pvr150"); ++ if (IS_ERR(ir->task)) { ++#endif + printk(KERN_ERR "lirc_pvr150: lirc_register_plugin: " + "cannot run poll thread\n"); + ret = -ECHILD; + goto err; + } ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 23) + wait_for_completion(&tn); + ir->t_notify = NULL; ++#endif + } + + /* initialise TX device */ @@ -1860,6 +1888,7 @@ + down(&ir->lock); + + if (client == &ir->c_rx) { ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 23) + DECLARE_COMPLETION(tn); + DECLARE_COMPLETION(tn2); + @@ -1879,7 +1908,12 @@ + ir->t_notify = NULL; + ir->t_notify2 = NULL; + } -+ ++#else /* kernel >= 2.6.23 */ ++ if (ir->task) { ++ wake_up_process(ir->task); ++ kthread_stop(ir->task); ++ } ++#endif + /* unregister device */ + i2c_release_client(&ir->c_rx); + i2c_detach_client(&ir->c_rx);