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
Kirill Smelkov
linux
Commits
db288fe4
Commit
db288fe4
authored
Jan 20, 2004
by
Glenn Burkhardt
Committed by
Vojtech Pavlik
Jan 20, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
input: Properly recompute initial values upon recalibration in joydev.
parent
963be119
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
+10
-3
drivers/input/joydev.c
drivers/input/joydev.c
+10
-3
No files found.
drivers/input/joydev.c
View file @
db288fe4
...
...
@@ -290,7 +290,7 @@ static int joydev_ioctl(struct inode *inode, struct file *file, unsigned int cmd
struct
joydev_list
*
list
=
file
->
private_data
;
struct
joydev
*
joydev
=
list
->
joydev
;
struct
input_dev
*
dev
=
joydev
->
handle
.
dev
;
int
i
;
int
i
,
j
;
if
(
!
joydev
->
exist
)
return
-
ENODEV
;
...
...
@@ -324,8 +324,14 @@ static int joydev_ioctl(struct inode *inode, struct file *file, unsigned int cmd
case
JSIOCGBUTTONS
:
return
put_user
(
joydev
->
nkey
,
(
__u8
*
)
arg
);
case
JSIOCSCORR
:
return
copy_from_user
(
joydev
->
corr
,
(
struct
js_corr
*
)
arg
,
sizeof
(
struct
js_corr
)
*
joydev
->
nabs
)
?
-
EFAULT
:
0
;
if
(
copy_from_user
(
joydev
->
corr
,
(
struct
js_corr
*
)
arg
,
sizeof
(
struct
js_corr
)
*
joydev
->
nabs
))
return
-
EFAULT
;
for
(
i
=
0
;
i
<
joydev
->
nabs
;
i
++
)
{
j
=
joydev
->
abspam
[
i
];
joydev
->
abs
[
i
]
=
joydev_correct
(
dev
->
abs
[
j
],
joydev
->
corr
+
i
);
}
return
0
;
case
JSIOCGCORR
:
return
copy_to_user
((
struct
js_corr
*
)
arg
,
joydev
->
corr
,
sizeof
(
struct
js_corr
)
*
joydev
->
nabs
)
?
-
EFAULT
:
0
;
...
...
@@ -426,6 +432,7 @@ static struct input_handle *joydev_connect(struct input_handler *handler, struct
j
=
joydev
->
abspam
[
i
];
if
(
dev
->
absmax
[
j
]
==
dev
->
absmin
[
j
])
{
joydev
->
corr
[
i
].
type
=
JS_CORR_NONE
;
joydev
->
abs
[
i
]
=
dev
->
abs
[
j
];
continue
;
}
joydev
->
corr
[
i
].
type
=
JS_CORR_BROKEN
;
...
...
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