diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2009-12-10 08:47:13 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-12-15 21:17:57 -0500 |
commit | 50462eb065e12f45851a9959a90d46b758944552 (patch) | |
tree | fea5b79f1852183c5eaa3f079d5054dc78a828fa /drivers/media/video/saa7134 | |
parent | 63b0d5ad20365edf8baf96cdbb8e7faf62501286 (diff) |
V4L/DVB (13555): v4l: Use video_device_node_name() instead of the minor number
Instead of using the minor number in kernel log messages, use the device
node name as returned by the video_device_node_name() function. This
makes debug, informational and error messages easier to understand for
end users.
[mchehab.redhat.com: removed tm6000 changes as tm6000 is not ready yet for submission even on staging]
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/saa7134')
-rw-r--r-- | drivers/media/video/saa7134/saa7134-empress.c | 4 | ||||
-rw-r--r-- | drivers/media/video/saa7134/saa7134-video.c | 5 |
2 files changed, 4 insertions, 5 deletions
diff --git a/drivers/media/video/saa7134/saa7134-empress.c b/drivers/media/video/saa7134/saa7134-empress.c index 1de27af54590..df56241b30a4 100644 --- a/drivers/media/video/saa7134/saa7134-empress.c +++ b/drivers/media/video/saa7134/saa7134-empress.c | |||
@@ -86,11 +86,11 @@ static int ts_init_encoder(struct saa7134_dev* dev) | |||
86 | 86 | ||
87 | static int ts_open(struct file *file) | 87 | static int ts_open(struct file *file) |
88 | { | 88 | { |
89 | int minor = video_devdata(file)->minor; | 89 | struct video_device *vdev = video_devdata(file); |
90 | struct saa7134_dev *dev = video_drvdata(file); | 90 | struct saa7134_dev *dev = video_drvdata(file); |
91 | int err; | 91 | int err; |
92 | 92 | ||
93 | dprintk("open minor=%d\n",minor); | 93 | dprintk("open dev=%s\n", video_device_node_name(vdev)); |
94 | err = -EBUSY; | 94 | err = -EBUSY; |
95 | if (!mutex_trylock(&dev->empress_tsq.vb_lock)) | 95 | if (!mutex_trylock(&dev->empress_tsq.vb_lock)) |
96 | goto done; | 96 | goto done; |
diff --git a/drivers/media/video/saa7134/saa7134-video.c b/drivers/media/video/saa7134/saa7134-video.c index bcca5a479817..9d26b1bd732e 100644 --- a/drivers/media/video/saa7134/saa7134-video.c +++ b/drivers/media/video/saa7134/saa7134-video.c | |||
@@ -1326,7 +1326,6 @@ static int saa7134_resource(struct saa7134_fh *fh) | |||
1326 | 1326 | ||
1327 | static int video_open(struct file *file) | 1327 | static int video_open(struct file *file) |
1328 | { | 1328 | { |
1329 | int minor = video_devdata(file)->minor; | ||
1330 | struct video_device *vdev = video_devdata(file); | 1329 | struct video_device *vdev = video_devdata(file); |
1331 | struct saa7134_dev *dev = video_drvdata(file); | 1330 | struct saa7134_dev *dev = video_drvdata(file); |
1332 | struct saa7134_fh *fh; | 1331 | struct saa7134_fh *fh; |
@@ -1345,8 +1344,8 @@ static int video_open(struct file *file) | |||
1345 | break; | 1344 | break; |
1346 | } | 1345 | } |
1347 | 1346 | ||
1348 | dprintk("open minor=%d radio=%d type=%s\n",minor,radio, | 1347 | dprintk("open dev=%s radio=%d type=%s\n", video_device_node_name(vdev), |
1349 | v4l2_type_names[type]); | 1348 | radio, v4l2_type_names[type]); |
1350 | 1349 | ||
1351 | /* allocate + initialize per filehandle data */ | 1350 | /* allocate + initialize per filehandle data */ |
1352 | fh = kzalloc(sizeof(*fh),GFP_KERNEL); | 1351 | fh = kzalloc(sizeof(*fh),GFP_KERNEL); |