summaryrefslogtreecommitdiff
path: root/v4l
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2007-11-02 14:53:23 -0200
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-11-02 14:53:23 -0200
commitea8eb5444481b26dfae9068b9285c01187bd66d5 (patch)
treefe1a026a6f6be818128c3e09d1f9ea230147e2ca /v4l
parentbfa86c068a66cffdbabbb0656d0a5064ab668c21 (diff)
downloadmediapointer-dvb-s2-ea8eb5444481b26dfae9068b9285c01187bd66d5.tar.gz
mediapointer-dvb-s2-ea8eb5444481b26dfae9068b9285c01187bd66d5.tar.bz2
Backport commit ba25f9dcc4ea6e30839fcab5a5516f2176d5bfed
kern-sync: Author: Pavel Emelyanov <xemul@openvz.org> Date: Thu Oct 18 23:40:40 2007 -0700 Use helpers to obtain task pid in printks The task_struct->pid member is going to be deprecated, so start using the helpers (task_pid_nr/task_pid_vnr/task_pid_nr_ns) in the kernel. The first thing to start with is the pid, printed to dmesg - in this case we may safely use task_pid_nr(). Besides, printks produce more (much more) than a half of all the explicit pid usage. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'v4l')
-rw-r--r--v4l/compat.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/v4l/compat.h b/v4l/compat.h
index db45d91f0..6f198e688 100644
--- a/v4l/compat.h
+++ b/v4l/compat.h
@@ -462,6 +462,10 @@ static inline unsigned int snd_pcm_rate_to_rate_bit(unsigned int rate)
}
#endif
+#ifndef task_pid_nr
+# define task_pid_nr(current) ((current)->pid)
+#endif
+
#endif
/*
* Local variables: