diff options
Diffstat (limited to 'drivers/media/pci/cx88')
-rw-r--r-- | drivers/media/pci/cx88/cx88-alsa.c | 31 | ||||
-rw-r--r-- | drivers/media/pci/cx88/cx88-blackbird.c | 7 | ||||
-rw-r--r-- | drivers/media/pci/cx88/cx88-core.c | 12 | ||||
-rw-r--r-- | drivers/media/pci/cx88/cx88-input.c | 8 | ||||
-rw-r--r-- | drivers/media/pci/cx88/cx88-mpeg.c | 26 | ||||
-rw-r--r-- | drivers/media/pci/cx88/cx88-video.c | 8 | ||||
-rw-r--r-- | drivers/media/pci/cx88/cx88.h | 4 |
7 files changed, 51 insertions, 45 deletions
diff --git a/drivers/media/pci/cx88/cx88-alsa.c b/drivers/media/pci/cx88/cx88-alsa.c index 3aa6856ead3b..27d62623274b 100644 --- a/drivers/media/pci/cx88/cx88-alsa.c +++ b/drivers/media/pci/cx88/cx88-alsa.c @@ -45,11 +45,15 @@ #include "cx88.h" #include "cx88-reg.h" -#define dprintk(level,fmt, arg...) if (debug >= level) \ - printk(KERN_INFO "%s/1: " fmt, chip->core->name , ## arg) +#define dprintk(level, fmt, arg...) do { \ + if (debug + 1 > level) \ + printk(KERN_INFO "%s/1: " fmt, chip->core->name , ## arg);\ +} while(0) -#define dprintk_core(level,fmt, arg...) if (debug >= level) \ - printk(KERN_DEBUG "%s/1: " fmt, chip->core->name , ## arg) +#define dprintk_core(level, fmt, arg...) do { \ + if (debug + 1 > level) \ + printk(KERN_DEBUG "%s/1: " fmt, chip->core->name , ## arg);\ +} while(0) /**************************************************************************** Data type declarations - Can be moded to a header file later @@ -536,7 +540,7 @@ static struct snd_pcm_ops snd_cx88_pcm_ops = { /* * create a PCM device */ -static int __devinit snd_cx88_pcm(snd_cx88_card_t *chip, int device, const char *name) +static int snd_cx88_pcm(snd_cx88_card_t *chip, int device, const char *name) { int err; struct snd_pcm *pcm; @@ -749,7 +753,7 @@ static struct snd_kcontrol_new snd_cx88_alc_switch = { * Only boards with eeprom and byte 1 at eeprom=1 have it */ -static const struct pci_device_id cx88_audio_pci_tbl[] __devinitdata = { +static const struct pci_device_id cx88_audio_pci_tbl[] = { {0x14f1,0x8801,PCI_ANY_ID,PCI_ANY_ID,0,0,0}, {0x14f1,0x8811,PCI_ANY_ID,PCI_ANY_ID,0,0,0}, {0, } @@ -788,10 +792,9 @@ static void snd_cx88_dev_free(struct snd_card * card) */ static int devno; -static int __devinit snd_cx88_create(struct snd_card *card, - struct pci_dev *pci, - snd_cx88_card_t **rchip, - struct cx88_core **core_ptr) +static int snd_cx88_create(struct snd_card *card, struct pci_dev *pci, + snd_cx88_card_t **rchip, + struct cx88_core **core_ptr) { snd_cx88_card_t *chip; struct cx88_core *core; @@ -858,8 +861,8 @@ static int __devinit snd_cx88_create(struct snd_card *card, return 0; } -static int __devinit cx88_audio_initdev(struct pci_dev *pci, - const struct pci_device_id *pci_id) +static int cx88_audio_initdev(struct pci_dev *pci, + const struct pci_device_id *pci_id) { struct snd_card *card; snd_cx88_card_t *chip; @@ -927,7 +930,7 @@ error: /* * ALSA destructor */ -static void __devexit cx88_audio_finidev(struct pci_dev *pci) +static void cx88_audio_finidev(struct pci_dev *pci) { struct cx88_audio_dev *card = pci_get_drvdata(pci); @@ -946,7 +949,7 @@ static struct pci_driver cx88_audio_pci_driver = { .name = "cx88_audio", .id_table = cx88_audio_pci_tbl, .probe = cx88_audio_initdev, - .remove = __devexit_p(cx88_audio_finidev), + .remove = cx88_audio_finidev, }; /**************************************************************************** diff --git a/drivers/media/pci/cx88/cx88-blackbird.c b/drivers/media/pci/cx88/cx88-blackbird.c index 62184eb919e5..a6ff8a6f4fc0 100644 --- a/drivers/media/pci/cx88/cx88-blackbird.c +++ b/drivers/media/pci/cx88/cx88-blackbird.c @@ -53,9 +53,10 @@ static unsigned int debug; module_param(debug,int,0644); MODULE_PARM_DESC(debug,"enable debug messages [blackbird]"); -#define dprintk(level,fmt, arg...) if (debug >= level) \ - printk(KERN_DEBUG "%s/2-bb: " fmt, dev->core->name , ## arg) - +#define dprintk(level, fmt, arg...) do { \ + if (debug + 1 > level) \ + printk(KERN_DEBUG "%s/2-bb: " fmt, dev->core->name , ## arg); \ +} while(0) /* ------------------------------------------------------------------ */ diff --git a/drivers/media/pci/cx88/cx88-core.c b/drivers/media/pci/cx88/cx88-core.c index c97b174be3ab..19a58754c6e1 100644 --- a/drivers/media/pci/cx88/cx88-core.c +++ b/drivers/media/pci/cx88/cx88-core.c @@ -646,22 +646,22 @@ int cx88_reset(struct cx88_core *core) /* ------------------------------------------------------------------ */ -static unsigned int inline norm_swidth(v4l2_std_id norm) +static inline unsigned int norm_swidth(v4l2_std_id norm) { return (norm & (V4L2_STD_MN & ~V4L2_STD_PAL_Nc)) ? 754 : 922; } -static unsigned int inline norm_hdelay(v4l2_std_id norm) +static inline unsigned int norm_hdelay(v4l2_std_id norm) { return (norm & (V4L2_STD_MN & ~V4L2_STD_PAL_Nc)) ? 135 : 186; } -static unsigned int inline norm_vdelay(v4l2_std_id norm) +static inline unsigned int norm_vdelay(v4l2_std_id norm) { return (norm & V4L2_STD_625_50) ? 0x24 : 0x18; } -static unsigned int inline norm_fsc8(v4l2_std_id norm) +static inline unsigned int norm_fsc8(v4l2_std_id norm) { if (norm & V4L2_STD_PAL_M) return 28604892; // 3.575611 MHz @@ -681,7 +681,7 @@ static unsigned int inline norm_fsc8(v4l2_std_id norm) return 35468950; // 4.43361875 MHz +/- 5 Hz } -static unsigned int inline norm_htotal(v4l2_std_id norm) +static inline unsigned int norm_htotal(v4l2_std_id norm) { unsigned int fsc4=norm_fsc8(norm)/2; @@ -692,7 +692,7 @@ static unsigned int inline norm_htotal(v4l2_std_id norm) ((fsc4+262)/525*1001+15000)/30000; } -static unsigned int inline norm_vbipack(v4l2_std_id norm) +static inline unsigned int norm_vbipack(v4l2_std_id norm) { return (norm & V4L2_STD_625_50) ? 511 : 400; } diff --git a/drivers/media/pci/cx88/cx88-input.c b/drivers/media/pci/cx88/cx88-input.c index ebf448c48ca3..f29e18c72f44 100644 --- a/drivers/media/pci/cx88/cx88-input.c +++ b/drivers/media/pci/cx88/cx88-input.c @@ -248,7 +248,7 @@ int cx88_ir_init(struct cx88_core *core, struct pci_dev *pci) struct cx88_IR *ir; struct rc_dev *dev; char *ir_codes = NULL; - u64 rc_type = RC_TYPE_OTHER; + u64 rc_type = RC_BIT_OTHER; int err = -ENOMEM; u32 hardware_mask = 0; /* For devices with a hardware mask, when * used with a full-code IR table @@ -416,7 +416,7 @@ int cx88_ir_init(struct cx88_core *core, struct pci_dev *pci) break; case CX88_BOARD_TWINHAN_VP1027_DVBS: ir_codes = RC_MAP_TWINHAN_VP1027_DVBS; - rc_type = RC_TYPE_NEC; + rc_type = RC_BIT_NEC; ir->sampling = 0xff00; /* address */ break; } @@ -592,7 +592,7 @@ void cx88_i2c_init_ir(struct cx88_core *core) case CX88_BOARD_LEADTEK_PVR2000: addr_list = pvr2000_addr_list; core->init_data.name = "cx88 Leadtek PVR 2000 remote"; - core->init_data.type = RC_TYPE_UNKNOWN; + core->init_data.type = RC_BIT_UNKNOWN; core->init_data.get_key = get_key_pvr2000; core->init_data.ir_codes = RC_MAP_EMPTY; break; @@ -613,7 +613,7 @@ void cx88_i2c_init_ir(struct cx88_core *core) /* Hauppauge XVR */ core->init_data.name = "cx88 Hauppauge XVR remote"; core->init_data.ir_codes = RC_MAP_HAUPPAUGE; - core->init_data.type = RC_TYPE_RC5; + core->init_data.type = RC_BIT_RC5; core->init_data.internal_get_key_func = IR_KBD_GET_KEY_HAUP_XVR; info.platform_data = &core->init_data; diff --git a/drivers/media/pci/cx88/cx88-mpeg.c b/drivers/media/pci/cx88/cx88-mpeg.c index d154bc197356..c9d3182f79d5 100644 --- a/drivers/media/pci/cx88/cx88-mpeg.c +++ b/drivers/media/pci/cx88/cx88-mpeg.c @@ -45,11 +45,15 @@ static unsigned int debug; module_param(debug,int,0644); MODULE_PARM_DESC(debug,"enable debug messages [mpeg]"); -#define dprintk(level,fmt, arg...) if (debug >= level) \ - printk(KERN_DEBUG "%s/2-mpeg: " fmt, dev->core->name, ## arg) +#define dprintk(level, fmt, arg...) do { \ + if (debug + 1 > level) \ + printk(KERN_DEBUG "%s/2-mpeg: " fmt, dev->core->name, ## arg); \ +} while(0) -#define mpeg_dbg(level,fmt, arg...) if (debug >= level) \ - printk(KERN_DEBUG "%s/2-mpeg: " fmt, core->name, ## arg) +#define mpeg_dbg(level, fmt, arg...) do { \ + if (debug + 1 > level) \ + printk(KERN_DEBUG "%s/2-mpeg: " fmt, core->name, ## arg); \ +} while(0) #if defined(CONFIG_MODULES) && defined(MODULE) static void request_module_async(struct work_struct *work) @@ -217,8 +221,7 @@ static int cx8802_restart_queue(struct cx8802_dev *dev, return 0; buf = list_entry(q->queued.next, struct cx88_buffer, vb.queue); if (NULL == prev) { - list_del(&buf->vb.queue); - list_add_tail(&buf->vb.queue,&q->active); + list_move_tail(&buf->vb.queue, &q->active); cx8802_start_dma(dev, q, buf); buf->vb.state = VIDEOBUF_ACTIVE; buf->count = q->count++; @@ -229,8 +232,7 @@ static int cx8802_restart_queue(struct cx8802_dev *dev, } else if (prev->vb.width == buf->vb.width && prev->vb.height == buf->vb.height && prev->fmt == buf->fmt) { - list_del(&buf->vb.queue); - list_add_tail(&buf->vb.queue,&q->active); + list_move_tail(&buf->vb.queue, &q->active); buf->vb.state = VIDEOBUF_ACTIVE; buf->count = q->count++; prev->risc.jmp[1] = cpu_to_le32(buf->risc.dma); @@ -789,8 +791,8 @@ int cx8802_unregister_driver(struct cx8802_driver *drv) } /* ----------------------------------------------------------- */ -static int __devinit cx8802_probe(struct pci_dev *pci_dev, - const struct pci_device_id *pci_id) +static int cx8802_probe(struct pci_dev *pci_dev, + const struct pci_device_id *pci_id) { struct cx8802_dev *dev; struct cx88_core *core; @@ -838,7 +840,7 @@ static int __devinit cx8802_probe(struct pci_dev *pci_dev, return err; } -static void __devexit cx8802_remove(struct pci_dev *pci_dev) +static void cx8802_remove(struct pci_dev *pci_dev) { struct cx8802_dev *dev; @@ -896,7 +898,7 @@ static struct pci_driver cx8802_pci_driver = { .name = "cx88-mpeg driver manager", .id_table = cx8802_pci_tbl, .probe = cx8802_probe, - .remove = __devexit_p(cx8802_remove), + .remove = cx8802_remove, }; static int __init cx8802_init(void) diff --git a/drivers/media/pci/cx88/cx88-video.c b/drivers/media/pci/cx88/cx88-video.c index 05171457bf28..bc78354262ac 100644 --- a/drivers/media/pci/cx88/cx88-video.c +++ b/drivers/media/pci/cx88/cx88-video.c @@ -1696,8 +1696,8 @@ static void cx8800_unregister_video(struct cx8800_dev *dev) } } -static int __devinit cx8800_initdev(struct pci_dev *pci_dev, - const struct pci_device_id *pci_id) +static int cx8800_initdev(struct pci_dev *pci_dev, + const struct pci_device_id *pci_id) { struct cx8800_dev *dev; struct cx88_core *core; @@ -1923,7 +1923,7 @@ fail_free: return err; } -static void __devexit cx8800_finidev(struct pci_dev *pci_dev) +static void cx8800_finidev(struct pci_dev *pci_dev) { struct cx8800_dev *dev = pci_get_drvdata(pci_dev); struct cx88_core *core = dev->core; @@ -2052,7 +2052,7 @@ static struct pci_driver cx8800_pci_driver = { .name = "cx8800", .id_table = cx8800_pci_tbl, .probe = cx8800_initdev, - .remove = __devexit_p(cx8800_finidev), + .remove = cx8800_finidev, #ifdef CONFIG_PM .suspend = cx8800_suspend, .resume = cx8800_resume, diff --git a/drivers/media/pci/cx88/cx88.h b/drivers/media/pci/cx88/cx88.h index 44ffc8b3d45f..ba0dba4a4d22 100644 --- a/drivers/media/pci/cx88/cx88.h +++ b/drivers/media/pci/cx88/cx88.h @@ -94,13 +94,13 @@ enum cx8802_board_access { /* ----------------------------------------------------------- */ /* tv norms */ -static unsigned int inline norm_maxw(v4l2_std_id norm) +static inline unsigned int norm_maxw(v4l2_std_id norm) { return (norm & (V4L2_STD_MN & ~V4L2_STD_PAL_Nc)) ? 720 : 768; } -static unsigned int inline norm_maxh(v4l2_std_id norm) +static inline unsigned int norm_maxh(v4l2_std_id norm) { return (norm & V4L2_STD_625_50) ? 576 : 480; } |