git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge to Fedora kernel-2.6.18-1.2255_FC5-vs2.0.2.2-rc9 patched with stable patch...
[linux-2.6.git]
/
drivers
/
input
/
mouse
/
psmouse-base.c
diff --git
a/drivers/input/mouse/psmouse-base.c
b/drivers/input/mouse/psmouse-base.c
index
343afa3
..
07b0604
100644
(file)
--- a/
drivers/input/mouse/psmouse-base.c
+++ b/
drivers/input/mouse/psmouse-base.c
@@
-1332,20
+1332,22
@@
ssize_t psmouse_attr_set_helper(struct device *dev, struct device_attribute *dev
static ssize_t psmouse_show_int_attr(struct psmouse *psmouse, void *offset, char *buf)
{
static ssize_t psmouse_show_int_attr(struct psmouse *psmouse, void *offset, char *buf)
{
- unsigned
long *field = (unsigned long
*)((char *)psmouse + (size_t)offset);
+ unsigned
int *field = (unsigned int
*)((char *)psmouse + (size_t)offset);
- return sprintf(buf, "%
l
u\n", *field);
+ return sprintf(buf, "%u\n", *field);
}
static ssize_t psmouse_set_int_attr(struct psmouse *psmouse, void *offset, const char *buf, size_t count)
{
}
static ssize_t psmouse_set_int_attr(struct psmouse *psmouse, void *offset, const char *buf, size_t count)
{
- unsigned
long *field = (unsigned long
*)((char *)psmouse + (size_t)offset);
+ unsigned
int *field = (unsigned int
*)((char *)psmouse + (size_t)offset);
unsigned long value;
char *rest;
value = simple_strtoul(buf, &rest, 10);
if (*rest)
return -EINVAL;
unsigned long value;
char *rest;
value = simple_strtoul(buf, &rest, 10);
if (*rest)
return -EINVAL;
+ if ((unsigned int)value != value)
+ return -EINVAL;
*field = value;
*field = value;