diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-03-22 14:12:40 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-03-22 16:20:12 -0400 |
commit | 2ccb24ff3b94acb3f405b10a59967d52d95f91e0 (patch) | |
tree | 02ae2ea1769200a75e92f457b8eaee0387e71fba /drivers/media/rc | |
parent | 620a32bba4a2dd57ccf1d5f87b9e6d2402ffec22 (diff) |
[media] ite-cir: Fix some CodingStyle issues
Cc: Juan J. Garcia de Soria <skandalfo@gmail.com>
Cc: Stephan Raue <stephan@openelec.tv>
Cc: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/rc')
-rw-r--r-- | drivers/media/rc/ite-cir.c | 8 | ||||
-rw-r--r-- | drivers/media/rc/ite-cir.h | 45 |
2 files changed, 29 insertions, 24 deletions
diff --git a/drivers/media/rc/ite-cir.c b/drivers/media/rc/ite-cir.c index 10358d5b3189..9be6a830f1d2 100644 --- a/drivers/media/rc/ite-cir.c +++ b/drivers/media/rc/ite-cir.c | |||
@@ -461,8 +461,10 @@ static int ite_tx_ir(struct rc_dev *rcdev, int *txbuf, u32 n) | |||
461 | else | 461 | else |
462 | val |= ITE_TX_SPACE; | 462 | val |= ITE_TX_SPACE; |
463 | 463 | ||
464 | /* if we get to 0 available, read again, just in case | 464 | /* |
465 | * some other slot got freed */ | 465 | * if we get to 0 available, read again, just in case |
466 | * some other slot got freed | ||
467 | */ | ||
466 | if (fifo_avail <= 0) | 468 | if (fifo_avail <= 0) |
467 | fifo_avail = ITE_TX_FIFO_LEN - dev->params.get_tx_used_slots(dev); | 469 | fifo_avail = ITE_TX_FIFO_LEN - dev->params.get_tx_used_slots(dev); |
468 | 470 | ||
@@ -1511,7 +1513,7 @@ static int ite_probe(struct pnp_dev *pdev, const struct pnp_device_id | |||
1511 | 1513 | ||
1512 | /* store resource values */ | 1514 | /* store resource values */ |
1513 | itdev->cir_addr = pnp_port_start(pdev, 0); | 1515 | itdev->cir_addr = pnp_port_start(pdev, 0); |
1514 | itdev->cir_irq =pnp_irq(pdev, 0); | 1516 | itdev->cir_irq = pnp_irq(pdev, 0); |
1515 | 1517 | ||
1516 | /* initialize spinlocks */ | 1518 | /* initialize spinlocks */ |
1517 | spin_lock_init(&itdev->lock); | 1519 | spin_lock_init(&itdev->lock); |
diff --git a/drivers/media/rc/ite-cir.h b/drivers/media/rc/ite-cir.h index 43bac8dc5088..16a19f5fd718 100644 --- a/drivers/media/rc/ite-cir.h +++ b/drivers/media/rc/ite-cir.h | |||
@@ -24,15 +24,18 @@ | |||
24 | 24 | ||
25 | /* logging macros */ | 25 | /* logging macros */ |
26 | #define ite_pr(level, text, ...) \ | 26 | #define ite_pr(level, text, ...) \ |
27 | printk(level KBUILD_MODNAME ": " text, ## __VA_ARGS__) | 27 | printk(level KBUILD_MODNAME ": " text, ## __VA_ARGS__) |
28 | #define ite_dbg(text, ...) \ | 28 | #define ite_dbg(text, ...) do { \ |
29 | if (debug) \ | 29 | if (debug) \ |
30 | printk(KERN_DEBUG \ | 30 | printk(KERN_DEBUG \ |
31 | KBUILD_MODNAME ": " text "\n" , ## __VA_ARGS__) | 31 | KBUILD_MODNAME ": " text "\n" , ## __VA_ARGS__); \ |
32 | #define ite_dbg_verbose(text, ...) \ | 32 | } while (0) |
33 | if (debug > 1) \ | 33 | |
34 | printk(KERN_DEBUG \ | 34 | #define ite_dbg_verbose(text, ...) do {\ |
35 | KBUILD_MODNAME ": " text "\n" , ## __VA_ARGS__) | 35 | if (debug > 1) \ |
36 | printk(KERN_DEBUG \ | ||
37 | KBUILD_MODNAME ": " text "\n" , ## __VA_ARGS__); \ | ||
38 | } while (0) | ||
36 | 39 | ||
37 | /* FIFO sizes */ | 40 | /* FIFO sizes */ |
38 | #define ITE_TX_FIFO_LEN 32 | 41 | #define ITE_TX_FIFO_LEN 32 |
@@ -76,41 +79,41 @@ struct ite_dev_params { | |||
76 | * called while holding the spin lock, except for the TX FIFO length | 79 | * called while holding the spin lock, except for the TX FIFO length |
77 | * one */ | 80 | * one */ |
78 | /* get pending interrupt causes */ | 81 | /* get pending interrupt causes */ |
79 | int (*get_irq_causes) (struct ite_dev * dev); | 82 | int (*get_irq_causes) (struct ite_dev *dev); |
80 | 83 | ||
81 | /* enable rx */ | 84 | /* enable rx */ |
82 | void (*enable_rx) (struct ite_dev * dev); | 85 | void (*enable_rx) (struct ite_dev *dev); |
83 | 86 | ||
84 | /* make rx enter the idle state; keep listening for a pulse, but stop | 87 | /* make rx enter the idle state; keep listening for a pulse, but stop |
85 | * streaming space bytes */ | 88 | * streaming space bytes */ |
86 | void (*idle_rx) (struct ite_dev * dev); | 89 | void (*idle_rx) (struct ite_dev *dev); |
87 | 90 | ||
88 | /* disable rx completely */ | 91 | /* disable rx completely */ |
89 | void (*disable_rx) (struct ite_dev * dev); | 92 | void (*disable_rx) (struct ite_dev *dev); |
90 | 93 | ||
91 | /* read bytes from RX FIFO; return read count */ | 94 | /* read bytes from RX FIFO; return read count */ |
92 | int (*get_rx_bytes) (struct ite_dev * dev, u8 * buf, int buf_size); | 95 | int (*get_rx_bytes) (struct ite_dev *dev, u8 *buf, int buf_size); |
93 | 96 | ||
94 | /* enable tx FIFO space available interrupt */ | 97 | /* enable tx FIFO space available interrupt */ |
95 | void (*enable_tx_interrupt) (struct ite_dev * dev); | 98 | void (*enable_tx_interrupt) (struct ite_dev *dev); |
96 | 99 | ||
97 | /* disable tx FIFO space available interrupt */ | 100 | /* disable tx FIFO space available interrupt */ |
98 | void (*disable_tx_interrupt) (struct ite_dev * dev); | 101 | void (*disable_tx_interrupt) (struct ite_dev *dev); |
99 | 102 | ||
100 | /* get number of full TX FIFO slots */ | 103 | /* get number of full TX FIFO slots */ |
101 | int (*get_tx_used_slots) (struct ite_dev * dev); | 104 | int (*get_tx_used_slots) (struct ite_dev *dev); |
102 | 105 | ||
103 | /* put a byte to the TX FIFO */ | 106 | /* put a byte to the TX FIFO */ |
104 | void (*put_tx_byte) (struct ite_dev * dev, u8 value); | 107 | void (*put_tx_byte) (struct ite_dev *dev, u8 value); |
105 | 108 | ||
106 | /* disable hardware completely */ | 109 | /* disable hardware completely */ |
107 | void (*disable) (struct ite_dev * dev); | 110 | void (*disable) (struct ite_dev *dev); |
108 | 111 | ||
109 | /* initialize the hardware */ | 112 | /* initialize the hardware */ |
110 | void (*init_hardware) (struct ite_dev * dev); | 113 | void (*init_hardware) (struct ite_dev *dev); |
111 | 114 | ||
112 | /* set the carrier parameters */ | 115 | /* set the carrier parameters */ |
113 | void (*set_carrier_params) (struct ite_dev * dev, bool high_freq, | 116 | void (*set_carrier_params) (struct ite_dev *dev, bool high_freq, |
114 | bool use_demodulator, u8 carrier_freq_bits, | 117 | bool use_demodulator, u8 carrier_freq_bits, |
115 | u8 allowance_bits, u8 pulse_width_bits); | 118 | u8 allowance_bits, u8 pulse_width_bits); |
116 | }; | 119 | }; |