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
82547e90
Commit
82547e90
authored
Jun 02, 2008
by
Dmitry Torokhov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Input: atamouse - various cleanups
Signed-off-by:
Dmitry Torokhov
<
dtor@mail.ru
>
parent
81956128
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
15 deletions
+12
-15
drivers/input/mouse/atarimouse.c
drivers/input/mouse/atarimouse.c
+12
-15
No files found.
drivers/input/mouse/atarimouse.c
View file @
82547e90
...
...
@@ -57,15 +57,12 @@ MODULE_AUTHOR("Michael Schmitz <schmitz@biophys.uni-duesseldorf.de>");
MODULE_DESCRIPTION
(
"Atari mouse driver"
);
MODULE_LICENSE
(
"GPL"
);
static
int
mouse_threshold
[
2
]
=
{
2
,
2
};
static
int
mouse_threshold
[
2
]
=
{
2
,
2
};
module_param_array
(
mouse_threshold
,
int
,
NULL
,
0
);
#ifdef __MODULE__
MODULE_PARM
(
mouse_threshold
,
"2i"
);
#endif
#ifdef FIXED_ATARI_JOYSTICK
extern
int
atari_mouse_buttons
;
#endif
static
int
atamouse_used
=
0
;
static
struct
input_dev
*
atamouse_dev
;
...
...
@@ -97,9 +94,6 @@ static void atamouse_interrupt(char *buf)
static
int
atamouse_open
(
struct
input_dev
*
dev
)
{
if
(
atamouse_used
++
)
return
0
;
#ifdef FIXED_ATARI_JOYSTICK
atari_mouse_buttons
=
0
;
#endif
...
...
@@ -107,23 +101,24 @@ static int atamouse_open(struct input_dev *dev)
ikbd_mouse_thresh
(
mouse_threshold
[
0
],
mouse_threshold
[
1
]);
ikbd_mouse_rel_pos
();
atari_input_mouse_interrupt_hook
=
atamouse_interrupt
;
return
0
;
}
static
void
atamouse_close
(
struct
input_dev
*
dev
)
{
if
(
!--
atamouse_used
)
{
ikbd_mouse_disable
();
atari_mouse_interrupt_hook
=
NULL
;
}
ikbd_mouse_disable
();
atari_mouse_interrupt_hook
=
NULL
;
}
static
int
__init
atamouse_init
(
void
)
{
int
error
;
if
(
!
MACH_IS_ATARI
||
!
ATARIHW_PRESENT
(
ST_MFP
))
return
-
ENODEV
;
if
(
!
(
atari_keyb_init
()
))
if
(
!
atari_keyb_init
(
))
return
-
ENODEV
;
atamouse_dev
=
input_allocate_device
();
...
...
@@ -141,12 +136,14 @@ static int __init atamouse_init(void)
atamouse_dev
->
relbit
[
0
]
=
BIT_MASK
(
REL_X
)
|
BIT_MASK
(
REL_Y
);
atamouse_dev
->
keybit
[
BIT_WORD
(
BTN_LEFT
)]
=
BIT_MASK
(
BTN_LEFT
)
|
BIT_MASK
(
BTN_MIDDLE
)
|
BIT_MASK
(
BTN_RIGHT
);
atamouse_dev
->
open
=
atamouse_open
;
atamouse_dev
->
close
=
atamouse_close
;
if
(
input_register_device
(
atamouse_dev
))
{
error
=
input_register_device
(
atamouse_dev
);
if
(
error
)
{
input_free_device
(
atamouse_dev
);
return
-
ENOMEM
;
return
error
;
}
return
0
;
...
...
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