From c27f8418ab28efbbf2ccf9384c59bc31d1497a56 Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Fri, 6 Mar 2009 14:41:13 +0100 Subject: cx88-alsa: fix compile warning for kernels <=2.6.20. From: Hans Verkuil Priority: normal Signed-off-by: Hans Verkuil --- linux/drivers/media/video/cx88/cx88-alsa.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'linux/drivers/media/video/cx88/cx88-alsa.c') diff --git a/linux/drivers/media/video/cx88/cx88-alsa.c b/linux/drivers/media/video/cx88/cx88-alsa.c index f7171586d..1e78faba6 100644 --- a/linux/drivers/media/video/cx88/cx88-alsa.c +++ b/linux/drivers/media/video/cx88/cx88-alsa.c @@ -657,8 +657,12 @@ static int snd_cx88_volume_put(struct snd_kcontrol *kcontrol, return changed; } -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 19) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 21) static const DECLARE_TLV_DB_SCALE(snd_cx88_db_scale, -6300, 100, 0); +#else +static DECLARE_TLV_DB_SCALE(snd_cx88_db_scale, -6300, 100, 0); +#endif #endif static struct snd_kcontrol_new snd_cx88_volume = { -- cgit v1.2.3 From 2ec15a3bdd5af9a1ba399e60653b25cd322852e0 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Tue, 14 Apr 2009 10:25:59 -0300 Subject: backport commit 284901a90a9e0b812ca3f5f852cbbfb60d10249d From: Mauro Carvalho Chehab Author: Yang Hongyang Date: Mon Apr 6 19:01:15 2009 -0700 dma-mapping: replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32) Replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32) Priority: normal Signed-off-by: Mauro Carvalho Chehab --- linux/drivers/media/video/cx88/cx88-alsa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'linux/drivers/media/video/cx88/cx88-alsa.c') diff --git a/linux/drivers/media/video/cx88/cx88-alsa.c b/linux/drivers/media/video/cx88/cx88-alsa.c index 1e78faba6..ac9de0094 100644 --- a/linux/drivers/media/video/cx88/cx88-alsa.c +++ b/linux/drivers/media/video/cx88/cx88-alsa.c @@ -802,7 +802,7 @@ static int __devinit snd_cx88_create(struct snd_card *card, return err; } - if (!pci_dma_supported(pci,DMA_32BIT_MASK)) { + if (!pci_dma_supported(pci,DMA_BIT_MASK(32))) { dprintk(0, "%s/1: Oops: no 32bit PCI DMA ???\n",core->name); err = -EIO; cx88_core_put(core,pci); -- cgit v1.2.3 From 82753c8a0c338f489a20e0554eac589a390ac6bb Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Tue, 14 Apr 2009 11:02:14 -0300 Subject: backport commit 758021bfa9ea25c58e62d2f68512628b19502ce7 From: Mauro Carvalho Chehab Author: Takashi Iwai Date: Mon Jan 12 15:17:09 2009 +0100 drivers/media: Convert to snd_card_create() Convert from snd_card_new() to the new snd_card_create() function. While here, backport also cx231xx-audio upstream changes for using snd_card_create(). kernel-sync: Priority: normal Signed-off-by: Mauro Carvalho Chehab --- linux/drivers/media/video/cx88/cx88-alsa.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'linux/drivers/media/video/cx88/cx88-alsa.c') diff --git a/linux/drivers/media/video/cx88/cx88-alsa.c b/linux/drivers/media/video/cx88/cx88-alsa.c index ac9de0094..077c9f0d7 100644 --- a/linux/drivers/media/video/cx88/cx88-alsa.c +++ b/linux/drivers/media/video/cx88/cx88-alsa.c @@ -867,9 +867,10 @@ static int __devinit cx88_audio_initdev(struct pci_dev *pci, return (-ENOENT); } - card = snd_card_new(index[devno], id[devno], THIS_MODULE, sizeof(snd_cx88_card_t)); - if (!card) - return (-ENOMEM); + err = snd_card_create(index[devno], id[devno], THIS_MODULE, + sizeof(snd_cx88_card_t), &card); + if (err < 0) + return err; card->private_free = snd_cx88_dev_free; -- cgit v1.2.3 From 337800edfc26abd2a7b3a13733836f35244d8ca5 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Thu, 4 Jun 2009 14:07:16 +0000 Subject: Add missing __devexit_p() From: Jean Delvare Add missing __devexit_p() to several drivers. Also add a few missing __init, __devinit and __exit markers. These errors could result in build failures depending on the kernel configuration. Signed-off-by: Jean Delvare Signed-off-by: Mauro Carvalho Chehab --- linux/drivers/media/video/cx88/cx88-alsa.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'linux/drivers/media/video/cx88/cx88-alsa.c') diff --git a/linux/drivers/media/video/cx88/cx88-alsa.c b/linux/drivers/media/video/cx88/cx88-alsa.c index 077c9f0d7..4b9f1bb22 100644 --- a/linux/drivers/media/video/cx88/cx88-alsa.c +++ b/linux/drivers/media/video/cx88/cx88-alsa.c @@ -939,7 +939,7 @@ static struct pci_driver cx88_audio_pci_driver = { .name = "cx88_audio", .id_table = cx88_audio_pci_tbl, .probe = cx88_audio_initdev, - .remove = cx88_audio_finidev, + .remove = __devexit_p(cx88_audio_finidev), }; /**************************************************************************** @@ -949,7 +949,7 @@ static struct pci_driver cx88_audio_pci_driver = { /* * module init */ -static int cx88_audio_init(void) +static int __init cx88_audio_init(void) { printk(KERN_INFO "cx2388x alsa driver version %d.%d.%d loaded\n", (CX88_VERSION_CODE >> 16) & 0xff, @@ -965,9 +965,8 @@ static int cx88_audio_init(void) /* * module remove */ -static void cx88_audio_fini(void) +static void __exit cx88_audio_fini(void) { - pci_unregister_driver(&cx88_audio_pci_driver); } -- cgit v1.2.3