diff options
Diffstat (limited to 'sound/core')
38 files changed, 49 insertions, 11 deletions
diff --git a/sound/core/control.c b/sound/core/control.c index 978fe1a8e9f0..819a5c579a39 100644 --- a/sound/core/control.c +++ b/sound/core/control.c @@ -21,6 +21,7 @@ #include <linux/threads.h> #include <linux/interrupt.h> +#include <linux/module.h> #include <linux/slab.h> #include <linux/vmalloc.h> #include <linux/time.h> @@ -1081,12 +1082,12 @@ static int snd_ctl_elem_init_enum_names(struct user_element *ue) char *names, *p; size_t buf_len, name_len; unsigned int i; + const uintptr_t user_ptrval = ue->info.value.enumerated.names_ptr; if (ue->info.value.enumerated.names_length > 64 * 1024) return -EINVAL; - names = memdup_user( - (const void __user *)ue->info.value.enumerated.names_ptr, + names = memdup_user((const void __user *)user_ptrval, ue->info.value.enumerated.names_length); if (IS_ERR(names)) return PTR_ERR(names); diff --git a/sound/core/device.c b/sound/core/device.c index 2d1ad4b0cd65..f03cb5444a5a 100644 --- a/sound/core/device.c +++ b/sound/core/device.c @@ -21,6 +21,7 @@ #include <linux/slab.h> #include <linux/time.h> +#include <linux/export.h> #include <linux/errno.h> #include <sound/core.h> diff --git a/sound/core/hwdep.c b/sound/core/hwdep.c index a70ee7f1ed98..75ea16f35b1a 100644 --- a/sound/core/hwdep.c +++ b/sound/core/hwdep.c @@ -24,6 +24,7 @@ #include <linux/slab.h> #include <linux/time.h> #include <linux/mutex.h> +#include <linux/module.h> #include <sound/core.h> #include <sound/control.h> #include <sound/minors.h> @@ -272,7 +273,14 @@ static int snd_hwdep_control_ioctl(struct snd_card *card, if (get_user(device, (int __user *)arg)) return -EFAULT; mutex_lock(®ister_mutex); - device = device < 0 ? 0 : device + 1; + + if (device < 0) + device = 0; + else if (device < SNDRV_MINOR_HWDEPS) + device++; + else + device = SNDRV_MINOR_HWDEPS; + while (device < SNDRV_MINOR_HWDEPS) { if (snd_hwdep_search(card, device)) break; diff --git a/sound/core/info.c b/sound/core/info.c index 601f0ebb677b..c1e611c65c8f 100644 --- a/sound/core/info.c +++ b/sound/core/info.c @@ -24,6 +24,7 @@ #include <linux/mm.h> #include <linux/slab.h> #include <linux/string.h> +#include <linux/module.h> #include <sound/core.h> #include <sound/minors.h> #include <sound/info.h> diff --git a/sound/core/info_oss.c b/sound/core/info_oss.c index e4af138d651a..cf42ab5080eb 100644 --- a/sound/core/info_oss.c +++ b/sound/core/info_oss.c @@ -22,6 +22,7 @@ #include <linux/slab.h> #include <linux/time.h> #include <linux/string.h> +#include <linux/export.h> #include <sound/core.h> #include <sound/minors.h> #include <sound/info.h> diff --git a/sound/core/init.c b/sound/core/init.c index 2c041bb36ab3..3ac49b1b7cb8 100644 --- a/sound/core/init.c +++ b/sound/core/init.c @@ -21,6 +21,7 @@ #include <linux/init.h> #include <linux/sched.h> +#include <linux/module.h> #include <linux/file.h> #include <linux/slab.h> #include <linux/time.h> diff --git a/sound/core/isadma.c b/sound/core/isadma.c index 950e19ba91fc..c0f1208bb7df 100644 --- a/sound/core/isadma.c +++ b/sound/core/isadma.c @@ -26,6 +26,7 @@ #undef HAVE_REALLY_SLOW_DMA_CONTROLLER +#include <linux/export.h> #include <sound/core.h> #include <asm/dma.h> diff --git a/sound/core/jack.c b/sound/core/jack.c index 240a3e13470d..26edf63b265f 100644 --- a/sound/core/jack.c +++ b/sound/core/jack.c @@ -21,6 +21,7 @@ #include <linux/input.h> #include <linux/slab.h> +#include <linux/module.h> #include <sound/jack.h> #include <sound/core.h> diff --git a/sound/core/memory.c b/sound/core/memory.c index 1161158582a6..66a278d0b04e 100644 --- a/sound/core/memory.c +++ b/sound/core/memory.c @@ -20,6 +20,7 @@ * */ +#include <linux/export.h> #include <asm/io.h> #include <asm/uaccess.h> #include <sound/core.h> diff --git a/sound/core/misc.c b/sound/core/misc.c index eb9fe2e1d291..465f0ce772cb 100644 --- a/sound/core/misc.c +++ b/sound/core/misc.c @@ -20,6 +20,8 @@ */ #include <linux/init.h> +#include <linux/export.h> +#include <linux/moduleparam.h> #include <linux/time.h> #include <linux/slab.h> #include <linux/ioport.h> diff --git a/sound/core/oss/mixer_oss.c b/sound/core/oss/mixer_oss.c index 1b5e0c49a0ad..18297f7f2c55 100644 --- a/sound/core/oss/mixer_oss.c +++ b/sound/core/oss/mixer_oss.c @@ -23,6 +23,7 @@ #include <linux/slab.h> #include <linux/time.h> #include <linux/string.h> +#include <linux/module.h> #include <sound/core.h> #include <sound/minors.h> #include <sound/control.h> diff --git a/sound/core/oss/pcm_oss.c b/sound/core/oss/pcm_oss.c index 23c34a02894b..3cc4b86dfb7e 100644 --- a/sound/core/oss/pcm_oss.c +++ b/sound/core/oss/pcm_oss.c @@ -30,7 +30,7 @@ #include <linux/slab.h> #include <linux/time.h> #include <linux/vmalloc.h> -#include <linux/moduleparam.h> +#include <linux/module.h> #include <linux/math64.h> #include <linux/string.h> #include <sound/core.h> diff --git a/sound/core/pcm.c b/sound/core/pcm.c index ee9abb2d9001..8928ca871c22 100644 --- a/sound/core/pcm.c +++ b/sound/core/pcm.c @@ -21,6 +21,7 @@ #include <linux/init.h> #include <linux/slab.h> +#include <linux/module.h> #include <linux/time.h> #include <linux/mutex.h> #include <sound/core.h> diff --git a/sound/core/pcm_lib.c b/sound/core/pcm_lib.c index 95d1e789715f..3420bd3da5d7 100644 --- a/sound/core/pcm_lib.c +++ b/sound/core/pcm_lib.c @@ -23,6 +23,7 @@ #include <linux/slab.h> #include <linux/time.h> #include <linux/math64.h> +#include <linux/export.h> #include <sound/core.h> #include <sound/control.h> #include <sound/info.h> diff --git a/sound/core/pcm_memory.c b/sound/core/pcm_memory.c index 150cb7edffee..957131366dd9 100644 --- a/sound/core/pcm_memory.c +++ b/sound/core/pcm_memory.c @@ -25,6 +25,7 @@ #include <linux/slab.h> #include <linux/moduleparam.h> #include <linux/vmalloc.h> +#include <linux/export.h> #include <sound/core.h> #include <sound/pcm.h> #include <sound/info.h> diff --git a/sound/core/pcm_misc.c b/sound/core/pcm_misc.c index 88f02e3866e0..9c9eff9afbac 100644 --- a/sound/core/pcm_misc.c +++ b/sound/core/pcm_misc.c @@ -20,6 +20,7 @@ */ #include <linux/time.h> +#include <linux/export.h> #include <sound/core.h> #include <sound/pcm.h> #define SND_PCM_FORMAT_UNKNOWN (-1) diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c index d7d2179c0363..25ed9fe41b89 100644 --- a/sound/core/pcm_native.c +++ b/sound/core/pcm_native.c @@ -20,6 +20,7 @@ */ #include <linux/mm.h> +#include <linux/module.h> #include <linux/file.h> #include <linux/slab.h> #include <linux/time.h> diff --git a/sound/core/rawmidi.c b/sound/core/rawmidi.c index 849a0ed95054..ebf6e49ad3d4 100644 --- a/sound/core/rawmidi.c +++ b/sound/core/rawmidi.c @@ -27,7 +27,7 @@ #include <linux/time.h> #include <linux/wait.h> #include <linux/mutex.h> -#include <linux/moduleparam.h> +#include <linux/module.h> #include <linux/delay.h> #include <sound/rawmidi.h> #include <sound/info.h> diff --git a/sound/core/seq/oss/seq_oss.c b/sound/core/seq/oss/seq_oss.c index a1f1a2f00ccb..8d4d5e853efe 100644 --- a/sound/core/seq/oss/seq_oss.c +++ b/sound/core/seq/oss/seq_oss.c @@ -21,7 +21,7 @@ */ #include <linux/init.h> -#include <linux/moduleparam.h> +#include <linux/module.h> #include <linux/mutex.h> #include <sound/core.h> #include <sound/minors.h> diff --git a/sound/core/seq/oss/seq_oss_init.c b/sound/core/seq/oss/seq_oss_init.c index 69cd7b3c362d..e3cb46fef2c7 100644 --- a/sound/core/seq/oss/seq_oss_init.c +++ b/sound/core/seq/oss/seq_oss_init.c @@ -28,6 +28,7 @@ #include "seq_oss_timer.h" #include "seq_oss_event.h" #include <linux/init.h> +#include <linux/export.h> #include <linux/moduleparam.h> #include <linux/slab.h> diff --git a/sound/core/seq/oss/seq_oss_synth.c b/sound/core/seq/oss/seq_oss_synth.c index ee44ab9593c0..c5b773a1eea9 100644 --- a/sound/core/seq/oss/seq_oss_synth.c +++ b/sound/core/seq/oss/seq_oss_synth.c @@ -24,6 +24,7 @@ #include "seq_oss_midi.h" #include "../seq_lock.h" #include <linux/init.h> +#include <linux/module.h> #include <linux/slab.h> /* diff --git a/sound/core/seq/seq.c b/sound/core/seq/seq.c index 119fddb6fc99..9d8379aedf40 100644 --- a/sound/core/seq/seq.c +++ b/sound/core/seq/seq.c @@ -20,7 +20,7 @@ */ #include <linux/init.h> -#include <linux/moduleparam.h> +#include <linux/module.h> #include <sound/core.h> #include <sound/initval.h> diff --git a/sound/core/seq/seq_clientmgr.c b/sound/core/seq/seq_clientmgr.c index f2436d33fbf7..4dc6bae80e15 100644 --- a/sound/core/seq/seq_clientmgr.c +++ b/sound/core/seq/seq_clientmgr.c @@ -22,6 +22,7 @@ */ #include <linux/init.h> +#include <linux/export.h> #include <linux/slab.h> #include <sound/core.h> #include <sound/minors.h> diff --git a/sound/core/seq/seq_device.c b/sound/core/seq/seq_device.c index 1f997675c893..5cf8d65ed5ef 100644 --- a/sound/core/seq/seq_device.c +++ b/sound/core/seq/seq_device.c @@ -37,6 +37,7 @@ */ #include <linux/init.h> +#include <linux/module.h> #include <sound/core.h> #include <sound/info.h> #include <sound/seq_device.h> diff --git a/sound/core/seq/seq_dummy.c b/sound/core/seq/seq_dummy.c index 1d7d90ca455e..b9b2235d9ab1 100644 --- a/sound/core/seq/seq_dummy.c +++ b/sound/core/seq/seq_dummy.c @@ -20,7 +20,7 @@ #include <linux/init.h> #include <linux/slab.h> -#include <linux/moduleparam.h> +#include <linux/module.h> #include <sound/core.h> #include "seq_clientmgr.h" #include <sound/initval.h> diff --git a/sound/core/seq/seq_info.c b/sound/core/seq/seq_info.c index 201f8106ffdd..acf7769419f0 100644 --- a/sound/core/seq/seq_info.c +++ b/sound/core/seq/seq_info.c @@ -20,6 +20,7 @@ */ #include <linux/init.h> +#include <linux/export.h> #include <sound/core.h> #include "seq_info.h" diff --git a/sound/core/seq/seq_lock.c b/sound/core/seq/seq_lock.c index 54f921edda79..2cfe50c71a9d 100644 --- a/sound/core/seq/seq_lock.c +++ b/sound/core/seq/seq_lock.c @@ -19,6 +19,7 @@ * */ +#include <linux/export.h> #include <sound/core.h> #include "seq_lock.h" diff --git a/sound/core/seq/seq_memory.c b/sound/core/seq/seq_memory.c index 7f50c1437675..f478f770bf52 100644 --- a/sound/core/seq/seq_memory.c +++ b/sound/core/seq/seq_memory.c @@ -21,6 +21,7 @@ */ #include <linux/init.h> +#include <linux/export.h> #include <linux/slab.h> #include <linux/vmalloc.h> #include <sound/core.h> diff --git a/sound/core/seq/seq_midi.c b/sound/core/seq/seq_midi.c index ebaf1b541dcd..64069dbf89ca 100644 --- a/sound/core/seq/seq_midi.c +++ b/sound/core/seq/seq_midi.c @@ -30,7 +30,7 @@ Possible options for midisynth module: #include <linux/slab.h> #include <linux/errno.h> #include <linux/string.h> -#include <linux/moduleparam.h> +#include <linux/module.h> #include <linux/mutex.h> #include <sound/core.h> #include <sound/rawmidi.h> diff --git a/sound/core/seq/seq_midi_emul.c b/sound/core/seq/seq_midi_emul.c index 07c663135c62..6f64471ddde3 100644 --- a/sound/core/seq/seq_midi_emul.c +++ b/sound/core/seq/seq_midi_emul.c @@ -32,6 +32,7 @@ #include <linux/init.h> #include <linux/slab.h> #include <linux/string.h> +#include <linux/module.h> #include <sound/core.h> #include <sound/seq_kernel.h> #include <sound/seq_midi_emul.h> diff --git a/sound/core/seq/seq_midi_event.c b/sound/core/seq/seq_midi_event.c index b5d6ea4904c0..37db7ba492a6 100644 --- a/sound/core/seq/seq_midi_event.c +++ b/sound/core/seq/seq_midi_event.c @@ -22,6 +22,7 @@ #include <linux/slab.h> #include <linux/errno.h> #include <linux/string.h> +#include <linux/module.h> #include <sound/core.h> #include <sound/seq_kernel.h> #include <sound/seq_midi_event.h> diff --git a/sound/core/seq/seq_ports.c b/sound/core/seq/seq_ports.c index e12bcd94b6db..9516e5ce3aad 100644 --- a/sound/core/seq/seq_ports.c +++ b/sound/core/seq/seq_ports.c @@ -22,6 +22,7 @@ #include <sound/core.h> #include <linux/slab.h> +#include <linux/module.h> #include "seq_system.h" #include "seq_ports.h" #include "seq_clientmgr.h" diff --git a/sound/core/seq/seq_system.c b/sound/core/seq/seq_system.c index c38b90cf3cb0..8ce1d0b40dce 100644 --- a/sound/core/seq/seq_system.c +++ b/sound/core/seq/seq_system.c @@ -20,6 +20,7 @@ */ #include <linux/init.h> +#include <linux/export.h> #include <linux/slab.h> #include <sound/core.h> #include "seq_system.h" diff --git a/sound/core/seq/seq_virmidi.c b/sound/core/seq/seq_virmidi.c index 86e7739269ca..4b50e604276d 100644 --- a/sound/core/seq/seq_virmidi.c +++ b/sound/core/seq/seq_virmidi.c @@ -37,6 +37,7 @@ #include <linux/init.h> #include <linux/wait.h> +#include <linux/module.h> #include <linux/slab.h> #include <sound/core.h> #include <sound/rawmidi.h> diff --git a/sound/core/sound.c b/sound/core/sound.c index 1c7a3efe1778..828af353ea9f 100644 --- a/sound/core/sound.c +++ b/sound/core/sound.c @@ -23,7 +23,7 @@ #include <linux/slab.h> #include <linux/time.h> #include <linux/device.h> -#include <linux/moduleparam.h> +#include <linux/module.h> #include <sound/core.h> #include <sound/minors.h> #include <sound/info.h> diff --git a/sound/core/sound_oss.c b/sound/core/sound_oss.c index 0c164e5e4322..c70092043061 100644 --- a/sound/core/sound_oss.c +++ b/sound/core/sound_oss.c @@ -26,6 +26,7 @@ #endif #include <linux/init.h> +#include <linux/export.h> #include <linux/slab.h> #include <linux/time.h> #include <sound/core.h> diff --git a/sound/core/timer.c b/sound/core/timer.c index 67ebf1c21c04..8e7561dfc5fc 100644 --- a/sound/core/timer.c +++ b/sound/core/timer.c @@ -24,7 +24,7 @@ #include <linux/slab.h> #include <linux/time.h> #include <linux/mutex.h> -#include <linux/moduleparam.h> +#include <linux/module.h> #include <linux/string.h> #include <sound/core.h> #include <sound/timer.h> diff --git a/sound/core/vmaster.c b/sound/core/vmaster.c index a39d3d8c2f9c..5dbab38d04af 100644 --- a/sound/core/vmaster.c +++ b/sound/core/vmaster.c @@ -10,6 +10,7 @@ */ #include <linux/slab.h> +#include <linux/export.h> #include <sound/core.h> #include <sound/control.h> #include <sound/tlv.h> |