git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
bci: some more code for testing
[pandora-kernel.git]
/
sound
/
ppc
/
beep.c
diff --git
a/sound/ppc/beep.c
b/sound/ppc/beep.c
index
566b5ab
..
baa2a72
100644
(file)
--- a/
sound/ppc/beep.c
+++ b/
sound/ppc/beep.c
@@
-18,7
+18,6
@@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include <sound/driver.h>
#include <asm/io.h>
#include <asm/irq.h>
#include <linux/init.h>
#include <asm/io.h>
#include <asm/irq.h>
#include <linux/init.h>
@@
-195,10
+194,13
@@
static int snd_pmac_put_beep(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
struct snd_pmac *chip = snd_kcontrol_chip(kcontrol);
struct snd_ctl_elem_value *ucontrol)
{
struct snd_pmac *chip = snd_kcontrol_chip(kcontrol);
-
int o
val;
+
unsigned int oval, n
val;
snd_assert(chip->beep, return -ENXIO);
oval = chip->beep->volume;
snd_assert(chip->beep, return -ENXIO);
oval = chip->beep->volume;
- chip->beep->volume = ucontrol->value.integer.value[0];
+ nval = ucontrol->value.integer.value[0];
+ if (nval > 100)
+ return -EINVAL;
+ chip->beep->volume = nval;
return oval != chip->beep->volume;
}
return oval != chip->beep->volume;
}