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
d8f193da
Commit
d8f193da
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] esp tty_driver add .owner field remove MOD_INC/DEC_USE_COUNT
parent
210a3426
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
6 deletions
+3
-6
drivers/char/esp.c
drivers/char/esp.c
+3
-6
No files found.
drivers/char/esp.c
View file @
d8f193da
...
@@ -643,9 +643,7 @@ static _INLINE_ void check_modem_status(struct esp_struct *info)
...
@@ -643,9 +643,7 @@ static _INLINE_ void check_modem_status(struct esp_struct *info)
#ifdef SERIAL_DEBUG_OPEN
#ifdef SERIAL_DEBUG_OPEN
printk
(
"scheduling hangup..."
);
printk
(
"scheduling hangup..."
);
#endif
#endif
MOD_INC_USE_COUNT
;
schedule_task
(
&
info
->
tqueue_hangup
);
if
(
schedule_task
(
&
info
->
tqueue_hangup
)
==
0
)
MOD_DEC_USE_COUNT
;
}
}
}
}
}
}
...
@@ -811,7 +809,6 @@ static void do_serial_hangup(void *private_)
...
@@ -811,7 +809,6 @@ static void do_serial_hangup(void *private_)
tty
=
info
->
tty
;
tty
=
info
->
tty
;
if
(
tty
)
if
(
tty
)
tty_hangup
(
tty
);
tty_hangup
(
tty
);
MOD_DEC_USE_COUNT
;
}
}
/*
/*
...
@@ -2132,7 +2129,7 @@ static void rs_close(struct tty_struct *tty, struct file * filp)
...
@@ -2132,7 +2129,7 @@ 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
);
out:
MOD_DEC_USE_COUNT
;
out:
restore_flags
(
flags
);
restore_flags
(
flags
);
}
}
...
@@ -2375,7 +2372,6 @@ static int esp_open(struct tty_struct *tty, struct file * filp)
...
@@ -2375,7 +2372,6 @@ static int esp_open(struct tty_struct *tty, struct file * filp)
#ifdef SERIAL_DEBUG_OPEN
#ifdef SERIAL_DEBUG_OPEN
printk
(
"esp_open %s, count = %d
\n
"
,
tty
->
name
,
info
->
count
);
printk
(
"esp_open %s, count = %d
\n
"
,
tty
->
name
,
info
->
count
);
#endif
#endif
MOD_INC_USE_COUNT
;
info
->
count
++
;
info
->
count
++
;
tty
->
driver_data
=
info
;
tty
->
driver_data
=
info
;
info
->
tty
=
tty
;
info
->
tty
=
tty
;
...
@@ -2551,6 +2547,7 @@ int __init espserial_init(void)
...
@@ -2551,6 +2547,7 @@ int __init espserial_init(void)
memset
(
&
esp_driver
,
0
,
sizeof
(
struct
tty_driver
));
memset
(
&
esp_driver
,
0
,
sizeof
(
struct
tty_driver
));
esp_driver
.
magic
=
TTY_DRIVER_MAGIC
;
esp_driver
.
magic
=
TTY_DRIVER_MAGIC
;
esp_driver
.
owner
=
THIS_MODULE
;
esp_driver
.
name
=
"ttyP"
;
esp_driver
.
name
=
"ttyP"
;
esp_driver
.
major
=
ESP_IN_MAJOR
;
esp_driver
.
major
=
ESP_IN_MAJOR
;
esp_driver
.
minor_start
=
0
;
esp_driver
.
minor_start
=
0
;
...
...
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