diff options
Diffstat (limited to 'sound')
-rw-r--r-- | sound/core/info.c | 45 | ||||
-rw-r--r-- | sound/i2c/other/tea575x-tuner.c | 6 | ||||
-rw-r--r-- | sound/oss/dmasound/dmasound_core.c | 6 | ||||
-rw-r--r-- | sound/pci/mixart/mixart.c | 2 | ||||
-rw-r--r-- | sound/pcmcia/pdaudiocf/pdaudiocf.c | 15 | ||||
-rw-r--r-- | sound/pcmcia/vx/vxpocket.c | 14 | ||||
-rw-r--r-- | sound/soc/codecs/wm8974.c | 2 | ||||
-rw-r--r-- | sound/soc/mxs/mxs-saif.c | 5 | ||||
-rw-r--r-- | sound/soc/ux500/Kconfig | 4 | ||||
-rw-r--r-- | sound/soc/ux500/mop500_ab8500.c | 2 | ||||
-rw-r--r-- | sound/soc/ux500/ux500_msp_dai.c | 4 | ||||
-rw-r--r-- | sound/soc/ux500/ux500_msp_i2s.c | 4 | ||||
-rw-r--r-- | sound/soc/ux500/ux500_msp_i2s.h | 2 | ||||
-rw-r--r-- | sound/sound_firmware.c | 9 |
14 files changed, 42 insertions, 78 deletions
diff --git a/sound/core/info.c b/sound/core/info.c index c9042b4d369..e79baa11b60 100644 --- a/sound/core/info.c +++ b/sound/core/info.c @@ -153,13 +153,6 @@ EXPORT_SYMBOL(snd_seq_root); struct snd_info_entry *snd_oss_root; #endif -static void snd_remove_proc_entry(struct proc_dir_entry *parent, - struct proc_dir_entry *de) -{ - if (de) - remove_proc_entry(de->name, parent); -} - static loff_t snd_info_entry_llseek(struct file *file, loff_t offset, int orig) { struct snd_info_private_data *data; @@ -310,12 +303,10 @@ static int snd_info_entry_open(struct inode *inode, struct file *file) struct snd_info_entry *entry; struct snd_info_private_data *data; struct snd_info_buffer *buffer; - struct proc_dir_entry *p; int mode, err; mutex_lock(&info_mutex); - p = PDE(inode); - entry = p == NULL ? NULL : (struct snd_info_entry *)p->data; + entry = PDE_DATA(inode); if (entry == NULL || ! entry->p) { mutex_unlock(&info_mutex); return -ENODEV; @@ -582,7 +573,7 @@ int __exit snd_info_done(void) #ifdef CONFIG_SND_OSSEMUL snd_info_free_entry(snd_oss_root); #endif - snd_remove_proc_entry(NULL, snd_proc_root); + proc_remove(snd_proc_root); } return 0; } @@ -644,7 +635,7 @@ void snd_info_card_id_change(struct snd_card *card) { mutex_lock(&info_mutex); if (card->proc_root_link) { - snd_remove_proc_entry(snd_proc_root, card->proc_root_link); + proc_remove(card->proc_root_link); card->proc_root_link = NULL; } if (strcmp(card->id, card->proc_root->name)) @@ -663,10 +654,8 @@ void snd_info_card_disconnect(struct snd_card *card) if (!card) return; mutex_lock(&info_mutex); - if (card->proc_root_link) { - snd_remove_proc_entry(snd_proc_root, card->proc_root_link); - card->proc_root_link = NULL; - } + proc_remove(card->proc_root_link); + card->proc_root_link = NULL; if (card->proc_root) snd_info_disconnect(card->proc_root); mutex_unlock(&info_mutex); @@ -853,7 +842,7 @@ static void snd_info_disconnect(struct snd_info_entry *entry) list_del_init(&entry->list); root = entry->parent == NULL ? snd_proc_root : entry->parent->p; snd_BUG_ON(!root); - snd_remove_proc_entry(root, entry->p); + proc_remove(entry->p); entry->p = NULL; } @@ -954,15 +943,21 @@ int snd_info_register(struct snd_info_entry * entry) return -ENXIO; root = entry->parent == NULL ? snd_proc_root : entry->parent->p; mutex_lock(&info_mutex); - p = create_proc_entry(entry->name, entry->mode, root); - if (!p) { - mutex_unlock(&info_mutex); - return -ENOMEM; + if (S_ISDIR(entry->mode)) { + p = proc_mkdir_mode(entry->name, entry->mode, root); + if (!p) { + mutex_unlock(&info_mutex); + return -ENOMEM; + } + } else { + p = proc_create_data(entry->name, entry->mode, root, + &snd_info_entry_operations, entry); + if (!p) { + mutex_unlock(&info_mutex); + return -ENOMEM; + } + proc_set_size(p, entry->size); } - if (!S_ISDIR(entry->mode)) - p->proc_fops = &snd_info_entry_operations; - p->size = entry->size; - p->data = entry; entry->p = p; if (entry->parent) list_add_tail(&entry->list, &entry->parent->children); diff --git a/sound/i2c/other/tea575x-tuner.c b/sound/i2c/other/tea575x-tuner.c index 3c6c1e3226f..8a36a1d9803 100644 --- a/sound/i2c/other/tea575x-tuner.c +++ b/sound/i2c/other/tea575x-tuner.c @@ -306,7 +306,7 @@ static int vidioc_g_tuner(struct file *file, void *priv, } static int vidioc_s_tuner(struct file *file, void *priv, - struct v4l2_tuner *v) + const struct v4l2_tuner *v) { struct snd_tea575x *tea = video_drvdata(file); u32 orig_val = tea->val; @@ -336,7 +336,7 @@ static int vidioc_g_frequency(struct file *file, void *priv, } static int vidioc_s_frequency(struct file *file, void *priv, - struct v4l2_frequency *f) + const struct v4l2_frequency *f) { struct snd_tea575x *tea = video_drvdata(file); @@ -350,7 +350,7 @@ static int vidioc_s_frequency(struct file *file, void *priv, else tea->band = BAND_FM; - tea->freq = clamp(f->frequency, bands[tea->band].rangelow, + tea->freq = clamp_t(u32, f->frequency, bands[tea->band].rangelow, bands[tea->band].rangehigh); snd_tea575x_set_freq(tea); return 0; diff --git a/sound/oss/dmasound/dmasound_core.c b/sound/oss/dmasound/dmasound_core.c index c918313c220..bac43b5b6e9 100644 --- a/sound/oss/dmasound/dmasound_core.c +++ b/sound/oss/dmasound/dmasound_core.c @@ -835,7 +835,7 @@ static void sq_reset(void) shared_resources_initialised = 0 ; } -static int sq_fsync(struct file *filp, struct dentry *dentry) +static int sq_fsync(void) { int rc = 0; int timeout = 5; @@ -874,7 +874,7 @@ static int sq_release(struct inode *inode, struct file *file) if (file->f_mode & FMODE_WRITE) { if (write_sq.busy) - rc = sq_fsync(file, file->f_path.dentry); + rc = sq_fsync(); sq_reset_output() ; /* make sure dma is stopped and all is quiet */ write_sq_release_buffers(); @@ -1025,7 +1025,7 @@ static int sq_ioctl(struct file *file, u_int cmd, u_long arg) */ result = 0 ; if (file->f_mode & FMODE_WRITE) { - result = sq_fsync(file, file->f_path.dentry); + result = sq_fsync(); sq_reset_output() ; } /* if we are the shared resource owner then release them */ diff --git a/sound/pci/mixart/mixart.c b/sound/pci/mixart/mixart.c index 01f7f37a841..934dec98e2c 100644 --- a/sound/pci/mixart/mixart.c +++ b/sound/pci/mixart/mixart.c @@ -1175,7 +1175,7 @@ static void snd_mixart_proc_read(struct snd_info_entry *entry, snd_iprintf(buffer, "\tstreaming : %d\n", streaming); snd_iprintf(buffer, "\tmailbox : %d\n", mailbox); - snd_iprintf(buffer, "\tinterrups handling : %d\n\n", interr); + snd_iprintf(buffer, "\tinterrupts handling : %d\n\n", interr); } } /* endif elf loaded */ } diff --git a/sound/pcmcia/pdaudiocf/pdaudiocf.c b/sound/pcmcia/pdaudiocf/pdaudiocf.c index f9b5229b272..8f489de5c4c 100644 --- a/sound/pcmcia/pdaudiocf/pdaudiocf.c +++ b/sound/pcmcia/pdaudiocf/pdaudiocf.c @@ -295,18 +295,5 @@ static struct pcmcia_driver pdacf_cs_driver = { .suspend = pdacf_suspend, .resume = pdacf_resume, #endif - }; - -static int __init init_pdacf(void) -{ - return pcmcia_register_driver(&pdacf_cs_driver); -} - -static void __exit exit_pdacf(void) -{ - pcmcia_unregister_driver(&pdacf_cs_driver); -} - -module_init(init_pdacf); -module_exit(exit_pdacf); +module_pcmcia_driver(pdacf_cs_driver); diff --git a/sound/pcmcia/vx/vxpocket.c b/sound/pcmcia/vx/vxpocket.c index 8f9350475c7..d4db7ecaa6b 100644 --- a/sound/pcmcia/vx/vxpocket.c +++ b/sound/pcmcia/vx/vxpocket.c @@ -367,16 +367,4 @@ static struct pcmcia_driver vxp_cs_driver = { .resume = vxp_resume, #endif }; - -static int __init init_vxpocket(void) -{ - return pcmcia_register_driver(&vxp_cs_driver); -} - -static void __exit exit_vxpocket(void) -{ - pcmcia_unregister_driver(&vxp_cs_driver); -} - -module_init(init_vxpocket); -module_exit(exit_vxpocket); +module_pcmcia_driver(vxp_cs_driver); diff --git a/sound/soc/codecs/wm8974.c b/sound/soc/codecs/wm8974.c index b47c252ef90..a2d01d10a5d 100644 --- a/sound/soc/codecs/wm8974.c +++ b/sound/soc/codecs/wm8974.c @@ -125,7 +125,7 @@ SOC_ENUM("Equaliser EQ4 Bandwidth", wm8974_enum[9]), SOC_ENUM("EQ4 Cut Off", wm8974_enum[10]), SOC_SINGLE_TLV("EQ4 Volume", WM8974_EQ4, 0, 24, 1, eq_tlv), -SOC_ENUM("Equaliser EQ5 Bandwith", wm8974_enum[11]), +SOC_ENUM("Equaliser EQ5 Bandwidth", wm8974_enum[11]), SOC_ENUM("EQ5 Cut Off", wm8974_enum[12]), SOC_SINGLE_TLV("EQ5 Volume", WM8974_EQ5, 0, 24, 1, eq_tlv), diff --git a/sound/soc/mxs/mxs-saif.c b/sound/soc/mxs/mxs-saif.c index b563141a654..d31dc52fa86 100644 --- a/sound/soc/mxs/mxs-saif.c +++ b/sound/soc/mxs/mxs-saif.c @@ -33,11 +33,12 @@ #include <sound/pcm_params.h> #include <sound/soc.h> #include <asm/mach-types.h> -#include <mach/hardware.h> -#include <mach/mxs.h> #include "mxs-saif.h" +#define MXS_SET_ADDR 0x4 +#define MXS_CLR_ADDR 0x8 + static struct mxs_saif *mxs_saif[2]; /* diff --git a/sound/soc/ux500/Kconfig b/sound/soc/ux500/Kconfig index c73c5907eb1..aa5011894c7 100644 --- a/sound/soc/ux500/Kconfig +++ b/sound/soc/ux500/Kconfig @@ -20,8 +20,8 @@ config SND_SOC_UX500_PLAT_DMA help Say Y if you want to enable the Ux500 platform-driver. -+config SND_SOC_UX500_MACH_MOP500 -+ tristate "Machine - MOP500 (Ux500 + AB8500)" +config SND_SOC_UX500_MACH_MOP500 + tristate "Machine - MOP500 (Ux500 + AB8500)" depends on AB8500_CORE && AB8500_GPADC && SND_SOC_UX500 select SND_SOC_AB8500_CODEC select SND_SOC_UX500_PLAT_MSP_I2S diff --git a/sound/soc/ux500/mop500_ab8500.c b/sound/soc/ux500/mop500_ab8500.c index 78cce236693..892ad9a05c9 100644 --- a/sound/soc/ux500/mop500_ab8500.c +++ b/sound/soc/ux500/mop500_ab8500.c @@ -17,8 +17,6 @@ #include <linux/io.h> #include <linux/clk.h> -#include <mach/hardware.h> - #include <sound/soc.h> #include <sound/soc-dapm.h> #include <sound/pcm.h> diff --git a/sound/soc/ux500/ux500_msp_dai.c b/sound/soc/ux500/ux500_msp_dai.c index f1e8a5ecb00..7d5fc132852 100644 --- a/sound/soc/ux500/ux500_msp_dai.c +++ b/sound/soc/ux500/ux500_msp_dai.c @@ -19,9 +19,7 @@ #include <linux/clk.h> #include <linux/regulator/consumer.h> #include <linux/mfd/dbx500-prcmu.h> - -#include <mach/hardware.h> -#include <mach/msp.h> +#include <linux/platform_data/asoc-ux500-msp.h> #include <sound/soc.h> #include <sound/soc-dai.h> diff --git a/sound/soc/ux500/ux500_msp_i2s.c b/sound/soc/ux500/ux500_msp_i2s.c index a26c6bf0a29..f2db6c90a9e 100644 --- a/sound/soc/ux500/ux500_msp_i2s.c +++ b/sound/soc/ux500/ux500_msp_i2s.c @@ -20,9 +20,7 @@ #include <linux/slab.h> #include <linux/io.h> #include <linux/of.h> - -#include <mach/hardware.h> -#include <mach/msp.h> +#include <linux/platform_data/asoc-ux500-msp.h> #include <sound/soc.h> diff --git a/sound/soc/ux500/ux500_msp_i2s.h b/sound/soc/ux500/ux500_msp_i2s.h index 6f3e3dccbcb..e5cd105c90f 100644 --- a/sound/soc/ux500/ux500_msp_i2s.h +++ b/sound/soc/ux500/ux500_msp_i2s.h @@ -17,8 +17,6 @@ #include <linux/platform_device.h> -#include <mach/msp.h> - #define MSP_INPUT_FREQ_APB 48000000 /*** Stereo mode. Used for APB data accesses as 16 bits accesses (mono), diff --git a/sound/sound_firmware.c b/sound/sound_firmware.c index e1490346805..b155137ee31 100644 --- a/sound/sound_firmware.c +++ b/sound/sound_firmware.c @@ -1,6 +1,7 @@ #include <linux/vmalloc.h> #include <linux/module.h> #include <linux/fs.h> +#include <linux/file.h> #include <linux/mm.h> #include <linux/sched.h> #include <asm/uaccess.h> @@ -23,14 +24,14 @@ static int do_mod_firmware_load(const char *fn, char **fp) if (l <= 0 || l > 131072) { printk(KERN_INFO "Invalid firmware '%s'\n", fn); - filp_close(filp, NULL); + fput(filp); return 0; } dp = vmalloc(l); if (dp == NULL) { printk(KERN_INFO "Out of memory loading '%s'.\n", fn); - filp_close(filp, NULL); + fput(filp); return 0; } pos = 0; @@ -38,10 +39,10 @@ static int do_mod_firmware_load(const char *fn, char **fp) { printk(KERN_INFO "Failed to read '%s'.\n", fn); vfree(dp); - filp_close(filp, NULL); + fput(filp); return 0; } - filp_close(filp, NULL); + fput(filp); *fp = dp; return (int) l; } |