diff options
author | Felix Fietkau <nbd@openwrt.org> | 2006-01-10 19:43:00 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2006-01-10 19:43:00 +0000 |
commit | fbc6b140a51f4faa9b995eb965b6e69ebb541f3f (patch) | |
tree | 4f317d291370cf0af876f446896c66a3a503be97 /target/linux/generic-2.4/patches/222-sound.patch | |
parent | d9e36255b00d6bbcdedeba7ab9e22f37f8ed79bc (diff) | |
download | upstream-fbc6b140a51f4faa9b995eb965b6e69ebb541f3f.tar.gz upstream-fbc6b140a51f4faa9b995eb965b6e69ebb541f3f.tar.bz2 upstream-fbc6b140a51f4faa9b995eb965b6e69ebb541f3f.zip |
large target/linux cleanup
git-svn-id: svn://svn.openwrt.org/openwrt/trunk/openwrt@2877 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/generic-2.4/patches/222-sound.patch')
-rw-r--r-- | target/linux/generic-2.4/patches/222-sound.patch | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/target/linux/generic-2.4/patches/222-sound.patch b/target/linux/generic-2.4/patches/222-sound.patch new file mode 100644 index 0000000000..351e8c2072 --- /dev/null +++ b/target/linux/generic-2.4/patches/222-sound.patch @@ -0,0 +1,27 @@ +diff -rNu linux-2.4.30/drivers/sound/sound_core.c linux-2.4.30.new/drivers/sound/sound_core.c +--- linux-2.4.30/drivers/sound/sound_core.c 2001-10-01 05:26:08.000000000 +1000 ++++ linux-2.4.30.new/drivers/sound/sound_core.c 2005-08-27 22:52:55.061719968 +1000 +@@ -174,9 +174,9 @@ + } + + if (r == low) +- sprintf (name_buf, "%s", name); ++ snprintf (name_buf, sizeof(name_buf), "%s", name); + else +- sprintf (name_buf, "%s%d", name, (r - low) / SOUND_STEP); ++ snprintf (name_buf, sizeof(name_buf), "%s%d", name, (r - low) / SOUND_STEP); + s->de = devfs_register (devfs_handle, name_buf, + DEVFS_FL_NONE, SOUND_MAJOR, s->unit_minor, + S_IFCHR | mode, fops, NULL); +@@ -507,9 +507,9 @@ + * ALSA toplevel modules for soundcards, thus we need + * load them at first. [Jaroslav Kysela <perex@jcu.cz>] + */ +- sprintf(mod, "sound-slot-%i", unit>>4); ++ snprintf(mod, sizeof(mod), "sound-slot-%i", unit>>4); + request_module(mod); +- sprintf(mod, "sound-service-%i-%i", unit>>4, chain); ++ snprintf(mod, sizeof(mod), "sound-service-%i-%i", unit>>4, chain); + request_module(mod); + spin_lock(&sound_loader_lock); + s = __look_for_unit(chain, unit); |