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
0c65a1c2
Commit
0c65a1c2
authored
Jan 23, 2004
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Plain Diff
Merge
bk://bk.arm.linux.org.uk/linux-2.6-serial
into home.osdl.org:/home/torvalds/v2.5/linux
parents
1974c841
33d176e7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
9 deletions
+18
-9
drivers/serial/serial_core.c
drivers/serial/serial_core.c
+18
-9
No files found.
drivers/serial/serial_core.c
View file @
0c65a1c2
...
...
@@ -529,8 +529,7 @@ static void uart_put_char(struct tty_struct *tty, unsigned char ch)
{
struct
uart_state
*
state
=
tty
->
driver_data
;
if
(
tty
)
__uart_put_char
(
state
->
port
,
&
state
->
info
->
xmit
,
ch
);
__uart_put_char
(
state
->
port
,
&
state
->
info
->
xmit
,
ch
);
}
static
void
uart_flush_chars
(
struct
tty_struct
*
tty
)
...
...
@@ -545,7 +544,7 @@ uart_write(struct tty_struct *tty, int from_user, const unsigned char * buf,
struct
uart_state
*
state
=
tty
->
driver_data
;
int
ret
;
if
(
!
tty
||
!
state
->
info
->
xmit
.
buf
)
if
(
!
state
->
info
->
xmit
.
buf
)
return
0
;
if
(
from_user
)
...
...
@@ -833,13 +832,17 @@ uart_set_info(struct uart_state *state, struct serial_struct *newinfo)
if
(
state
->
info
->
flags
&
UIF_INITIALIZED
)
{
if
(((
old_flags
^
port
->
flags
)
&
UPF_SPD_MASK
)
||
old_custom_divisor
!=
port
->
custom_divisor
)
{
/* If they're setting up a custom divisor or speed,
/*
* If they're setting up a custom divisor or speed,
* instead of clearing it, then bitch about it. No
* need to rate-limit; it's CAP_SYS_ADMIN only. */
* need to rate-limit; it's CAP_SYS_ADMIN only.
*/
if
(
port
->
flags
&
UPF_SPD_MASK
)
{
printk
(
KERN_NOTICE
"%s sets custom speed on %s%d. This is deprecated.
\n
"
,
current
->
comm
,
state
->
info
->
tty
->
driver
->
name
,
state
->
port
->
line
);
char
buf
[
64
];
printk
(
KERN_NOTICE
"%s sets custom speed on %s. This "
"is deprecated.
\n
"
,
current
->
comm
,
tty_name
(
state
->
info
->
tty
,
buf
));
}
uart_change_speed
(
state
,
NULL
);
}
...
...
@@ -1209,9 +1212,15 @@ static void uart_set_termios(struct tty_struct *tty, struct termios *old_termios
static
void
uart_close
(
struct
tty_struct
*
tty
,
struct
file
*
filp
)
{
struct
uart_state
*
state
=
tty
->
driver_data
;
struct
uart_port
*
port
=
state
->
port
;
struct
uart_port
*
port
;
BUG_ON
(
!
kernel_locked
());
if
(
!
state
||
!
state
->
port
)
return
;
port
=
state
->
port
;
DPRINTK
(
"uart_close(%d) called
\n
"
,
port
->
line
);
down
(
&
state
->
sem
);
...
...
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