aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/pvrusb2/pvrusb2-hdw.c
diff options
context:
space:
mode:
authorMike Isely <isely@pobox.com>2007-12-08 15:20:06 -0500
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-01-25 16:03:26 -0500
commitd130fa8a05ee5f39c786df02dd75d1eebb12633b (patch)
tree230e68d3262f157690f04f79556ce0fb26301437 /drivers/media/video/pvrusb2/pvrusb2-hdw.c
parent066bba2d1ccdac2005a64f4c87f8b542744ed94c (diff)
V4L/DVB (6773): pvrusb2: rework device descriptor layout
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> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/pvrusb2/pvrusb2-hdw.c')
-rw-r--r--drivers/media/video/pvrusb2/pvrusb2-hdw.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/media/video/pvrusb2/pvrusb2-hdw.c b/drivers/media/video/pvrusb2/pvrusb2-hdw.c
index 54d2c4ab7a31..41ae980405ed 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-hdw.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-hdw.c
@@ -1813,7 +1813,6 @@ struct pvr2_hdw *pvr2_hdw_create(struct usb_interface *intf,
1813{ 1813{
1814 unsigned int idx,cnt1,cnt2; 1814 unsigned int idx,cnt1,cnt2;
1815 struct pvr2_hdw *hdw; 1815 struct pvr2_hdw *hdw;
1816 unsigned int hdw_type;
1817 int valid_std_mask; 1816 int valid_std_mask;
1818 struct pvr2_ctrl *cptr; 1817 struct pvr2_ctrl *cptr;
1819 const struct pvr2_device_desc *hdw_desc; 1818 const struct pvr2_device_desc *hdw_desc;
@@ -1821,13 +1820,7 @@ struct pvr2_hdw *pvr2_hdw_create(struct usb_interface *intf,
1821 struct v4l2_queryctrl qctrl; 1820 struct v4l2_queryctrl qctrl;
1822 struct pvr2_ctl_info *ciptr; 1821 struct pvr2_ctl_info *ciptr;
1823 1822
1824 hdw_type = devid - pvr2_device_table; 1823 hdw_desc = (const struct pvr2_device_desc *)(devid->driver_info);
1825 if (hdw_type >= pvr2_device_count) {
1826 pvr2_trace(PVR2_TRACE_ERROR_LEGS,
1827 "Bogus device type of %u reported",hdw_type);
1828 return NULL;
1829 }
1830 hdw_desc = pvr2_device_descriptions + hdw_type;
1831 1824
1832 hdw = kzalloc(sizeof(*hdw),GFP_KERNEL); 1825 hdw = kzalloc(sizeof(*hdw),GFP_KERNEL);
1833 pvr2_trace(PVR2_TRACE_INIT,"pvr2_hdw_create: hdw=%p, type \"%s\"", 1826 pvr2_trace(PVR2_TRACE_INIT,"pvr2_hdw_create: hdw=%p, type \"%s\"",