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
0971d142
Commit
0971d142
authored
Nov 09, 2002
by
Michael Still
Committed by
Vojtech Pavlik
Nov 09, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Handle return values from interface_register() and misc_register()
in the input drivers.
parent
18b8c734
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
31 additions
and
8 deletions
+31
-8
drivers/input/evbug.c
drivers/input/evbug.c
+7
-2
drivers/input/evdev.c
drivers/input/evdev.c
+7
-2
drivers/input/joydev.c
drivers/input/joydev.c
+6
-1
drivers/input/mousedev.c
drivers/input/mousedev.c
+11
-3
No files found.
drivers/input/evbug.c
View file @
0971d142
...
...
@@ -95,7 +95,12 @@ static struct device_interface evbug_intf = {
int
__init
evbug_init
(
void
)
{
interface_register
(
&
evbug_intf
);
int
retval
;
retval
=
interface_register
(
&
evbug_intf
);
if
(
retval
<
0
)
return
retval
;
input_register_handler
(
&
evbug_handler
);
return
0
;
}
...
...
@@ -103,7 +108,7 @@ int __init evbug_init(void)
void
__exit
evbug_exit
(
void
)
{
input_unregister_handler
(
&
evbug_handler
);
interface_register
(
&
evbug_intf
);
interface_
un
register
(
&
evbug_intf
);
}
module_init
(
evbug_init
);
...
...
drivers/input/evdev.c
View file @
0971d142
...
...
@@ -442,7 +442,12 @@ static struct device_interface evdev_intf = {
static
int
__init
evdev_init
(
void
)
{
interface_register
(
&
evdev_intf
);
int
retval
;
retval
=
interface_register
(
&
evdev_intf
);
if
(
retval
<
0
)
return
retval
;
input_register_handler
(
&
evdev_handler
);
return
0
;
}
...
...
@@ -450,7 +455,7 @@ static int __init evdev_init(void)
static
void
__exit
evdev_exit
(
void
)
{
input_unregister_handler
(
&
evdev_handler
);
interface_register
(
&
evdev_intf
);
interface_
un
register
(
&
evdev_intf
);
}
module_init
(
evdev_init
);
...
...
drivers/input/joydev.c
View file @
0971d142
...
...
@@ -499,7 +499,12 @@ static struct device_interface joydev_intf = {
static
int
__init
joydev_init
(
void
)
{
interface_register
(
&
joydev_intf
);
int
retval
;
retval
=
interface_register
(
&
joydev_intf
);
if
(
retval
<
0
)
return
retval
;
input_register_handler
(
&
joydev_handler
);
return
0
;
}
...
...
drivers/input/mousedev.c
View file @
0971d142
...
...
@@ -41,6 +41,7 @@ struct mousedev {
int
exist
;
int
open
;
int
minor
;
int
misc
;
char
name
[
16
];
wait_queue_head_t
wait
;
struct
list_head
list
;
...
...
@@ -489,7 +490,11 @@ static struct device_interface mousedev_intf = {
static
int
__init
mousedev_init
(
void
)
{
interface_register
(
&
mousedev_intf
);
int
retval
;
if
((
retval
=
interface_register
(
&
mousedev_intf
))
<
0
)
return
retval
;
input_register_handler
(
&
mousedev_handler
);
memset
(
&
mousedev_mix
,
0
,
sizeof
(
struct
mousedev
));
...
...
@@ -499,8 +504,10 @@ static int __init mousedev_init(void)
mousedev_mix
.
exist
=
1
;
mousedev_mix
.
minor
=
MOUSEDEV_MIX
;
mousedev_mix
.
devfs
=
input_register_minor
(
"mice"
,
MOUSEDEV_MIX
,
MOUSEDEV_MINOR_BASE
);
#ifdef CONFIG_INPUT_MOUSEDEV_PSAUX
misc_register
(
&
psaux_mouse
);
if
(
!
(
mousedev_mix
.
misc
=
!
misc_register
(
&
psaux_mouse
)))
printk
(
KERN_WARNING
"mice: could not misc_register the device
\n
"
);
#endif
printk
(
KERN_INFO
"mice: PS/2 mouse device common for all mice
\n
"
);
...
...
@@ -511,7 +518,8 @@ static int __init mousedev_init(void)
static
void
__exit
mousedev_exit
(
void
)
{
#ifdef CONFIG_INPUT_MOUSEDEV_PSAUX
misc_deregister
(
&
psaux_mouse
);
if
(
mousedev_mix
.
misc
)
misc_deregister
(
&
psaux_mouse
);
#endif
input_unregister_minor
(
mousedev_mix
.
devfs
);
input_unregister_handler
(
&
mousedev_handler
);
...
...
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