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
f09d418d
Commit
f09d418d
authored
May 03, 2003
by
Christoph Hellwig
Committed by
Linus Torvalds
May 03, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] switch drivers/input/serio/serport.c to new-style module handling
parent
ab2aaf93
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
9 deletions
+5
-9
drivers/input/serio/serport.c
drivers/input/serio/serport.c
+5
-9
No files found.
drivers/input/serio/serport.c
View file @
f09d418d
...
...
@@ -70,13 +70,9 @@ static int serport_ldisc_open(struct tty_struct *tty)
struct
serport
*
serport
;
char
name
[
64
];
MOD_INC_USE_COUNT
;
if
(
!
(
serport
=
kmalloc
(
sizeof
(
struct
serport
),
GFP_KERNEL
)))
{
MOD_DEC_USE_COUNT
;
serport
=
kmalloc
(
sizeof
(
struct
serport
),
GFP_KERNEL
);
if
(
unlikely
(
!
serport
))
return
-
ENOMEM
;
}
memset
(
serport
,
0
,
sizeof
(
struct
serport
));
set_bit
(
TTY_DO_WRITE_WAKEUP
,
&
tty
->
flags
);
...
...
@@ -107,7 +103,6 @@ static void serport_ldisc_close(struct tty_struct *tty)
{
struct
serport
*
serport
=
(
struct
serport
*
)
tty
->
disc_data
;
kfree
(
serport
);
MOD_DEC_USE_COUNT
;
}
/*
...
...
@@ -188,6 +183,7 @@ static void serport_ldisc_write_wakeup(struct tty_struct * tty)
*/
static
struct
tty_ldisc
serport_ldisc
=
{
.
owner
=
THIS_MODULE
,
.
name
=
"input"
,
.
open
=
serport_ldisc_open
,
.
close
=
serport_ldisc_close
,
...
...
@@ -202,7 +198,7 @@ static struct tty_ldisc serport_ldisc = {
* The functions for insering/removing us as a module.
*/
int
__init
serport_init
(
void
)
static
int
__init
serport_init
(
void
)
{
if
(
tty_register_ldisc
(
N_MOUSE
,
&
serport_ldisc
))
{
printk
(
KERN_ERR
"serport.c: Error registering line discipline.
\n
"
);
...
...
@@ -212,7 +208,7 @@ int __init serport_init(void)
return
0
;
}
void
__exit
serport_exit
(
void
)
static
void
__exit
serport_exit
(
void
)
{
tty_register_ldisc
(
N_MOUSE
,
NULL
);
}
...
...
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