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
259bf51c
Commit
259bf51c
authored
Aug 14, 2003
by
Randy Dunlap
Committed by
Linus Torvalds
Aug 14, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] janitor: input cleanups
From: Daniele Bellucci <bellucda@tiscali.it>
parent
c4fc7293
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
6 deletions
+27
-6
drivers/input/input.c
drivers/input/input.c
+27
-6
No files found.
drivers/input/input.c
View file @
259bf51c
...
@@ -685,25 +685,47 @@ struct class input_class = {
...
@@ -685,25 +685,47 @@ struct class input_class = {
static
int
__init
input_init
(
void
)
static
int
__init
input_init
(
void
)
{
{
struct
proc_dir_entry
*
entry
;
struct
proc_dir_entry
*
entry
;
int
retval
=
-
ENOMEM
;
class_register
(
&
input_class
);
class_register
(
&
input_class
);
#ifdef CONFIG_PROC_FS
#ifdef CONFIG_PROC_FS
proc_bus_input_dir
=
proc_mkdir
(
"input"
,
proc_bus
);
proc_bus_input_dir
=
proc_mkdir
(
"input"
,
proc_bus
);
if
(
proc_bus_input_dir
==
NULL
)
return
-
ENOMEM
;
proc_bus_input_dir
->
owner
=
THIS_MODULE
;
proc_bus_input_dir
->
owner
=
THIS_MODULE
;
entry
=
create_proc_read_entry
(
"devices"
,
0
,
proc_bus_input_dir
,
input_devices_read
,
NULL
);
entry
=
create_proc_read_entry
(
"devices"
,
0
,
proc_bus_input_dir
,
input_devices_read
,
NULL
);
if
(
entry
==
NULL
)
{
remove_proc_entry
(
"input"
,
proc_bus
);
return
-
ENOMEM
;
}
entry
->
owner
=
THIS_MODULE
;
entry
->
owner
=
THIS_MODULE
;
entry
->
proc_fops
->
poll
=
input_devices_poll
;
entry
->
proc_fops
->
poll
=
input_devices_poll
;
entry
=
create_proc_read_entry
(
"handlers"
,
0
,
proc_bus_input_dir
,
input_handlers_read
,
NULL
);
entry
=
create_proc_read_entry
(
"handlers"
,
0
,
proc_bus_input_dir
,
input_handlers_read
,
NULL
);
if
(
entry
==
NULL
)
{
remove_proc_entry
(
"devices"
,
proc_bus_input_dir
);
remove_proc_entry
(
"input"
,
proc_bus
);
return
-
ENOMEM
;
}
entry
->
owner
=
THIS_MODULE
;
entry
->
owner
=
THIS_MODULE
;
#endif
#endif
if
(
register_chrdev
(
INPUT_MAJOR
,
"input"
,
&
input_fops
))
{
retval
=
register_chrdev
(
INPUT_MAJOR
,
"input"
,
&
input_fops
);
if
(
retval
)
{
printk
(
KERN_ERR
"input: unable to register char major %d"
,
INPUT_MAJOR
);
printk
(
KERN_ERR
"input: unable to register char major %d"
,
INPUT_MAJOR
);
return
-
EBUSY
;
remove_proc_entry
(
"devices"
,
proc_bus_input_dir
);
remove_proc_entry
(
"handlers"
,
proc_bus_input_dir
);
remove_proc_entry
(
"input"
,
proc_bus
);
return
retval
;
}
}
devfs_mk_dir
(
"input"
);
retval
=
devfs_mk_dir
(
"input"
);
return
0
;
if
(
retval
)
{
remove_proc_entry
(
"devices"
,
proc_bus_input_dir
);
remove_proc_entry
(
"handlers"
,
proc_bus_input_dir
);
remove_proc_entry
(
"input"
,
proc_bus
);
unregister_chrdev
(
INPUT_MAJOR
,
"input"
);
}
return
retval
;
}
}
static
void
__exit
input_exit
(
void
)
static
void
__exit
input_exit
(
void
)
...
@@ -714,8 +736,7 @@ static void __exit input_exit(void)
...
@@ -714,8 +736,7 @@ static void __exit input_exit(void)
remove_proc_entry
(
"input"
,
proc_bus
);
remove_proc_entry
(
"input"
,
proc_bus
);
#endif
#endif
devfs_remove
(
"input"
);
devfs_remove
(
"input"
);
if
(
unregister_chrdev
(
INPUT_MAJOR
,
"input"
))
unregister_chrdev
(
INPUT_MAJOR
,
"input"
);
printk
(
KERN_ERR
"input: can't unregister char major %d"
,
INPUT_MAJOR
);
class_unregister
(
&
input_class
);
class_unregister
(
&
input_class
);
}
}
...
...
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