diff options
author | Mike Isely <isely@pobox.com> | 2007-11-25 22:53:12 -0600 |
---|---|---|
committer | Mike Isely <isely@pobox.com> | 2007-11-25 22:53:12 -0600 |
commit | 2446fc6debfd93e7b8b9cad4b22083994f686e59 (patch) | |
tree | fa19199cc5340b991b332af336dddd9e078cbf6c /linux/drivers/media/video/pvrusb2/pvrusb2-i2c-core.c | |
parent | 1cd04c75ca99803aa0a1bd9b4952f2d61e72c4f4 (diff) | |
download | mediapointer-dvb-s2-2446fc6debfd93e7b8b9cad4b22083994f686e59.tar.gz mediapointer-dvb-s2-2446fc6debfd93e7b8b9cad4b22083994f686e59.tar.bz2 |
pvrusb2: Centralize device specific attributes into a single place.
From: Mike Isely <isely@pobox.com>
The pvrusb2 driver currently supports two variants of the Hauppauge
PVR USB2. However there are other hardware types potentially
supportable, but the driver at the moment is not structured to make it
easy to describe these minor variations. This changeset is the first
set of changes to make such additional device support possible.
Device attributes are held in several tables all contained within
pvrusb2-devattr.c; all other device-specific driver behavior now
derives from these tables.
Signed-off-by: Mike Isely <isely@pobox.com>
Diffstat (limited to 'linux/drivers/media/video/pvrusb2/pvrusb2-i2c-core.c')
-rw-r--r-- | linux/drivers/media/video/pvrusb2/pvrusb2-i2c-core.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-i2c-core.c b/linux/drivers/media/video/pvrusb2/pvrusb2-i2c-core.c index bf8c9ee12..713c7011c 100644 --- a/linux/drivers/media/video/pvrusb2/pvrusb2-i2c-core.c +++ b/linux/drivers/media/video/pvrusb2/pvrusb2-i2c-core.c @@ -1066,14 +1066,16 @@ void pvr2_i2c_core_init(struct pvr2_hdw *hdw) printk(KERN_INFO "%s: IR disabled\n",hdw->name); hdw->i2c_func[0x18] = i2c_black_hole; } else if (ir_mode[hdw->unit_number] == 1) { - if (hdw->hdw_type == PVR2_HDW_TYPE_24XXX) { + if (hdw->hdw_desc->flag_has_cx25840) { hdw->i2c_func[0x18] = i2c_24xxx_ir; } } - if (hdw->hdw_type == PVR2_HDW_TYPE_24XXX) { - hdw->i2c_func[0x1b] = i2c_hack_wm8775; + if (hdw->hdw_desc->flag_has_cx25840) { hdw->i2c_func[0x44] = i2c_hack_cx25840; } + if (hdw->hdw_desc->flag_has_wm8775) { + hdw->i2c_func[0x1b] = i2c_hack_wm8775; + } // Configure the adapter and set up everything else related to it. memcpy(&hdw->i2c_adap,&pvr2_i2c_adap_template,sizeof(hdw->i2c_adap)); |