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
fb762119
Commit
fb762119
authored
May 07, 2003
by
Hanna V. Linder
Committed by
Greg Kroah-Hartman
May 07, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] istallion tty_driver add .owner field remove MOD_INC/DEC_USE_COUNT
parent
da9e62db
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
8 deletions
+2
-8
drivers/char/istallion.c
drivers/char/istallion.c
+2
-8
No files found.
drivers/char/istallion.c
View file @
fb762119
...
...
@@ -1054,7 +1054,6 @@ static int stli_open(struct tty_struct *tty, struct file *filp)
if
(
portp
->
devnr
<
1
)
return
(
-
ENODEV
);
MOD_INC_USE_COUNT
;
/*
* Check if this port is in the middle of closing. If so then wait
...
...
@@ -1170,14 +1169,12 @@ static void stli_close(struct tty_struct *tty, struct file *filp)
save_flags
(
flags
);
cli
();
if
(
tty_hung_up_p
(
filp
))
{
MOD_DEC_USE_COUNT
;
restore_flags
(
flags
);
return
;
}
if
((
tty
->
count
==
1
)
&&
(
portp
->
refcount
!=
1
))
portp
->
refcount
=
1
;
if
(
portp
->
refcount
--
>
1
)
{
MOD_DEC_USE_COUNT
;
restore_flags
(
flags
);
return
;
}
...
...
@@ -1232,7 +1229,6 @@ static void stli_close(struct tty_struct *tty, struct file *filp)
portp
->
flags
&=
~
(
ASYNC_CALLOUT_ACTIVE
|
ASYNC_NORMAL_ACTIVE
|
ASYNC_CLOSING
);
wake_up_interruptible
(
&
portp
->
close_wait
);
MOD_DEC_USE_COUNT
;
restore_flags
(
flags
);
}
...
...
@@ -2369,7 +2365,6 @@ static void stli_dohangup(void *arg)
tty_hangup
(
portp
->
tty
);
}
}
MOD_DEC_USE_COUNT
;
}
/*****************************************************************************/
...
...
@@ -3004,9 +2999,7 @@ static inline int stli_hostcmd(stlibrd_t *brdp, stliport_t *portp)
if
(
!
((
portp
->
flags
&
ASYNC_CALLOUT_ACTIVE
)
&&
(
portp
->
flags
&
ASYNC_CALLOUT_NOHUP
)))
{
if
(
tty
!=
(
struct
tty_struct
*
)
NULL
)
{
MOD_INC_USE_COUNT
;
if
(
schedule_task
(
&
portp
->
tqhangup
)
==
0
)
MOD_DEC_USE_COUNT
;
schedule_task
(
&
portp
->
tqhangup
);
}
}
}
...
...
@@ -5350,6 +5343,7 @@ int __init stli_init(void)
*/
memset
(
&
stli_serial
,
0
,
sizeof
(
struct
tty_driver
));
stli_serial
.
magic
=
TTY_DRIVER_MAGIC
;
stli_serial
.
owner
=
THIS_MODULE
;
stli_serial
.
driver_name
=
stli_drvname
;
stli_serial
.
name
=
stli_serialname
;
stli_serial
.
major
=
STL_SERIALMAJOR
;
...
...
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