Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
82e8290d
Commit
82e8290d
authored
Feb 10, 2004
by
Nathan Scott
Browse files
Options
Browse Files
Download
Plain Diff
Merge nathans@xfs.org:/export/hose/bkroot/xfs-linux-2.6
into sgi.com:/source2/xfs-linux-2.6
parents
71d024d5
a6eebfd5
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
12 deletions
+13
-12
drivers/char/keyboard.c
drivers/char/keyboard.c
+1
-2
drivers/input/evdev.c
drivers/input/evdev.c
+3
-5
drivers/input/serio/i8042.c
drivers/input/serio/i8042.c
+3
-2
include/linux/input.h
include/linux/input.h
+6
-3
No files found.
drivers/char/keyboard.c
View file @
82e8290d
...
...
@@ -201,8 +201,7 @@ int setkeycode(unsigned int scancode, unsigned int keycode)
if
(
scancode
<
0
||
scancode
>=
dev
->
keycodemax
)
return
-
EINVAL
;
oldkey
=
INPUT_KEYCODE
(
dev
,
scancode
);
SET_INPUT_KEYCODE
(
dev
,
scancode
,
oldkey
);
oldkey
=
SET_INPUT_KEYCODE
(
dev
,
scancode
,
keycode
);
clear_bit
(
oldkey
,
dev
->
keybit
);
set_bit
(
keycode
,
dev
->
keybit
);
...
...
drivers/input/evdev.c
View file @
82e8290d
...
...
@@ -209,7 +209,7 @@ static int evdev_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
struct
evdev
*
evdev
=
list
->
evdev
;
struct
input_dev
*
dev
=
evdev
->
handle
.
dev
;
struct
input_absinfo
abs
;
int
i
,
t
,
u
,
v
;
int
t
,
u
,
v
;
if
(
!
evdev
->
exist
)
return
-
ENODEV
;
...
...
@@ -231,10 +231,8 @@ static int evdev_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
if
(
get_user
(
t
,
((
int
*
)
arg
)
+
0
))
return
-
EFAULT
;
if
(
t
<
0
||
t
>
dev
->
keycodemax
||
!
dev
->
keycodesize
)
return
-
EINVAL
;
if
(
get_user
(
v
,
((
int
*
)
arg
)
+
1
))
return
-
EFAULT
;
u
=
INPUT_KEYCODE
(
dev
,
t
);
SET_INPUT_KEYCODE
(
dev
,
t
,
v
);
for
(
i
=
0
;
i
<
dev
->
keycodemax
;
i
++
)
if
(
v
==
u
)
break
;
if
(
i
==
dev
->
keycodemax
)
clear_bit
(
u
,
dev
->
keybit
);
u
=
SET_INPUT_KEYCODE
(
dev
,
t
,
v
);
clear_bit
(
u
,
dev
->
keybit
);
set_bit
(
v
,
dev
->
keybit
);
return
0
;
...
...
drivers/input/serio/i8042.c
View file @
82e8290d
...
...
@@ -375,13 +375,14 @@ static char i8042_mux_phys[4][32];
static
irqreturn_t
i8042_interrupt
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
regs
)
{
unsigned
long
flags
;
unsigned
char
str
,
data
;
unsigned
char
str
,
data
=
0
;
unsigned
int
dfl
;
int
ret
;
spin_lock_irqsave
(
&
i8042_lock
,
flags
);
str
=
i8042_read_status
();
data
=
i8042_read_data
();
if
(
str
&
I8042_STR_OBF
)
data
=
i8042_read_data
();
spin_unlock_irqrestore
(
&
i8042_lock
,
flags
);
if
(
~
str
&
I8042_STR_OBF
)
{
...
...
include/linux/input.h
View file @
82e8290d
...
...
@@ -752,25 +752,28 @@ struct ff_effect {
#define init_input_dev(dev) do { INIT_LIST_HEAD(&((dev)->h_list)); INIT_LIST_HEAD(&((dev)->node)); } while (0)
#define SET_INPUT_KEYCODE(dev, scancode, val) \
do {
\
({ unsigned __old;
\
switch (dev->keycodesize) { \
case 1: { \
u8 *k = (u8 *)dev->keycode; \
__old = k[scancode]; \
k[scancode] = val; \
break; \
} \
case 2: { \
u16 *k = (u16 *)dev->keycode; \
__old = k[scancode]; \
k[scancode] = val; \
break; \
} \
case 4
: { \
default
: { \
u32 *k = (u32 *)dev->keycode; \
__old = k[scancode]; \
k[scancode] = val; \
break; \
} \
} \
} while (0
)
__old; }
)
struct
input_dev
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment