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
d1a3b250
Commit
d1a3b250
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] amiserial tty_driver add .owner field remove MOD_INC/DEC_USE_COUNT
parent
9d76559d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
6 deletions
+1
-6
drivers/char/amiserial.c
drivers/char/amiserial.c
+1
-6
No files found.
drivers/char/amiserial.c
View file @
d1a3b250
...
@@ -1528,7 +1528,6 @@ static void rs_close(struct tty_struct *tty, struct file * filp)
...
@@ -1528,7 +1528,6 @@ static void rs_close(struct tty_struct *tty, struct file * filp)
if
(
tty_hung_up_p
(
filp
))
{
if
(
tty_hung_up_p
(
filp
))
{
DBG_CNT
(
"before DEC-hung"
);
DBG_CNT
(
"before DEC-hung"
);
MOD_DEC_USE_COUNT
;
local_irq_restore
(
flags
);
local_irq_restore
(
flags
);
return
;
return
;
}
}
...
@@ -1555,7 +1554,6 @@ static void rs_close(struct tty_struct *tty, struct file * filp)
...
@@ -1555,7 +1554,6 @@ static void rs_close(struct tty_struct *tty, struct file * filp)
}
}
if
(
state
->
count
)
{
if
(
state
->
count
)
{
DBG_CNT
(
"before DEC-2"
);
DBG_CNT
(
"before DEC-2"
);
MOD_DEC_USE_COUNT
;
local_irq_restore
(
flags
);
local_irq_restore
(
flags
);
return
;
return
;
}
}
...
@@ -1615,7 +1613,6 @@ static void rs_close(struct tty_struct *tty, struct file * filp)
...
@@ -1615,7 +1613,6 @@ static void rs_close(struct tty_struct *tty, struct file * filp)
info
->
flags
&=
~
(
ASYNC_NORMAL_ACTIVE
|
ASYNC_CALLOUT_ACTIVE
|
info
->
flags
&=
~
(
ASYNC_NORMAL_ACTIVE
|
ASYNC_CALLOUT_ACTIVE
|
ASYNC_CLOSING
);
ASYNC_CLOSING
);
wake_up_interruptible
(
&
info
->
close_wait
);
wake_up_interruptible
(
&
info
->
close_wait
);
MOD_DEC_USE_COUNT
;
local_irq_restore
(
flags
);
local_irq_restore
(
flags
);
}
}
...
@@ -1894,15 +1891,12 @@ static int rs_open(struct tty_struct *tty, struct file * filp)
...
@@ -1894,15 +1891,12 @@ static int rs_open(struct tty_struct *tty, struct file * filp)
int
retval
,
line
;
int
retval
,
line
;
unsigned
long
page
;
unsigned
long
page
;
MOD_INC_USE_COUNT
;
line
=
tty
->
index
;
line
=
tty
->
index
;
if
((
line
<
0
)
||
(
line
>=
NR_PORTS
))
{
if
((
line
<
0
)
||
(
line
>=
NR_PORTS
))
{
MOD_DEC_USE_COUNT
;
return
-
ENODEV
;
return
-
ENODEV
;
}
}
retval
=
get_async_struct
(
line
,
&
info
);
retval
=
get_async_struct
(
line
,
&
info
);
if
(
retval
)
{
if
(
retval
)
{
MOD_DEC_USE_COUNT
;
return
retval
;
return
retval
;
}
}
tty
->
driver_data
=
info
;
tty
->
driver_data
=
info
;
...
@@ -2116,6 +2110,7 @@ static int __init rs_init(void)
...
@@ -2116,6 +2110,7 @@ static int __init rs_init(void)
memset
(
&
serial_driver
,
0
,
sizeof
(
struct
tty_driver
));
memset
(
&
serial_driver
,
0
,
sizeof
(
struct
tty_driver
));
serial_driver
.
magic
=
TTY_DRIVER_MAGIC
;
serial_driver
.
magic
=
TTY_DRIVER_MAGIC
;
serial_driver
.
owner
=
THIS_MODULE
;
serial_driver
.
driver_name
=
"amiserial"
;
serial_driver
.
driver_name
=
"amiserial"
;
serial_driver
.
name
=
"ttyS"
;
serial_driver
.
name
=
"ttyS"
;
serial_driver
.
major
=
TTY_MAJOR
;
serial_driver
.
major
=
TTY_MAJOR
;
...
...
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