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
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];
...
@@ -172,7 +172,6 @@ static struct a2232_port a2232_ports[MAX_A2232_BOARDS*NUMLINES];
/* TTY driver structs */
/* TTY driver structs */
static
struct
tty_driver
a2232_driver
;
static
struct
tty_driver
a2232_driver
;
static
struct
tty_driver
a2232_callout_driver
;
/* Variables used by the TTY driver */
/* Variables used by the TTY driver */
static
int
a2232_refcount
;
static
int
a2232_refcount
;
...
@@ -474,16 +473,10 @@ static int a2232_open(struct tty_struct * tty, struct file * filp)
...
@@ -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
((
port
->
gs
.
count
==
1
)
&&
(
port
->
gs
.
flags
&
ASYNC_SPLIT_TERMIOS
)){
if
(
tty
->
driver
->
subtype
==
A2232_TTY_SUBTYPE_NORMAL
)
*
tty
->
termios
=
port
->
gs
.
normal_termios
;
*
tty
->
termios
=
port
->
gs
.
normal_termios
;
else
*
tty
->
termios
=
port
->
gs
.
callout_termios
;
a2232_set_real_termios
(
port
);
a2232_set_real_termios
(
port
);
}
}
port
->
gs
.
session
=
current
->
session
;
port
->
gs
.
pgrp
=
current
->
pgrp
;
a2232_enable_rx_interrupts
(
port
);
a2232_enable_rx_interrupts
(
port
);
return
0
;
return
0
;
...
@@ -649,18 +642,13 @@ int ch, err, n, p;
...
@@ -649,18 +642,13 @@ int ch, err, n, p;
if
(
!
(
port
->
gs
.
flags
&
ASYNC_CHECK_CD
))
if
(
!
(
port
->
gs
.
flags
&
ASYNC_CHECK_CD
))
;
/* Don't report DCD changes */
;
/* Don't report DCD changes */
else
if
(
port
->
cd_status
)
{
// if DCD on: DCD went UP!
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?*/
/* Are we blocking in open?*/
wake_up_interruptible
(
&
port
->
gs
.
open_wait
);
wake_up_interruptible
(
&
port
->
gs
.
open_wait
);
}
}
}
else
{
// if DCD off: DCD went DOWN!
else
{
// if DCD off: DCD went DOWN!
if
(
!
((
port
->
gs
.
flags
&
ASYNC_CALLOUT_ACTIVE
)
&&
if
(
port
->
gs
.
tty
)
(
port
->
gs
.
flags
&
ASYNC_CALLOUT_NOHUP
)))
{
tty_hangup
(
port
->
gs
.
tty
);
if
(
port
->
gs
.
tty
)
tty_hangup
(
port
->
gs
.
tty
);
}
}
}
}
// if CD changed for this port
}
// if CD changed for this port
...
@@ -686,7 +674,6 @@ static void a2232_init_portstructs(void)
...
@@ -686,7 +674,6 @@ static void a2232_init_portstructs(void)
port
->
which_a2232
=
i
/
NUMLINES
;
port
->
which_a2232
=
i
/
NUMLINES
;
port
->
which_port_on_a2232
=
i
%
NUMLINES
;
port
->
which_port_on_a2232
=
i
%
NUMLINES
;
port
->
disable_rx
=
port
->
throttle_input
=
port
->
cd_status
=
0
;
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
.
normal_termios
=
tty_std_termios
;
port
->
gs
.
magic
=
A2232_MAGIC
;
port
->
gs
.
magic
=
A2232_MAGIC
;
port
->
gs
.
close_delay
=
HZ
/
2
;
port
->
gs
.
close_delay
=
HZ
/
2
;
...
@@ -738,22 +725,11 @@ static int a2232_init_drivers(void)
...
@@ -738,22 +725,11 @@ static int a2232_init_drivers(void)
a2232_driver
.
start
=
gs_start
;
a2232_driver
.
start
=
gs_start
;
a2232_driver
.
hangup
=
gs_hangup
;
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
)))
{
if
((
error
=
tty_register_driver
(
&
a2232_driver
)))
{
printk
(
KERN_ERR
"A2232: Couldn't register A2232 driver, error = %d
\n
"
,
printk
(
KERN_ERR
"A2232: Couldn't register A2232 driver, error = %d
\n
"
,
error
);
error
);
return
1
;
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
;
return
0
;
}
}
...
@@ -865,7 +841,6 @@ void cleanup_module(void)
...
@@ -865,7 +841,6 @@ void cleanup_module(void)
}
}
tty_unregister_driver
(
&
a2232_driver
);
tty_unregister_driver
(
&
a2232_driver
);
tty_unregister_driver
(
&
a2232_callout_driver
);
free_irq
(
IRQ_AMIGA_VERTB
,
a2232_driver_ID
);
free_irq
(
IRQ_AMIGA_VERTB
,
a2232_driver_ID
);
}
}
#endif
#endif
...
...
drivers/char/ser_a2232.h
View file @
7f56f3bc
...
@@ -51,7 +51,6 @@
...
@@ -51,7 +51,6 @@
/* for the tty_struct subtype field */
/* for the tty_struct subtype field */
#define A2232_TTY_SUBTYPE_NORMAL 1
#define A2232_TTY_SUBTYPE_NORMAL 1
#define A2232_TTY_SUBTYPE_CALLOUT 2
/* A2232 port structure to keep track of the
/* A2232 port structure to keep track of the
status of every single line used */
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