mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-12 13:55:32 +00:00
[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>
This commit is contained in:
parent
620a32bba4
commit
2ccb24ff3b
2 changed files with 29 additions and 24 deletions
|
@ -461,8 +461,10 @@ static int ite_tx_ir(struct rc_dev *rcdev, int *txbuf, u32 n)
|
||||||
else
|
else
|
||||||
val |= ITE_TX_SPACE;
|
val |= ITE_TX_SPACE;
|
||||||
|
|
||||||
/* if we get to 0 available, read again, just in case
|
/*
|
||||||
* some other slot got freed */
|
* if we get to 0 available, read again, just in case
|
||||||
|
* some other slot got freed
|
||||||
|
*/
|
||||||
if (fifo_avail <= 0)
|
if (fifo_avail <= 0)
|
||||||
fifo_avail = ITE_TX_FIFO_LEN - dev->params.get_tx_used_slots(dev);
|
fifo_avail = ITE_TX_FIFO_LEN - dev->params.get_tx_used_slots(dev);
|
||||||
|
|
||||||
|
@ -1511,7 +1513,7 @@ static int ite_probe(struct pnp_dev *pdev, const struct pnp_device_id
|
||||||
|
|
||||||
/* store resource values */
|
/* store resource values */
|
||||||
itdev->cir_addr = pnp_port_start(pdev, 0);
|
itdev->cir_addr = pnp_port_start(pdev, 0);
|
||||||
itdev->cir_irq =pnp_irq(pdev, 0);
|
itdev->cir_irq = pnp_irq(pdev, 0);
|
||||||
|
|
||||||
/* initialize spinlocks */
|
/* initialize spinlocks */
|
||||||
spin_lock_init(&itdev->lock);
|
spin_lock_init(&itdev->lock);
|
||||||
|
|
|
@ -24,15 +24,18 @@
|
||||||
|
|
||||||
/* logging macros */
|
/* logging macros */
|
||||||
#define ite_pr(level, text, ...) \
|
#define ite_pr(level, text, ...) \
|
||||||
printk(level KBUILD_MODNAME ": " text, ## __VA_ARGS__)
|
printk(level KBUILD_MODNAME ": " text, ## __VA_ARGS__)
|
||||||
#define ite_dbg(text, ...) \
|
#define ite_dbg(text, ...) do { \
|
||||||
if (debug) \
|
if (debug) \
|
||||||
printk(KERN_DEBUG \
|
printk(KERN_DEBUG \
|
||||||
KBUILD_MODNAME ": " text "\n" , ## __VA_ARGS__)
|
KBUILD_MODNAME ": " text "\n" , ## __VA_ARGS__); \
|
||||||
#define ite_dbg_verbose(text, ...) \
|
} while (0)
|
||||||
if (debug > 1) \
|
|
||||||
printk(KERN_DEBUG \
|
#define ite_dbg_verbose(text, ...) do {\
|
||||||
KBUILD_MODNAME ": " text "\n" , ## __VA_ARGS__)
|
if (debug > 1) \
|
||||||
|
printk(KERN_DEBUG \
|
||||||
|
KBUILD_MODNAME ": " text "\n" , ## __VA_ARGS__); \
|
||||||
|
} while (0)
|
||||||
|
|
||||||
/* FIFO sizes */
|
/* FIFO sizes */
|
||||||
#define ITE_TX_FIFO_LEN 32
|
#define ITE_TX_FIFO_LEN 32
|
||||||
|
@ -76,41 +79,41 @@ struct ite_dev_params {
|
||||||
* called while holding the spin lock, except for the TX FIFO length
|
* called while holding the spin lock, except for the TX FIFO length
|
||||||
* one */
|
* one */
|
||||||
/* get pending interrupt causes */
|
/* get pending interrupt causes */
|
||||||
int (*get_irq_causes) (struct ite_dev * dev);
|
int (*get_irq_causes) (struct ite_dev *dev);
|
||||||
|
|
||||||
/* enable rx */
|
/* enable rx */
|
||||||
void (*enable_rx) (struct ite_dev * dev);
|
void (*enable_rx) (struct ite_dev *dev);
|
||||||
|
|
||||||
/* make rx enter the idle state; keep listening for a pulse, but stop
|
/* make rx enter the idle state; keep listening for a pulse, but stop
|
||||||
* streaming space bytes */
|
* streaming space bytes */
|
||||||
void (*idle_rx) (struct ite_dev * dev);
|
void (*idle_rx) (struct ite_dev *dev);
|
||||||
|
|
||||||
/* disable rx completely */
|
/* disable rx completely */
|
||||||
void (*disable_rx) (struct ite_dev * dev);
|
void (*disable_rx) (struct ite_dev *dev);
|
||||||
|
|
||||||
/* read bytes from RX FIFO; return read count */
|
/* read bytes from RX FIFO; return read count */
|
||||||
int (*get_rx_bytes) (struct ite_dev * dev, u8 * buf, int buf_size);
|
int (*get_rx_bytes) (struct ite_dev *dev, u8 *buf, int buf_size);
|
||||||
|
|
||||||
/* enable tx FIFO space available interrupt */
|
/* enable tx FIFO space available interrupt */
|
||||||
void (*enable_tx_interrupt) (struct ite_dev * dev);
|
void (*enable_tx_interrupt) (struct ite_dev *dev);
|
||||||
|
|
||||||
/* disable tx FIFO space available interrupt */
|
/* disable tx FIFO space available interrupt */
|
||||||
void (*disable_tx_interrupt) (struct ite_dev * dev);
|
void (*disable_tx_interrupt) (struct ite_dev *dev);
|
||||||
|
|
||||||
/* get number of full TX FIFO slots */
|
/* get number of full TX FIFO slots */
|
||||||
int (*get_tx_used_slots) (struct ite_dev * dev);
|
int (*get_tx_used_slots) (struct ite_dev *dev);
|
||||||
|
|
||||||
/* put a byte to the TX FIFO */
|
/* put a byte to the TX FIFO */
|
||||||
void (*put_tx_byte) (struct ite_dev * dev, u8 value);
|
void (*put_tx_byte) (struct ite_dev *dev, u8 value);
|
||||||
|
|
||||||
/* disable hardware completely */
|
/* disable hardware completely */
|
||||||
void (*disable) (struct ite_dev * dev);
|
void (*disable) (struct ite_dev *dev);
|
||||||
|
|
||||||
/* initialize the hardware */
|
/* initialize the hardware */
|
||||||
void (*init_hardware) (struct ite_dev * dev);
|
void (*init_hardware) (struct ite_dev *dev);
|
||||||
|
|
||||||
/* set the carrier parameters */
|
/* set the carrier parameters */
|
||||||
void (*set_carrier_params) (struct ite_dev * dev, bool high_freq,
|
void (*set_carrier_params) (struct ite_dev *dev, bool high_freq,
|
||||||
bool use_demodulator, u8 carrier_freq_bits,
|
bool use_demodulator, u8 carrier_freq_bits,
|
||||||
u8 allowance_bits, u8 pulse_width_bits);
|
u8 allowance_bits, u8 pulse_width_bits);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue