aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Isely <isely@pobox.com>2012-02-20 00:35:20 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-05-07 15:56:31 -0400
commit598e978aadd39e24749e0da5a6cff568570b1d00 (patch)
treefe56ec121c908230f5bfec5daa88c1bd39d44a8e
parentd8329f8e17af85c568768fb268e0695dd1fc8148 (diff)
[media] pvrusb2: Trivial tweak to get rid of some redundant dereferences
Signed-off-by: Mike Isely <isely@pobox.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--drivers/media/video/pvrusb2/pvrusb2-v4l2.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/media/video/pvrusb2/pvrusb2-v4l2.c b/drivers/media/video/pvrusb2/pvrusb2-v4l2.c
index 4c1a47470d39..7bddfaeeafc3 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-v4l2.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-v4l2.c
@@ -1309,10 +1309,12 @@ static void pvr2_v4l2_dev_init(struct pvr2_v4l2_dev *dip,
1309 struct usb_device *usbdev; 1309 struct usb_device *usbdev;
1310 int mindevnum; 1310 int mindevnum;
1311 int unit_number; 1311 int unit_number;
1312 struct pvr2_hdw *hdw;
1312 int *nr_ptr = NULL; 1313 int *nr_ptr = NULL;
1313 dip->v4lp = vp; 1314 dip->v4lp = vp;
1314 1315
1315 usbdev = pvr2_hdw_get_dev(vp->channel.mc_head->hdw); 1316 hdw = vp->channel.mc_head->hdw;
1317 usbdev = pvr2_hdw_get_dev(hdw);
1316 dip->v4l_type = v4l_type; 1318 dip->v4l_type = v4l_type;
1317 switch (v4l_type) { 1319 switch (v4l_type) {
1318 case VFL_TYPE_GRABBER: 1320 case VFL_TYPE_GRABBER:
@@ -1351,13 +1353,13 @@ static void pvr2_v4l2_dev_init(struct pvr2_v4l2_dev *dip,
1351 { 1353 {
1352 int val; 1354 int val;
1353 pvr2_ctrl_get_value( 1355 pvr2_ctrl_get_value(
1354 pvr2_hdw_get_ctrl_by_id(vp->channel.mc_head->hdw, 1356 pvr2_hdw_get_ctrl_by_id(hdw,
1355 PVR2_CID_STDAVAIL), &val); 1357 PVR2_CID_STDAVAIL), &val);
1356 dip->devbase.tvnorms = (v4l2_std_id)val; 1358 dip->devbase.tvnorms = (v4l2_std_id)val;
1357 } 1359 }
1358 1360
1359 mindevnum = -1; 1361 mindevnum = -1;
1360 unit_number = pvr2_hdw_get_unit_number(vp->channel.mc_head->hdw); 1362 unit_number = pvr2_hdw_get_unit_number(hdw);
1361 if (nr_ptr && (unit_number >= 0) && (unit_number < PVR_NUM)) { 1363 if (nr_ptr && (unit_number >= 0) && (unit_number < PVR_NUM)) {
1362 mindevnum = nr_ptr[unit_number]; 1364 mindevnum = nr_ptr[unit_number];
1363 } 1365 }
@@ -1374,7 +1376,7 @@ static void pvr2_v4l2_dev_init(struct pvr2_v4l2_dev *dip,
1374 video_device_node_name(&dip->devbase), 1376 video_device_node_name(&dip->devbase),
1375 pvr2_config_get_name(dip->config)); 1377 pvr2_config_get_name(dip->config));
1376 1378
1377 pvr2_hdw_v4l_store_minor_number(vp->channel.mc_head->hdw, 1379 pvr2_hdw_v4l_store_minor_number(hdw,
1378 dip->minor_type,dip->devbase.minor); 1380 dip->minor_type,dip->devbase.minor);
1379} 1381}
1380 1382