Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 333821
b: refs/heads/master
c: 48cafec
h: refs/heads/master
i:
  333819: 02bfa8d
v: v3
  • Loading branch information
Dan Carpenter authored and Mauro Carvalho Chehab committed Oct 6, 2012
1 parent 70e0261 commit c2b71af
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a52eb6c02fa27efb5f8980312785fce1f77377e2
refs/heads/master: 48cafec9a941c2dfe94d76642662bc20bf87fe08
5 changes: 4 additions & 1 deletion trunk/drivers/media/rc/ene_ir.c
Original file line number Diff line number Diff line change
Expand Up @@ -881,10 +881,13 @@ static int ene_set_tx_mask(struct rc_dev *rdev, u32 tx_mask)
static int ene_set_tx_carrier(struct rc_dev *rdev, u32 carrier)
{
struct ene_device *dev = rdev->priv;
u32 period = 2000000 / carrier;
u32 period;

dbg("TX: attempt to set tx carrier to %d kHz", carrier);
if (carrier == 0)
return -EINVAL;

period = 2000000 / carrier;
if (period && (period > ENE_CIRMOD_PRD_MAX ||
period < ENE_CIRMOD_PRD_MIN)) {

Expand Down
3 changes: 3 additions & 0 deletions trunk/drivers/media/rc/nuvoton-cir.c
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,9 @@ static int nvt_set_tx_carrier(struct rc_dev *dev, u32 carrier)
struct nvt_dev *nvt = dev->priv;
u16 val;

if (carrier == 0)
return -EINVAL;

nvt_cir_reg_write(nvt, 1, CIR_CP);
val = 3000000 / (carrier) - 1;
nvt_cir_reg_write(nvt, val & 0xff, CIR_CC);
Expand Down
3 changes: 3 additions & 0 deletions trunk/drivers/media/rc/redrat3.c
Original file line number Diff line number Diff line change
Expand Up @@ -890,6 +890,9 @@ static int redrat3_set_tx_carrier(struct rc_dev *rcdev, u32 carrier)
struct device *dev = rr3->dev;

rr3_dbg(dev, "Setting modulation frequency to %u", carrier);
if (carrier == 0)
return -EINVAL;

rr3->carrier = carrier;

return carrier;
Expand Down

0 comments on commit c2b71af

Please sign in to comment.