aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMike Isely <isely@pobox.com>2012-02-20 02:35:20 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-05-07 16:56:31 -0300
commit598e978aadd39e24749e0da5a6cff568570b1d00 (patch)
treefe56ec121c908230f5bfec5daa88c1bd39d44a8e /drivers
parent[media] pvrusb2: Base available video standards on what hardware supports (diff)
downloadlinux-dev-598e978aadd39e24749e0da5a6cff568570b1d00.tar.xz
linux-dev-598e978aadd39e24749e0da5a6cff568570b1d00.zip
[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>
Diffstat (limited to 'drivers')
-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,
struct usb_device *usbdev;
int mindevnum;
int unit_number;
+ struct pvr2_hdw *hdw;
int *nr_ptr = NULL;
dip->v4lp = vp;
- usbdev = pvr2_hdw_get_dev(vp->channel.mc_head->hdw);
+ hdw = vp->channel.mc_head->hdw;
+ usbdev = pvr2_hdw_get_dev(hdw);
dip->v4l_type = v4l_type;
switch (v4l_type) {
case VFL_TYPE_GRABBER:
@@ -1351,13 +1353,13 @@ static void pvr2_v4l2_dev_init(struct pvr2_v4l2_dev *dip,
{
int val;
pvr2_ctrl_get_value(
- pvr2_hdw_get_ctrl_by_id(vp->channel.mc_head->hdw,
+ pvr2_hdw_get_ctrl_by_id(hdw,
PVR2_CID_STDAVAIL), &val);
dip->devbase.tvnorms = (v4l2_std_id)val;
}
mindevnum = -1;
- unit_number = pvr2_hdw_get_unit_number(vp->channel.mc_head->hdw);
+ unit_number = pvr2_hdw_get_unit_number(hdw);
if (nr_ptr && (unit_number >= 0) && (unit_number < PVR_NUM)) {
mindevnum = nr_ptr[unit_number];
}
@@ -1374,7 +1376,7 @@ static void pvr2_v4l2_dev_init(struct pvr2_v4l2_dev *dip,
video_device_node_name(&dip->devbase),
pvr2_config_get_name(dip->config));
- pvr2_hdw_v4l_store_minor_number(vp->channel.mc_head->hdw,
+ pvr2_hdw_v4l_store_minor_number(hdw,
dip->minor_type,dip->devbase.minor);
}