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
448d7b67
Commit
448d7b67
authored
Oct 31, 2004
by
Russell King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SERIAL] 8250_pnp: Convert to use serial8250_{un,}register_port.
parent
e895faed
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
16 deletions
+15
-16
drivers/serial/8250_pnp.c
drivers/serial/8250_pnp.c
+15
-16
No files found.
drivers/serial/8250_pnp.c
View file @
448d7b67
...
...
@@ -21,14 +21,10 @@
#include <linux/pnp.h>
#include <linux/string.h>
#include <linux/kernel.h>
#include <linux/tty.h>
#include <linux/serial.h>
#include <linux/serialP.h>
#include <linux/serial_core.h>
#include <linux/bitops.h>
#include <asm/byteorder.h>
#include <asm/serial.h>
#include "8250.h"
...
...
@@ -49,7 +45,7 @@ static const struct pnp_device_id pnp_dev_table[] = {
/* Actiontec ISA PNP 56K X2 Fax Modem */
{
"AEI1240"
,
0
},
/* Rockwell 56K ACF II Fax+Data+Voice Modem */
{
"AKY1021"
,
SPCI_FL_NO_SHIRQ
},
{
"AKY1021"
,
0
/*SPCI_FL_NO_SHIRQ*/
},
/* AZT3005 PnP SOUND DEVICE */
{
"AZT4001"
,
0
},
/* Best Data Products Inc. Smart One 336F PnP Modem */
...
...
@@ -398,26 +394,29 @@ static int __devinit serial_pnp_guess_board(struct pnp_dev *dev, int *flags)
static
int
__devinit
serial_pnp_probe
(
struct
pnp_dev
*
dev
,
const
struct
pnp_device_id
*
dev_id
)
{
struct
serial_struct
serial_req
;
struct
uart_port
port
;
int
ret
,
line
,
flags
=
dev_id
->
driver_data
;
if
(
flags
&
UNKNOWN_DEV
)
{
ret
=
serial_pnp_guess_board
(
dev
,
&
flags
);
if
(
ret
<
0
)
return
ret
;
}
memset
(
&
serial_req
,
0
,
sizeof
(
serial_req
));
serial_req
.
irq
=
pnp_irq
(
dev
,
0
);
serial_req
.
port
=
pnp_port_start
(
dev
,
0
);
if
(
HIGH_BITS_OFFSET
)
serial_req
.
port
=
pnp_port_start
(
dev
,
0
)
>>
HIGH_BITS_OFFSET
;
memset
(
&
port
,
0
,
sizeof
(
struct
uart_port
)
);
port
.
irq
=
pnp_irq
(
dev
,
0
);
port
.
iobase
=
pnp_port_start
(
dev
,
0
);
#ifdef SERIAL_DEBUG_PNP
printk
(
"Setup PNP port: port %x, irq %d, type %d
\n
"
,
serial_req
.
port
,
serial_req
.
irq
,
serial_req
.
io_
type
);
port
.
iobase
,
port
.
irq
,
port
.
io
type
);
#endif
serial_req
.
flags
=
UPF_SKIP_TEST
|
UPF_AUTOPROBE
;
serial_req
.
baud_base
=
115200
;
line
=
register_serial
(
&
serial_req
);
port
.
flags
=
UPF_SKIP_TEST
|
UPF_BOOT_AUTOCONF
;
port
.
uartclk
=
1843200
;
port
.
dev
=
&
dev
->
dev
;
line
=
serial8250_register_port
(
&
port
);
if
(
line
>=
0
)
pnp_set_drvdata
(
dev
,
(
void
*
)(
line
+
1
));
...
...
@@ -429,7 +428,7 @@ static void __devexit serial_pnp_remove(struct pnp_dev * dev)
{
int
line
=
(
int
)
pnp_get_drvdata
(
dev
);
if
(
line
)
unregister_serial
(
line
-
1
);
serial8250_unregister_port
(
line
-
1
);
}
static
struct
pnp_driver
serial_pnp_driver
=
{
...
...
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