git://ftp.safe.ca
/
safe
/
jmp
/
linux-2.6
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
bnx2x: Register dump
[safe/jmp/linux-2.6]
/
drivers
/
input
/
ff-memless.c
diff --git
a/drivers/input/ff-memless.c
b/drivers/input/ff-memless.c
index
eba18b6
..
bc4e40f
100644
(file)
--- a/
drivers/input/ff-memless.c
+++ b/
drivers/input/ff-memless.c
@@
-29,7
+29,7
@@
#include <linux/module.h>
#include <linux/mutex.h>
#include <linux/spinlock.h>
#include <linux/module.h>
#include <linux/mutex.h>
#include <linux/spinlock.h>
-#include <linux/
sched
.h>
+#include <linux/
jiffies
.h>
#include "fixp-arith.h"
#include "fixp-arith.h"
@@
-247,9
+247,9
@@
static void ml_combine_effects(struct ff_effect *effect,
* in s8, this should be changed to something more generic
*/
effect->u.ramp.start_level =
* in s8, this should be changed to something more generic
*/
effect->u.ramp.start_level =
-
max(min(effect->u.ramp.start_level + x, 0x7f), -0x80
);
+
clamp_val(effect->u.ramp.start_level + x, -0x80, 0x7f
);
effect->u.ramp.end_level =
effect->u.ramp.end_level =
-
max(min(effect->u.ramp.end_level + y, 0x7f), -0x80
);
+
clamp_val(effect->u.ramp.end_level + y, -0x80, 0x7f
);
break;
case FF_RUMBLE:
break;
case FF_RUMBLE:
@@
-397,8
+397,9
@@
static int ml_ff_playback(struct input_dev *dev, int effect_id, int value)
{
struct ml_device *ml = dev->ff->private;
struct ml_effect_state *state = &ml->states[effect_id];
{
struct ml_device *ml = dev->ff->private;
struct ml_effect_state *state = &ml->states[effect_id];
+ unsigned long flags;
- spin_lock_
bh(&ml->timer_lock
);
+ spin_lock_
irqsave(&ml->timer_lock, flags
);
if (value > 0) {
debug("initiated play");
if (value > 0) {
debug("initiated play");
@@
-424,7
+425,7
@@
static int ml_ff_playback(struct input_dev *dev, int effect_id, int value)
ml_play_effects(ml);
}
ml_play_effects(ml);
}
- spin_unlock_
bh(&ml->timer_lock
);
+ spin_unlock_
irqrestore(&ml->timer_lock, flags
);
return 0;
}
return 0;
}