diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-11-02 14:53:23 -0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-11-02 14:53:23 -0200 |
commit | ea8eb5444481b26dfae9068b9285c01187bd66d5 (patch) | |
tree | fe1a026a6f6be818128c3e09d1f9ea230147e2ca /linux/drivers/media/video/zoran_driver.c | |
parent | bfa86c068a66cffdbabbb0656d0a5064ab668c21 (diff) | |
download | mediapointer-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 'linux/drivers/media/video/zoran_driver.c')
-rw-r--r-- | linux/drivers/media/video/zoran_driver.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/linux/drivers/media/video/zoran_driver.c b/linux/drivers/media/video/zoran_driver.c index e2e8fa66a..4fa613703 100644 --- a/linux/drivers/media/video/zoran_driver.c +++ b/linux/drivers/media/video/zoran_driver.c @@ -1351,7 +1351,7 @@ zoran_open (struct inode *inode, } dprintk(1, KERN_INFO "%s: zoran_open(%s, pid=[%d]), users(-)=%d\n", - ZR_DEVNAME(zr), current->comm, current->pid, zr->user); + ZR_DEVNAME(zr), current->comm, task_pid_nr(current), zr->user); /* now, create the open()-specific file_ops struct */ fh = kzalloc(sizeof(struct zoran_fh), GFP_KERNEL); @@ -1424,7 +1424,7 @@ zoran_close (struct inode *inode, struct zoran *zr = fh->zr; dprintk(1, KERN_INFO "%s: zoran_close(%s, pid=[%d]), users(+)=%d\n", - ZR_DEVNAME(zr), current->comm, current->pid, zr->user); + ZR_DEVNAME(zr), current->comm, task_pid_nr(current), zr->user); /* kernel locks (fs/device.c), so don't do that ourselves * (prevents deadlocks) */ |