diff options
author | Mike Isely <isely@pobox.com> | 2007-12-08 14:20:06 -0600 |
---|---|---|
committer | Mike Isely <isely@pobox.com> | 2007-12-08 14:20:06 -0600 |
commit | 67011f6563926b0c8cc4f97a34dab3b7a6306f2d (patch) | |
tree | 0af34310afe3a12410321f1eea8ef6176945d1a7 /linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c | |
parent | 61da38b69f3317a911fd87cc4ceb775723c612cb (diff) | |
download | mediapointer-dvb-s2-67011f6563926b0c8cc4f97a34dab3b7a6306f2d.tar.gz mediapointer-dvb-s2-67011f6563926b0c8cc4f97a34dab3b7a6306f2d.tar.bz2 |
pvrusb2: rework device descriptor layout
From: Mike Isely <isely@pobox.com>
The pvrusb2 driver tries to keep all device specific attributes in a
single data structure in one source file. This change further cleans
up how that table is set up. We now try to group everything together
for each specific device, and the number of symbols exported from this
module has now been reduced to a single global.
Signed-off-by: Mike Isely <isely@pobox.com>
Diffstat (limited to 'linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c')
-rw-r--r-- | linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c b/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c index 22d9c8f5c..0a5d488b8 100644 --- a/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c +++ b/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c @@ -1823,7 +1823,6 @@ struct pvr2_hdw *pvr2_hdw_create(struct usb_interface *intf, { unsigned int idx,cnt1,cnt2; struct pvr2_hdw *hdw; - unsigned int hdw_type; int valid_std_mask; struct pvr2_ctrl *cptr; const struct pvr2_device_desc *hdw_desc; @@ -1831,13 +1830,7 @@ struct pvr2_hdw *pvr2_hdw_create(struct usb_interface *intf, struct v4l2_queryctrl qctrl; struct pvr2_ctl_info *ciptr; - hdw_type = devid - pvr2_device_table; - if (hdw_type >= pvr2_device_count) { - pvr2_trace(PVR2_TRACE_ERROR_LEGS, - "Bogus device type of %u reported",hdw_type); - return NULL; - } - hdw_desc = pvr2_device_descriptions + hdw_type; + hdw_desc = (const struct pvr2_device_desc *)(devid->driver_info); hdw = kzalloc(sizeof(*hdw),GFP_KERNEL); pvr2_trace(PVR2_TRACE_INIT,"pvr2_hdw_create: hdw=%p, type \"%s\"", |