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
5d658059
Commit
5d658059
authored
Jan 04, 2004
by
David Dillow
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SUNZILOG]: Register the correct number of ports, ignore keyb/mouse lines.
parent
233c458e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
5 deletions
+16
-5
drivers/serial/sunzilog.c
drivers/serial/sunzilog.c
+16
-5
No files found.
drivers/serial/sunzilog.c
View file @
5d658059
...
@@ -1631,6 +1631,8 @@ static int __init sunzilog_ports_init(void)
...
@@ -1631,6 +1631,8 @@ static int __init sunzilog_ports_init(void)
{
{
struct
zs_probe_scan
scan
;
struct
zs_probe_scan
scan
;
int
ret
;
int
ret
;
int
uart_count
;
int
i
;
printk
(
KERN_DEBUG
"SunZilog: %d chips.
\n
"
,
NUM_SUNZILOG
);
printk
(
KERN_DEBUG
"SunZilog: %d chips.
\n
"
,
NUM_SUNZILOG
);
...
@@ -1650,18 +1652,27 @@ static int __init sunzilog_ports_init(void)
...
@@ -1650,18 +1652,27 @@ static int __init sunzilog_ports_init(void)
sunzilog_init_hw
();
sunzilog_init_hw
();
/* We can only init this once we have probed the Zilogs
/* We can only init this once we have probed the Zilogs
* in the system.
* in the system. Do not count channels assigned to keyboards
* or mice when we are deciding how many ports to register.
*/
*/
sunzilog_reg
.
nr
=
NUM_CHANNELS
;
uart_count
=
0
;
for
(
i
=
0
;
i
<
NUM_CHANNELS
;
i
++
)
{
struct
uart_sunzilog_port
*
up
=
&
sunzilog_port_table
[
i
];
if
(
ZS_IS_KEYB
(
up
)
||
ZS_IS_MOUSE
(
up
))
continue
;
uart_count
++
;
}
sunzilog_reg
.
nr
=
uart_count
;
sunzilog_reg
.
cons
=
SUNZILOG_CONSOLE
;
sunzilog_reg
.
cons
=
SUNZILOG_CONSOLE
;
sunzilog_reg
.
minor
=
sunserial_current_minor
;
sunzilog_reg
.
minor
=
sunserial_current_minor
;
sunserial_current_minor
+=
NUM_CHANNELS
;
sunserial_current_minor
+=
uart_count
;
ret
=
uart_register_driver
(
&
sunzilog_reg
);
ret
=
uart_register_driver
(
&
sunzilog_reg
);
if
(
ret
==
0
)
{
if
(
ret
==
0
)
{
int
i
;
for
(
i
=
0
;
i
<
NUM_CHANNELS
;
i
++
)
{
for
(
i
=
0
;
i
<
NUM_CHANNELS
;
i
++
)
{
struct
uart_sunzilog_port
*
up
=
&
sunzilog_port_table
[
i
];
struct
uart_sunzilog_port
*
up
=
&
sunzilog_port_table
[
i
];
...
...
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