mirror of https://gitee.com/openkylin/linux.git
V4L/DVB (4337): Refine dead code elimination in pvrusb2
Signed-off-by: Mike Isely <isely@pobox.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
This commit is contained in:
parent
32e4c3a562
commit
e61b6fc58b
|
@ -852,7 +852,6 @@ unsigned long pvr2_hdw_get_sn(struct pvr2_hdw *hdw)
|
|||
return hdw->serial_number;
|
||||
}
|
||||
|
||||
|
||||
int pvr2_hdw_get_unit_number(struct pvr2_hdw *hdw)
|
||||
{
|
||||
return hdw->unit_number;
|
||||
|
@ -2318,7 +2317,6 @@ void pvr2_hdw_poll_trigger_unlocked(struct pvr2_hdw *hdw)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
/* Return name for this driver instance */
|
||||
const char *pvr2_hdw_get_driver_name(struct pvr2_hdw *hdw)
|
||||
{
|
||||
|
@ -2542,6 +2540,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,
|
||||
|
@ -2970,6 +2972,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;
|
||||
|
@ -3068,6 +3071,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;
|
||||
|
|
|
@ -26,6 +26,8 @@
|
|||
#include <linux/slab.h>
|
||||
#include <linux/mutex.h>
|
||||
|
||||
static const char *pvr2_buffer_state_decode(enum pvr2_buffer_state);
|
||||
|
||||
#define BUFFER_SIG 0x47653271
|
||||
|
||||
// #define SANITY_CHECK_BUFFERS
|
||||
|
@ -515,6 +517,10 @@ void pvr2_stream_set_callback(struct pvr2_stream *sp,
|
|||
}
|
||||
|
||||
/* Query / set the nominal buffer count */
|
||||
int pvr2_stream_get_buffer_count(struct pvr2_stream *sp)
|
||||
{
|
||||
return sp->buffer_target_count;
|
||||
}
|
||||
|
||||
int pvr2_stream_set_buffer_count(struct pvr2_stream *sp,unsigned int cnt)
|
||||
{
|
||||
|
@ -553,7 +559,6 @@ int pvr2_stream_get_ready_count(struct pvr2_stream *sp)
|
|||
return sp->r_count;
|
||||
}
|
||||
|
||||
|
||||
void pvr2_stream_kill(struct pvr2_stream *sp)
|
||||
{
|
||||
struct pvr2_buffer *bp;
|
||||
|
@ -607,7 +612,6 @@ int pvr2_buffer_queue(struct pvr2_buffer *bp)
|
|||
return ret;
|
||||
}
|
||||
|
||||
|
||||
int pvr2_buffer_set_buffer(struct pvr2_buffer *bp,void *ptr,unsigned int cnt)
|
||||
{
|
||||
int ret = 0;
|
||||
|
@ -646,7 +650,6 @@ int pvr2_buffer_get_status(struct pvr2_buffer *bp)
|
|||
return bp->status;
|
||||
}
|
||||
|
||||
|
||||
int pvr2_buffer_get_id(struct pvr2_buffer *bp)
|
||||
{
|
||||
return bp->id;
|
||||
|
|
|
@ -47,6 +47,7 @@ void pvr2_stream_set_callback(struct pvr2_stream *,
|
|||
void *data);
|
||||
|
||||
/* Query / set the nominal buffer count */
|
||||
int pvr2_stream_get_buffer_count(struct pvr2_stream *);
|
||||
int pvr2_stream_set_buffer_count(struct pvr2_stream *,unsigned int);
|
||||
|
||||
/* Get a pointer to a buffer that is either idle, ready, or is specified
|
||||
|
@ -58,6 +59,7 @@ struct pvr2_buffer *pvr2_stream_get_buffer(struct pvr2_stream *sp,int id);
|
|||
/* Find out how many buffers are idle or ready */
|
||||
int pvr2_stream_get_ready_count(struct pvr2_stream *);
|
||||
|
||||
|
||||
/* Kill all pending buffers and throw away any ready buffers as well */
|
||||
void pvr2_stream_kill(struct pvr2_stream *);
|
||||
|
||||
|
|
|
@ -213,7 +213,9 @@ int pvr2_ioread_setup(struct pvr2_ioread *cp,struct pvr2_stream *sp)
|
|||
" pvr2_ioread_setup (tear-down) id=%p",cp);
|
||||
pvr2_ioread_stop(cp);
|
||||
pvr2_stream_kill(cp->stream);
|
||||
pvr2_stream_set_buffer_count(cp->stream,0);
|
||||
if (pvr2_stream_get_buffer_count(cp->stream)) {
|
||||
pvr2_stream_set_buffer_count(cp->stream,0);
|
||||
}
|
||||
cp->stream = NULL;
|
||||
}
|
||||
if (sp) {
|
||||
|
@ -251,7 +253,6 @@ int pvr2_ioread_set_enabled(struct pvr2_ioread *cp,int fl)
|
|||
return ret;
|
||||
}
|
||||
|
||||
|
||||
static int pvr2_ioread_get_buffer(struct pvr2_ioread *cp)
|
||||
{
|
||||
int stat;
|
||||
|
|
Loading…
Reference in New Issue