Skip to content

Commit

Permalink
[media] nuvoton-cir: carrier detect support is broken - remove it
Browse files Browse the repository at this point in the history
The carrier detect return value is never used on nuvoton driver:
drivers/media/rc/nuvoton-cir.c: In function 'nvt_process_rx_ir_data':
drivers/media/rc/nuvoton-cir.c:623:6: warning: variable 'carrier' set but not used [-Wunused-but-set-variable]
Also, this would be called only if a boolean variable is enabled,
but there's no condition that enables it inside the driver. So,
comment the carrier detection code, as it might be useful later,
and remove the unused glue code.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Mauro Carvalho Chehab committed Oct 27, 2012
1 parent 8e1803f commit 230dc94
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
7 changes: 2 additions & 5 deletions drivers/media/rc/nuvoton-cir.c
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,7 @@ static void nvt_enable_wake(struct nvt_dev *nvt)
nvt_cir_wake_reg_write(nvt, 0, CIR_WAKE_IREN);
}

#if 0 /* Currently unused */
/* rx carrier detect only works in learning mode, must be called w/nvt_lock */
static u32 nvt_rx_carrier_detect(struct nvt_dev *nvt)
{
Expand Down Expand Up @@ -504,7 +505,7 @@ static u32 nvt_rx_carrier_detect(struct nvt_dev *nvt)

return carrier;
}

#endif
/*
* set carrier frequency
*
Expand Down Expand Up @@ -620,7 +621,6 @@ static void nvt_dump_rx_buf(struct nvt_dev *nvt)
static void nvt_process_rx_ir_data(struct nvt_dev *nvt)
{
DEFINE_IR_RAW_EVENT(rawir);
u32 carrier;
u8 sample;
int i;

Expand All @@ -629,9 +629,6 @@ static void nvt_process_rx_ir_data(struct nvt_dev *nvt)
if (debug)
nvt_dump_rx_buf(nvt);

if (nvt->carrier_detect_enabled)
carrier = nvt_rx_carrier_detect(nvt);

nvt_dbg_verbose("Processing buffer of len %d", nvt->pkts);

init_ir_raw_event(&rawir);
Expand Down
1 change: 0 additions & 1 deletion drivers/media/rc/nuvoton-cir.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ struct nvt_dev {

/* rx settings */
bool learning_enabled;
bool carrier_detect_enabled;

/* track cir wake state */
u8 wake_state;
Expand Down

0 comments on commit 230dc94

Please sign in to comment.