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
7f56f3bc
Commit
7f56f3bc
authored
May 26, 2003
by
Alexander Viro
Committed by
Linus Torvalds
May 26, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] callout removal: a2232
callout removal: a2232
parent
55a38666
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
32 deletions
+6
-32
drivers/char/ser_a2232.c
drivers/char/ser_a2232.c
+6
-31
drivers/char/ser_a2232.h
drivers/char/ser_a2232.h
+0
-1
No files found.
drivers/char/ser_a2232.c
View file @
7f56f3bc
...
...
@@ -172,7 +172,6 @@ static struct a2232_port a2232_ports[MAX_A2232_BOARDS*NUMLINES];
/* TTY driver structs */
static
struct
tty_driver
a2232_driver
;
static
struct
tty_driver
a2232_callout_driver
;
/* Variables used by the TTY driver */
static
int
a2232_refcount
;
...
...
@@ -474,16 +473,10 @@ static int a2232_open(struct tty_struct * tty, struct file * filp)
}
if
((
port
->
gs
.
count
==
1
)
&&
(
port
->
gs
.
flags
&
ASYNC_SPLIT_TERMIOS
)){
if
(
tty
->
driver
->
subtype
==
A2232_TTY_SUBTYPE_NORMAL
)
*
tty
->
termios
=
port
->
gs
.
normal_termios
;
else
*
tty
->
termios
=
port
->
gs
.
callout_termios
;
*
tty
->
termios
=
port
->
gs
.
normal_termios
;
a2232_set_real_termios
(
port
);
}
port
->
gs
.
session
=
current
->
session
;
port
->
gs
.
pgrp
=
current
->
pgrp
;
a2232_enable_rx_interrupts
(
port
);
return
0
;
...
...
@@ -649,18 +642,13 @@ int ch, err, n, p;
if
(
!
(
port
->
gs
.
flags
&
ASYNC_CHECK_CD
))
;
/* Don't report DCD changes */
else
if
(
port
->
cd_status
)
{
// if DCD on: DCD went UP!
if
(
~
(
port
->
gs
.
flags
&
ASYNC_NORMAL_ACTIVE
)
||
~
(
port
->
gs
.
flags
&
ASYNC_CALLOUT_ACTIVE
))
{
/* Are we blocking in open?*/
wake_up_interruptible
(
&
port
->
gs
.
open_wait
);
}
/* Are we blocking in open?*/
wake_up_interruptible
(
&
port
->
gs
.
open_wait
);
}
else
{
// if DCD off: DCD went DOWN!
if
(
!
((
port
->
gs
.
flags
&
ASYNC_CALLOUT_ACTIVE
)
&&
(
port
->
gs
.
flags
&
ASYNC_CALLOUT_NOHUP
)))
{
if
(
port
->
gs
.
tty
)
tty_hangup
(
port
->
gs
.
tty
);
}
if
(
port
->
gs
.
tty
)
tty_hangup
(
port
->
gs
.
tty
);
}
}
// if CD changed for this port
...
...
@@ -686,7 +674,6 @@ static void a2232_init_portstructs(void)
port
->
which_a2232
=
i
/
NUMLINES
;
port
->
which_port_on_a2232
=
i
%
NUMLINES
;
port
->
disable_rx
=
port
->
throttle_input
=
port
->
cd_status
=
0
;
port
->
gs
.
callout_termios
=
tty_std_termios
;
port
->
gs
.
normal_termios
=
tty_std_termios
;
port
->
gs
.
magic
=
A2232_MAGIC
;
port
->
gs
.
close_delay
=
HZ
/
2
;
...
...
@@ -738,22 +725,11 @@ static int a2232_init_drivers(void)
a2232_driver
.
start
=
gs_start
;
a2232_driver
.
hangup
=
gs_hangup
;
a2232_callout_driver
=
a2232_driver
;
a2232_callout_driver
.
name
=
"cuy"
;
a2232_callout_driver
.
major
=
A2232_CALLOUT_MAJOR
;
a2232_callout_driver
.
subtype
=
A2232_TTY_SUBTYPE_CALLOUT
;
if
((
error
=
tty_register_driver
(
&
a2232_driver
)))
{
printk
(
KERN_ERR
"A2232: Couldn't register A2232 driver, error = %d
\n
"
,
error
);
return
1
;
}
if
((
error
=
tty_register_driver
(
&
a2232_callout_driver
)))
{
tty_unregister_driver
(
&
a2232_driver
);
printk
(
KERN_ERR
"A2232: Couldn't register A2232 callout driver, error = %d
\n
"
,
error
);
return
1
;
}
return
0
;
}
...
...
@@ -865,7 +841,6 @@ void cleanup_module(void)
}
tty_unregister_driver
(
&
a2232_driver
);
tty_unregister_driver
(
&
a2232_callout_driver
);
free_irq
(
IRQ_AMIGA_VERTB
,
a2232_driver_ID
);
}
#endif
...
...
drivers/char/ser_a2232.h
View file @
7f56f3bc
...
...
@@ -51,7 +51,6 @@
/* for the tty_struct subtype field */
#define A2232_TTY_SUBTYPE_NORMAL 1
#define A2232_TTY_SUBTYPE_CALLOUT 2
/* A2232 port structure to keep track of the
status of every single line used */
...
...
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