summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--linux/drivers/media/video/zoran_driver.c4
-rw-r--r--v4l/compat.h4
2 files changed, 6 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) */
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: