aboutsummaryrefslogtreecommitdiff
path: root/drivers/media/video/cx88/cx88-input.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-11 19:09:32 -0700
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-11 19:09:32 -0700
commitc634920abaf9c0a93266a57beff6fce9d3852cb2 (patch)
tree5ac85f54905a8cd3b12b262c66189084cbff54fc /drivers/media/video/cx88/cx88-input.c
parent6abd2c860e34add677de50e8b134f5af6f4b0893 (diff)
parenta991f44b79fa49b281eb078eed4a76a42101012a (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb
* 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb: (310 commits) V4L/DVB (6316): Change list_for_each+list_entry to list_for_each_entry V4L/DVB (6315): pvrusb2: Change list_for_each+list_entry to list_for_each_entry V4L/DVB (6314): saa7134: Replace list_for_each+list_entry with list_for_each_entry V4L/DVB (6313): ivtv: Replace list_for_each+list_entry with list_for_each_entry V4L/DVB (6312): cx88: Replace list_for_each+list_entry with list_for_each_entry V4L/DVB (6311): dvb: Replace list_for_each+list_entry with list_for_each_entry V4L/DVB (6308): V4L: zc0301, remove bad usage of ERESTARTSYS V4L/DVB (6307): V4L: w9968cf, remove bad usage of ERESTARTSYS V4L/DVB (6306): Few clenups for saa7134 resume code V4L/DVB (6305): V4L: videobuf-core.c avoid NULL dereferences in videobuf-core V4L/DVB (6301): pvrusb: Update DEBUGIFC sysfs to kernel 2.6.13+ V4L/DVB (6300): CodingStyle cleanup V4L/DVB (6299): dvb: Add dependencies for VIDEOBUF_DVB V4L/DVB (6297): cx23885: remove wrong Kconfig selection of VIDEOBUF V4L/DVB (6296): dib0700: add support for AverMedia DVB-T Express card V4L/DVB (6295): saa7134: add autodetection for KWorld ATSC-115 V4L/DVB (6293): V4L: convert struct class_device to struct device V4L/DVB (6292): videobuf_core init always require callback implementation V4L/DVB (6291): Fix: avoid oops on some SMP machines V4L/DVB (6290): remove videobuf_set_pci_ops ...
Diffstat (limited to 'drivers/media/video/cx88/cx88-input.c')
-rw-r--r--drivers/media/video/cx88/cx88-input.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/drivers/media/video/cx88/cx88-input.c b/drivers/media/video/cx88/cx88-input.c
index f5d4a565346..e52de3968c6 100644
--- a/drivers/media/video/cx88/cx88-input.c
+++ b/drivers/media/video/cx88/cx88-input.c
@@ -27,7 +27,6 @@
#include <linux/input.h>
#include <linux/pci.h>
#include <linux/module.h>
-#include <linux/moduleparam.h>
#include "cx88.h"
#include <media/ir-common.h>
@@ -74,7 +73,7 @@ static void cx88_ir_handle_key(struct cx88_IR *ir)
/* read gpio value */
gpio = cx_read(ir->gpio_addr);
- switch (core->board) {
+ switch (core->boardnr) {
case CX88_BOARD_NPGTECH_REALTV_TOP10FM:
/* This board apparently uses a combination of 2 GPIO
to represent the keys. Additionally, the second GPIO
@@ -113,7 +112,7 @@ static void cx88_ir_handle_key(struct cx88_IR *ir)
(gpio & ir->mask_keydown) ? " down" : "",
(gpio & ir->mask_keyup) ? " up" : "");
- if (ir->core->board == CX88_BOARD_NORWOOD_MICRO) {
+ if (ir->core->boardnr == CX88_BOARD_NORWOOD_MICRO) {
u32 gpio_key = cx_read(MO_GP0_IO);
data = (data << 4) | ((gpio_key & 0xf0) >> 4);
@@ -159,7 +158,7 @@ static void cx88_ir_work(struct work_struct *work)
mod_timer(&ir->timer, jiffies + msecs_to_jiffies(ir->polling));
}
-static void cx88_ir_start(struct cx88_core *core, struct cx88_IR *ir)
+void cx88_ir_start(struct cx88_core *core, struct cx88_IR *ir)
{
if (ir->polling) {
setup_timer(&ir->timer, ir_timer, (unsigned long)ir);
@@ -167,17 +166,17 @@ static void cx88_ir_start(struct cx88_core *core, struct cx88_IR *ir)
schedule_work(&ir->work);
}
if (ir->sampling) {
- core->pci_irqmask |= (1 << 18); /* IR_SMP_INT */
+ core->pci_irqmask |= PCI_INT_IR_SMPINT;
cx_write(MO_DDS_IO, 0xa80a80); /* 4 kHz sample rate */
cx_write(MO_DDSCFG_IO, 0x5); /* enable */
}
}
-static void cx88_ir_stop(struct cx88_core *core, struct cx88_IR *ir)
+void cx88_ir_stop(struct cx88_core *core, struct cx88_IR *ir)
{
if (ir->sampling) {
cx_write(MO_DDSCFG_IO, 0x0);
- core->pci_irqmask &= ~(1 << 18);
+ core->pci_irqmask &= ~PCI_INT_IR_SMPINT;
}
if (ir->polling) {
@@ -204,7 +203,7 @@ int cx88_ir_init(struct cx88_core *core, struct pci_dev *pci)
ir->input = input_dev;
/* detect & configure */
- switch (core->board) {
+ switch (core->boardnr) {
case CX88_BOARD_DNTV_LIVE_DVB_T:
case CX88_BOARD_KWORLD_DVB_T:
case CX88_BOARD_KWORLD_DVB_T_CX22702:
@@ -314,8 +313,7 @@ int cx88_ir_init(struct cx88_core *core, struct pci_dev *pci)
}
/* init input device */
- snprintf(ir->name, sizeof(ir->name), "cx88 IR (%s)",
- cx88_boards[core->board].name);
+ snprintf(ir->name, sizeof(ir->name), "cx88 IR (%s)", core->board.name);
snprintf(ir->phys, sizeof(ir->phys), "pci-%s/ir0", pci_name(pci));
ir_input_init(input_dev, &ir->ir, ir_type, ir_codes);
@@ -406,7 +404,7 @@ void cx88_ir_irq(struct cx88_core *core)
ir_dump_samples(ir->samples, ir->scount);
/* decode it */
- switch (core->board) {
+ switch (core->boardnr) {
case CX88_BOARD_TERRATEC_CINERGY_1400_DVB_T1:
case CX88_BOARD_DNTV_LIVE_DVB_T_PRO:
ircode = ir_decode_pulsedistance(ir->samples, ir->scount, 1, 4);