Skip to content

Commit

Permalink
V4L/DVB (4595): Remove CONFIG_VIDEO_PVRUSB2_24XXX from pvrusb2 driver
Browse files Browse the repository at this point in the history
Support for 24xxx devices was previously explicitly bracketed with
CONFIG_VIDEO_PVRUSB2_24XXX inside the code because we didn't trust the
stability of these changes.  We trust it now; so there's no reason to
leave this out of the driver anymore.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
  • Loading branch information
Mike Isely authored and Mauro Carvalho Chehab committed Sep 26, 2006
1 parent 4d31256 commit 7f19d02
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 28 deletions.
2 changes: 0 additions & 2 deletions drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,7 @@ struct pvr2_decoder_ctrl {

/* Known major hardware variants, keyed from device ID */
#define PVR2_HDW_TYPE_29XXX 0
#ifdef CONFIG_VIDEO_PVRUSB2_24XXX
#define PVR2_HDW_TYPE_24XXX 1
#endif

typedef int (*pvr2_i2c_func)(struct pvr2_hdw *,u8,u8 *,u16,u8 *, u16);
#define PVR2_I2C_FUNC_CNT 128
Expand Down
16 changes: 0 additions & 16 deletions drivers/media/video/pvrusb2/pvrusb2-hdw.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,34 +38,28 @@

struct usb_device_id pvr2_device_table[] = {
[PVR2_HDW_TYPE_29XXX] = { USB_DEVICE(0x2040, 0x2900) },
#ifdef CONFIG_VIDEO_PVRUSB2_24XXX
[PVR2_HDW_TYPE_24XXX] = { USB_DEVICE(0x2040, 0x2400) },
#endif
{ }
};

MODULE_DEVICE_TABLE(usb, pvr2_device_table);

static const char *pvr2_device_names[] = {
[PVR2_HDW_TYPE_29XXX] = "WinTV PVR USB2 Model Category 29xxxx",
#ifdef CONFIG_VIDEO_PVRUSB2_24XXX
[PVR2_HDW_TYPE_24XXX] = "WinTV PVR USB2 Model Category 24xxxx",
#endif
};

struct pvr2_string_table {
const char **lst;
unsigned int cnt;
};

#ifdef CONFIG_VIDEO_PVRUSB2_24XXX
// Names of other client modules to request for 24xxx model hardware
static const char *pvr2_client_24xxx[] = {
"cx25840",
"tuner",
"wm8775",
};
#endif

// Names of other client modules to request for 29xxx model hardware
static const char *pvr2_client_29xxx[] = {
Expand All @@ -79,12 +73,10 @@ static struct pvr2_string_table pvr2_client_lists[] = {
pvr2_client_29xxx,
sizeof(pvr2_client_29xxx)/sizeof(pvr2_client_29xxx[0]),
},
#ifdef CONFIG_VIDEO_PVRUSB2_24XXX
[PVR2_HDW_TYPE_24XXX] = {
pvr2_client_24xxx,
sizeof(pvr2_client_24xxx)/sizeof(pvr2_client_24xxx[0]),
},
#endif
};

static struct pvr2_hdw *unit_pointers[PVR_NUM] = {[ 0 ... PVR_NUM-1 ] = NULL};
Expand Down Expand Up @@ -363,7 +355,6 @@ static int ctrl_freq_set(struct pvr2_ctrl *cptr,int m,int v)
return 0;
}

#ifdef CONFIG_VIDEO_PVRUSB2_24XXX
static int ctrl_hres_max_get(struct pvr2_ctrl *cptr,int *vp)
{
/* If we're dealing with a 24xxx device, force the horizontal
Expand All @@ -385,7 +376,6 @@ static int ctrl_hres_min_get(struct pvr2_ctrl *cptr,int *vp)
if (cptr->hdw->hdw_type == PVR2_HDW_TYPE_24XXX) *vp = 720;
return 0;
}
#endif

static int ctrl_cx2341x_is_dirty(struct pvr2_ctrl *cptr)
{
Expand Down Expand Up @@ -745,12 +735,10 @@ static const struct pvr2_ctl_info control_defs[] = {
.default_value = 720,
DEFREF(res_hor),
DEFINT(320,720),
#ifdef CONFIG_VIDEO_PVRUSB2_24XXX
/* Hook in check for clamp on horizontal resolution in
order to avoid unsolved problem involving cx25840. */
.get_max_value = ctrl_hres_max_get,
.get_min_value = ctrl_hres_min_get,
#endif
},{
.desc = "Vertical capture resolution",
.name = "resolution_ver",
Expand Down Expand Up @@ -966,22 +954,18 @@ static int pvr2_upload_firmware1(struct pvr2_hdw *hdw)
static const char *fw_files_29xxx[] = {
"v4l-pvrusb2-29xxx-01.fw",
};
#ifdef CONFIG_VIDEO_PVRUSB2_24XXX
static const char *fw_files_24xxx[] = {
"v4l-pvrusb2-24xxx-01.fw",
};
#endif
static const struct pvr2_string_table fw_file_defs[] = {
[PVR2_HDW_TYPE_29XXX] = {
fw_files_29xxx,
sizeof(fw_files_29xxx)/sizeof(fw_files_29xxx[0]),
},
#ifdef CONFIG_VIDEO_PVRUSB2_24XXX
[PVR2_HDW_TYPE_24XXX] = {
fw_files_24xxx,
sizeof(fw_files_24xxx)/sizeof(fw_files_24xxx[0]),
},
#endif
};
hdw->fw1_state = FW1_STATE_FAILED; // default result

Expand Down
4 changes: 0 additions & 4 deletions drivers/media/video/pvrusb2/pvrusb2-i2c-chips-v4l2.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,8 @@
#include "pvrusb2-audio.h"
#include "pvrusb2-tuner.h"
#include "pvrusb2-video-v4l.h"
#ifdef CONFIG_VIDEO_PVRUSB2_24XXX
#include "pvrusb2-cx2584x-v4l.h"
#include "pvrusb2-wm8775.h"
#endif

#define trace_i2c(...) pvr2_trace(PVR2_TRACE_I2C,__VA_ARGS__)

Expand Down Expand Up @@ -71,7 +69,6 @@ void pvr2_i2c_probe(struct pvr2_hdw *hdw,struct pvr2_i2c_client *cp)
return;
}
}
#ifdef CONFIG_VIDEO_PVRUSB2_24XXX
if (id == I2C_DRIVERID_CX25840) {
if (pvr2_i2c_cx2584x_v4l_setup(hdw,cp)) {
return;
Expand All @@ -82,7 +79,6 @@ void pvr2_i2c_probe(struct pvr2_hdw *hdw,struct pvr2_i2c_client *cp)
return;
}
}
#endif
if (id == I2C_DRIVERID_SAA711X) {
if (pvr2_i2c_decoder_v4l_setup(hdw,cp)) {
return;
Expand Down
6 changes: 0 additions & 6 deletions drivers/media/video/pvrusb2/pvrusb2-i2c-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,6 @@ static int pvr2_i2c_basic_op(struct pvr2_hdw *hdw,
}
}

#ifdef CONFIG_VIDEO_PVRUSB2_24XXX

/* This is a special entry point that is entered if an I2C operation is
attempted to a wm8775 chip on model 24xxx hardware. Autodetect of this
part doesn't work, but we know it is really there. So let's look for
Expand Down Expand Up @@ -289,8 +287,6 @@ static int i2c_hack_cx25840(struct pvr2_hdw *hdw,
return -EIO;
}

#endif /* CONFIG_VIDEO_PVRUSB2_24XXX */

/* This is a very, very limited I2C adapter implementation. We can only
support what we actually know will work on the device... */
static int pvr2_i2c_xfer(struct i2c_adapter *i2c_adap,
Expand Down Expand Up @@ -897,14 +893,12 @@ void pvr2_i2c_core_init(struct pvr2_hdw *hdw)
hdw->i2c_func[idx] = pvr2_i2c_basic_op;
}

#ifdef CONFIG_VIDEO_PVRUSB2_24XXX
// If however we're dealing with new hardware, insert some hacks in
// the I2C transfer stack to let things work better.
if (hdw->hdw_type == PVR2_HDW_TYPE_24XXX) {
hdw->i2c_func[0x1b] = i2c_hack_wm8775;
hdw->i2c_func[0x44] = i2c_hack_cx25840;
}
#endif

// Configure the adapter and set up everything else related to it.
memcpy(&hdw->i2c_adap,&pvr2_i2c_adap_template,sizeof(hdw->i2c_adap));
Expand Down

0 comments on commit 7f19d02

Please sign in to comment.