summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c
diff options
context:
space:
mode:
Diffstat (limited to 'linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c')
-rw-r--r--linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c21
1 files changed, 17 insertions, 4 deletions
diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c b/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c
index 5ad657e89..fa4a56f7a 100644
--- a/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c
+++ b/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c
@@ -860,8 +860,8 @@ struct pvr2_hdw *pvr2_hdw_find(int unit_number)
if (unit_number >= PVR_NUM) return NULL;
return unit_pointers[unit_number];
}
-#endif /* 0 */
+#endif /* 0 */
int pvr2_hdw_get_unit_number(struct pvr2_hdw *hdw)
{
return hdw->unit_number;
@@ -1337,13 +1337,16 @@ void pvr2_hdw_subsys_bit_chg(struct pvr2_hdw *hdw,
}
#if 0
-
+/* Shortcut for pvr2_hdw_subsys_bit_chg(hdw,msk,msk) */
void pvr2_hdw_subsys_bit_set(struct pvr2_hdw *hdw,unsigned long msk)
{
pvr2_hdw_subsys_bit_chg(hdw,msk,msk);
}
+#endif /* 0 */
+#if 0
+/* Shortcut for pvr2_hdw_subsys_bit_chg(hdw,msk,0) */
void pvr2_hdw_subsys_bit_clr(struct pvr2_hdw *hdw,unsigned long msk)
{
pvr2_hdw_subsys_bit_chg(hdw,msk,0);
@@ -2354,8 +2357,8 @@ void pvr2_hdw_poll_trigger(struct pvr2_hdw *hdw)
pvr2_hdw_poll_trigger_unlocked(hdw);
} while (0); LOCK_GIVE(hdw->big_lock);
}
-#endif /* 0 */
+#endif /* 0 */
/* Return name for this driver instance */
const char *pvr2_hdw_get_driver_name(struct pvr2_hdw *hdw)
{
@@ -2545,7 +2548,10 @@ void pvr2_hdw_v4l_store_minor_number(struct pvr2_hdw *hdw,int v)
hdw->v4l_minor_number = v;
}
+
#if 0
+/* Attempt to recover from a USB foul-up (in practice I find that if you
+ have to do this, then it's already too late). */
void pvr2_reset_ctl_endpoints(struct pvr2_hdw *hdw)
{
if (!hdw->usb_dev) return;
@@ -2560,8 +2566,9 @@ void pvr2_reset_ctl_endpoints(struct pvr2_hdw *hdw)
usb_sndbulkpipe(hdw->usb_dev,
PVR2_CTL_WRITE_ENDPOINT & 0x7f));
}
-#endif /* 0 */
+
+#endif /* 0 */
static void pvr2_ctl_write_complete(struct urb *urb, struct pt_regs *regs)
{
struct pvr2_hdw *hdw = urb->context;
@@ -2595,6 +2602,10 @@ static void pvr2_ctl_timeout(unsigned long data)
}
+/* Issue a command and get a response from the device. This extended
+ version includes a probe flag (which if set means that device errors
+ should not be logged or treated as fatal) and a timeout in jiffies.
+ This can be used to non-lethally probe the health of endpoint 1. */
static int pvr2_send_request_ex(struct pvr2_hdw *hdw,
unsigned int timeout,int probe_fl,
void *write_data,unsigned int write_len,
@@ -3069,6 +3080,7 @@ int pvr2_hdw_cmd_decoder_reset(struct pvr2_hdw *hdw)
}
+/* Stop / start video stream transport */
static int pvr2_hdw_cmd_usbstream(struct pvr2_hdw *hdw,int runFl)
{
int status;
@@ -3167,6 +3179,7 @@ int pvr2_hdw_gpio_chg_out(struct pvr2_hdw *hdw,u32 msk,u32 val)
}
+/* Find I2C address of eeprom */
static int pvr2_hdw_get_eeprom_addr(struct pvr2_hdw *hdw)
{
int result;