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
8c6cc488
Commit
8c6cc488
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] stallion tty_driver add .owner field remove MOD_INC/DEC_USE_COUNT
parent
129738d3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
21 deletions
+7
-21
drivers/char/stallion.c
drivers/char/stallion.c
+7
-21
No files found.
drivers/char/stallion.c
View file @
8c6cc488
...
...
@@ -1044,8 +1044,6 @@ static int stl_open(struct tty_struct *tty, struct file *filp)
if
(
portp
==
(
stlport_t
*
)
NULL
)
return
(
-
ENODEV
);
MOD_INC_USE_COUNT
;
/*
* On the first open of the device setup the port hardware, and
* initialize the per port data structure.
...
...
@@ -1207,14 +1205,12 @@ static void stl_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
;
}
...
...
@@ -1267,7 +1263,6 @@ static void stl_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
);
}
...
...
@@ -2241,11 +2236,11 @@ static void stl_offintr(void *private)
#endif
if
(
portp
==
(
stlport_t
*
)
NULL
)
goto
out
;
return
;
tty
=
portp
->
tty
;
if
(
tty
==
(
struct
tty_struct
*
)
NULL
)
goto
out
;
return
;
lock_kernel
();
if
(
test_bit
(
ASYI_TXLOW
,
&
portp
->
istate
))
{
...
...
@@ -2270,8 +2265,6 @@ static void stl_offintr(void *private)
}
}
unlock_kernel
();
out:
MOD_DEC_USE_COUNT
;
}
/*****************************************************************************/
...
...
@@ -3231,6 +3224,7 @@ int __init stl_init(void)
*/
memset
(
&
stl_serial
,
0
,
sizeof
(
struct
tty_driver
));
stl_serial
.
magic
=
TTY_DRIVER_MAGIC
;
stl_serial
.
owner
=
THIS_MODULE
;
stl_serial
.
driver_name
=
stl_drvname
;
stl_serial
.
name
=
stl_serialname
;
stl_serial
.
major
=
STL_SERIALMAJOR
;
...
...
@@ -4136,9 +4130,7 @@ static void stl_cd1400txisr(stlpanel_t *panelp, int ioaddr)
if
((
len
==
0
)
||
((
len
<
STL_TXBUFLOW
)
&&
(
test_bit
(
ASYI_TXLOW
,
&
portp
->
istate
)
==
0
)))
{
set_bit
(
ASYI_TXLOW
,
&
portp
->
istate
);
MOD_INC_USE_COUNT
;
if
(
schedule_work
(
&
portp
->
tqueue
)
==
0
)
MOD_DEC_USE_COUNT
;
schedule_work
(
&
portp
->
tqueue
);
}
if
(
len
==
0
)
{
...
...
@@ -4318,9 +4310,7 @@ static void stl_cd1400mdmisr(stlpanel_t *panelp, int ioaddr)
misr
=
inb
(
ioaddr
+
EREG_DATA
);
if
(
misr
&
MISR_DCD
)
{
set_bit
(
ASYI_DCDCHANGE
,
&
portp
->
istate
);
MOD_INC_USE_COUNT
;
if
(
schedule_task
(
&
portp
->
tqueue
)
==
0
)
MOD_DEC_USE_COUNT
;
schedule_task
(
&
portp
->
tqueue
);
portp
->
stats
.
modem
++
;
}
...
...
@@ -5117,9 +5107,7 @@ static void stl_sc26198txisr(stlport_t *portp)
if
((
len
==
0
)
||
((
len
<
STL_TXBUFLOW
)
&&
(
test_bit
(
ASYI_TXLOW
,
&
portp
->
istate
)
==
0
)))
{
set_bit
(
ASYI_TXLOW
,
&
portp
->
istate
);
MOD_INC_USE_COUNT
;
if
(
schedule_task
(
&
portp
->
tqueue
)
==
0
)
MOD_DEC_USE_COUNT
;
schedule_task
(
&
portp
->
tqueue
);
}
if
(
len
==
0
)
{
...
...
@@ -5336,9 +5324,7 @@ static void stl_sc26198otherisr(stlport_t *portp, unsigned int iack)
ipr
=
stl_sc26198getreg
(
portp
,
IPR
);
if
(
ipr
&
IPR_DCDCHANGE
)
{
set_bit
(
ASYI_DCDCHANGE
,
&
portp
->
istate
);
MOD_INC_USE_COUNT
;
if
(
schedule_task
(
&
portp
->
tqueue
)
==
0
)
MOD_DEC_USE_COUNT
;
schedule_task
(
&
portp
->
tqueue
);
portp
->
stats
.
modem
++
;
}
break
;
...
...
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