]> Pileus Git - ~andy/linux/blobdiff - drivers/input/touchscreen/ucb1400_ts.c
Merge branch 'xen-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen
[~andy/linux] / drivers / input / touchscreen / ucb1400_ts.c
index 24000f0efeaacb1130bcf0b28d3f0a0bb90aa5ba..86aed64ec0fb9dd54c5ed3ec1b134f62a2615d6e 100644 (file)
@@ -130,8 +130,7 @@ static unsigned int ucb1400_adc_read(struct ucb1400 *ucb, u16 adc_channel)
                if (val & UCB_ADC_DAT_VALID)
                        break;
                /* yield to other processes */
-               set_current_state(TASK_INTERRUPTIBLE);
-               schedule_timeout(1);
+               schedule_timeout_uninterruptible(1);
        }
 
        return UCB_ADC_DAT_VALUE(val);
@@ -288,10 +287,11 @@ static int ucb1400_ts_thread(void *_ucb)
        struct ucb1400 *ucb = _ucb;
        struct task_struct *tsk = current;
        int valid = 0;
+       struct sched_param param = { .sched_priority = 1 };
 
-       tsk->policy = SCHED_FIFO;
-       tsk->rt_priority = 1;
+       sched_setscheduler(tsk, SCHED_FIFO, &param);
 
+       set_freezable();
        while (!kthread_should_stop()) {
                unsigned int x, y, p;
                long timeout;
@@ -557,6 +557,7 @@ static int ucb1400_ts_remove(struct device *dev)
 }
 
 static struct device_driver ucb1400_ts_driver = {
+       .name           = "ucb1400_ts",
        .owner          = THIS_MODULE,
        .bus            = &ac97_bus_type,
        .probe          = ucb1400_ts_probe,