mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] Fix Philips UCB1400 driver to use sched_setscheduler
@ 2007-05-11 10:39 Satoru Takeuchi
  0 siblings, 0 replies; only message in thread
From: Satoru Takeuchi @ 2007-05-11 10:39 UTC (permalink / raw)
  To: Linux Kernel, Nicolas Pitre; +Cc: Satoru Takeuchi

Fix Philips UCB1400 driver to use sched_setscheduler() instead of setting
the fields of task_struct directly.

Signed-off-by: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com>

Index: linux-2.6.21/drivers/input/touchscreen/ucb1400_ts.c
===================================================================
--- linux-2.6.21.orig/drivers/input/touchscreen/ucb1400_ts.c	2007-05-11 19:14:30.000000000 +0900
+++ linux-2.6.21/drivers/input/touchscreen/ucb1400_ts.c	2007-05-11 19:16:39.000000000 +0900
@@ -285,9 +285,9 @@ 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);
 
 	while (!kthread_should_stop()) {
 		unsigned int x, y, p;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-05-11 10:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-05-11 10:39 [PATCH] Fix Philips UCB1400 driver to use sched_setscheduler Satoru Takeuchi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®