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
7a362921
Commit
7a362921
authored
Jan 12, 2003
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Plain Diff
Merge
parents
29b49883
dd62ebc4
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
45 additions
and
54 deletions
+45
-54
drivers/isdn/hisax/hisax_fcpcipnp.c
drivers/isdn/hisax/hisax_fcpcipnp.c
+2
-2
drivers/net/aironet4500_card.c
drivers/net/aironet4500_card.c
+1
-4
drivers/net/ne.c
drivers/net/ne.c
+6
-5
drivers/net/smc-ultra.c
drivers/net/smc-ultra.c
+2
-2
drivers/pnp/card.c
drivers/pnp/card.c
+8
-13
drivers/pnp/isapnp/core.c
drivers/pnp/isapnp/core.c
+1
-2
include/linux/pnp.h
include/linux/pnp.h
+3
-3
sound/oss/ad1848.c
sound/oss/ad1848.c
+10
-12
sound/oss/cs4232.c
sound/oss/cs4232.c
+12
-11
No files found.
drivers/isdn/hisax/hisax_fcpcipnp.c
View file @
7a362921
...
...
@@ -63,7 +63,7 @@ static struct pnp_card_id fcpnp_ids[] __devinitdata = {
.
driver_data
=
(
unsigned
long
)
"Fritz!Card PnP"
,
.
devs
=
{
{
"AVM0900"
}
}
}
};
//MODULE_DEVICE_TABLE(pnpc, fcpnp_ids); FIXME
MODULE_DEVICE_TABLE
(
pnp_card
,
fcpnp_ids
);
static
int
protocol
=
2
;
/* EURO-ISDN Default */
MODULE_PARM
(
protocol
,
"i"
);
...
...
@@ -911,7 +911,7 @@ static struct pci_driver fcpci_driver = {
#ifdef __ISAPNP__
static
int
__devinit
fcpnp_probe
(
struct
pnp_card
*
card
,
const
struct
pnp_card_id
*
card_id
)
const
struct
pnp_card_
device_
id
*
card_id
)
{
struct
fritz_adapter
*
adapter
;
struct
pnp_dev
*
pnp_dev
;
...
...
drivers/net/aironet4500_card.c
View file @
7a362921
...
...
@@ -455,10 +455,7 @@ static void awc_pnp_release(void) {
if
(
awc_proc_unset_fun
)
awc_proc_unset_fun
(
i
);
if
(
isapnp_cfg_begin
(
logdev
->
PNP_BUS
->
PNP_BUS_NUMBER
,
logdev
->
PNP_DEV_NUMBER
)
<
0
)
printk
(
"isapnp cfg failed at release
\n
"
);
isapnp_deactivate
(
logdev
->
PNP_DEV_NUMBER
);
isapnp_cfg_end
();
pnp_device_detach
(
logdev
);
release_region
(
aironet4500_devices
[
i
]
->
base_addr
,
AIRONET4X00_IO_SIZE
);
// release_region(isa_cisaddr, AIRONET4X00_CIS_SIZE, "aironet4x00 cis");
...
...
drivers/net/ne.c
View file @
7a362921
...
...
@@ -206,13 +206,14 @@ static int __init ne_probe_isapnp(struct net_device *dev)
if
(
pnp_device_attach
(
idev
)
<
0
)
continue
;
if
(
pnp_activate_dev
(
idev
,
NULL
)
<
0
)
{
__again:
pnp_device_detach
(
idev
);
continue
;
}
/* if no io and irq, search for next */
if
(
!
pnp_port_valid
(
idev
,
0
)
||
!
pnp_irq_valid
(
idev
,
0
))
goto
__again
;
if
(
!
pnp_port_valid
(
idev
,
0
)
||
!
pnp_irq_valid
(
idev
,
0
))
{
pnp_device_detach
(
idev
);
continue
;
}
/* found it */
dev
->
base_addr
=
pnp_port_start
(
idev
,
0
);
dev
->
irq
=
pnp_irq
(
idev
,
0
);
...
...
@@ -786,9 +787,9 @@ void cleanup_module(void)
struct
net_device
*
dev
=
&
dev_ne
[
this_dev
];
if
(
dev
->
priv
!=
NULL
)
{
void
*
priv
=
dev
->
priv
;
struct
p
ci_dev
*
idev
=
(
struct
pci
_dev
*
)
ei_status
.
priv
;
struct
p
np_dev
*
idev
=
(
struct
pnp
_dev
*
)
ei_status
.
priv
;
if
(
idev
)
idev
->
deactivate
(
idev
);
pnp_device_detach
(
idev
);
free_irq
(
dev
->
irq
,
dev
);
release_region
(
dev
->
base_addr
,
NE_IO_EXTENT
);
unregister_netdev
(
dev
);
...
...
drivers/net/smc-ultra.c
View file @
7a362921
...
...
@@ -550,9 +550,9 @@ cleanup_module(void)
int
ioaddr
=
dev
->
base_addr
-
ULTRA_NIC_OFFSET
;
#ifdef __ISAPNP__
struct
p
ci_dev
*
idev
=
(
struct
pci
_dev
*
)
ei_status
.
priv
;
struct
p
np_dev
*
idev
=
(
struct
pnp
_dev
*
)
ei_status
.
priv
;
if
(
idev
)
idev
->
deactivate
(
idev
);
pnp_device_detach
(
idev
);
#endif
unregister_netdev
(
dev
);
...
...
drivers/pnp/card.c
View file @
7a362921
...
...
@@ -22,9 +22,9 @@
LIST_HEAD
(
pnp_cards
);
static
const
struct
pnp_card_id
*
match_card
(
struct
pnpc_driver
*
drv
,
struct
pnp_card
*
card
)
static
const
struct
pnp_card_
device_
id
*
match_card
(
struct
pnpc_driver
*
drv
,
struct
pnp_card
*
card
)
{
const
struct
pnp_card_id
*
drv_id
=
drv
->
id_table
;
const
struct
pnp_card_
device_
id
*
drv_id
=
drv
->
id_table
;
while
(
*
drv_id
->
id
){
if
(
compare_pnp_id
(
card
->
id
,
drv_id
->
id
))
return
drv_id
;
...
...
@@ -216,18 +216,15 @@ struct pnp_dev * pnp_request_card_device(struct pnp_card *card, const char *id,
return
NULL
;
found:
spin_lock
(
&
pnp_lock
);
if
(
dev
->
status
!=
PNP_READY
){
spin_unlock
(
&
pnp_lock
);
if
(
pnp_device_attach
(
dev
)
<
0
)
return
NULL
;
}
dev
->
status
=
PNP_ATTACHED
;
spin_unlock
(
&
pnp_lock
);
cdrv
=
to_pnpc_driver
(
card
->
dev
.
driver
);
if
(
dev
->
active
==
0
)
{
if
(
!
(
cdrv
->
flags
&
PNPC_DRIVER_DO_NOT_ACTIVATE
))
{
if
(
pnp_activate_dev
(
dev
,
NULL
)
<
0
)
if
(
pnp_activate_dev
(
dev
,
NULL
)
<
0
)
{
pnp_device_detach
(
dev
);
return
NULL
;
}
}
}
else
{
if
((
cdrv
->
flags
&
PNPC_DRIVER_DO_NOT_ACTIVATE
))
...
...
@@ -250,10 +247,8 @@ void pnp_release_card_device(struct pnp_dev *dev)
{
spin_lock
(
&
pnp_lock
);
list_del
(
&
dev
->
rdev_list
);
if
(
dev
->
status
==
PNP_ATTACHED
)
dev
->
status
=
PNP_READY
;
spin_unlock
(
&
pnp_lock
);
pnp_d
isable_dev
(
dev
);
pnp_d
evice_detach
(
dev
);
}
static
void
pnpc_recover_devices
(
struct
pnp_card
*
card
)
...
...
@@ -291,7 +286,7 @@ static int pnpc_card_probe(struct device *dev)
int
error
=
0
;
struct
pnpc_driver
*
drv
=
to_pnpc_driver
(
dev
->
driver
);
struct
pnp_card
*
card
=
to_pnp_card
(
dev
);
const
struct
pnp_card_id
*
card_id
=
NULL
;
const
struct
pnp_card_
device_
id
*
card_id
=
NULL
;
pnp_dbg
(
"pnp: match found with the PnP card '%s' and the driver '%s'"
,
dev
->
bus_id
,
drv
->
name
);
...
...
drivers/pnp/isapnp/core.c
View file @
7a362921
...
...
@@ -102,7 +102,6 @@ static int isapnp_detected;
/* some prototypes */
static
int
isapnp_config_prepare
(
struct
pnp_dev
*
dev
);
extern
struct
pnp_protocol
isapnp_card_protocol
;
extern
struct
pnp_protocol
isapnp_protocol
;
static
inline
void
write_data
(
unsigned
char
x
)
...
...
@@ -1125,7 +1124,7 @@ int __init isapnp_init(void)
isapnp_build_device_list
();
cards
=
0
;
protocol_for_each_card
(
&
isapnp_
card_
protocol
,
card
)
{
protocol_for_each_card
(
&
isapnp_protocol
,
card
)
{
cards
++
;
if
(
isapnp_verbose
)
{
printk
(
KERN_INFO
"isapnp: Card '%s'
\n
"
,
card
->
name
[
0
]
?
card
->
name
:
"Unknown"
);
...
...
include/linux/pnp.h
View file @
7a362921
...
...
@@ -189,7 +189,7 @@ struct pnp_device_id {
unsigned
long
driver_data
;
/* data private to the driver */
};
struct
pnp_card_id
{
struct
pnp_card_
device_
id
{
char
id
[
7
];
unsigned
long
driver_data
;
/* data private to the driver */
struct
{
...
...
@@ -216,9 +216,9 @@ struct pnp_driver {
struct
pnpc_driver
{
struct
list_head
node
;
char
*
name
;
const
struct
pnp_card_id
*
id_table
;
const
struct
pnp_card_
device_
id
*
id_table
;
unsigned
int
flags
;
int
(
*
probe
)
(
struct
pnp_card
*
card
,
const
struct
pnp_card_id
*
card_id
);
int
(
*
probe
)
(
struct
pnp_card
*
card
,
const
struct
pnp_card_
device_
id
*
card_id
);
void
(
*
remove
)
(
struct
pnp_card
*
card
);
struct
device_driver
driver
;
};
...
...
sound/oss/ad1848.c
View file @
7a362921
...
...
@@ -2983,14 +2983,14 @@ static struct pnp_dev *activate_dev(char *devname, char *resname, struct pnp_dev
{
int
err
;
/* Device already active? Let's use it */
if
(
dev
->
active
)
return
(
dev
);
err
=
pnp_device_attach
(
dev
);
if
(
err
<
0
)
return
(
NULL
);
if
((
err
=
pnp_activate_dev
(
dev
,
NULL
))
<
0
)
{
printk
(
KERN_ERR
"ad1848: %s %s config failed (out of resources?)[%d]
\n
"
,
devname
,
resname
,
err
);
pnp_d
isable_dev
(
dev
);
pnp_d
evice_detach
(
dev
);
return
(
NULL
);
}
...
...
@@ -3006,12 +3006,11 @@ static struct pnp_dev *ad1848_init_generic(struct pnp_card *bus, struct address_
{
if
((
ad1848_dev
=
activate_dev
(
ad1848_isapnp_list
[
slot
].
name
,
"ad1848"
,
ad1848_dev
)))
{
get_device
(
&
ad1848_dev
->
dev
);
hw_config
->
io_base
=
ad1848_dev
->
resource
[
ad1848_isapnp_list
[
slot
].
mss_io
].
start
;
hw_config
->
irq
=
ad1848_dev
->
irq_resource
[
ad1848_isapnp_list
[
slot
].
irq
].
start
;
hw_config
->
dma
=
ad1848_dev
->
dma_resource
[
ad1848_isapnp_list
[
slot
].
dma
].
start
;
hw_config
->
io_base
=
pnp_port_start
(
ad1848_dev
,
ad1848_isapnp_list
[
slot
].
mss_io
);
hw_config
->
irq
=
pnp_irq
(
ad1848_dev
,
ad1848_isapnp_list
[
slot
].
irq
);
hw_config
->
dma
=
pnp_dma
(
ad1848_dev
,
ad1848_isapnp_list
[
slot
].
dma
);
if
(
ad1848_isapnp_list
[
slot
].
dma2
!=
-
1
)
hw_config
->
dma2
=
ad1848_dev
->
dma_resource
[
ad1848_isapnp_list
[
slot
].
dma2
].
start
;
hw_config
->
dma2
=
pnp_dma
(
ad1848_dev
,
ad1848_isapnp_list
[
slot
].
dma2
)
;
else
hw_config
->
dma2
=
-
1
;
hw_config
->
card_subtype
=
ad1848_isapnp_list
[
slot
].
type
;
...
...
@@ -3032,7 +3031,7 @@ static int __init ad1848_isapnp_init(struct address_info *hw_config, struct pnp_
if
(
ad1848_init_generic
(
bus
,
hw_config
,
slot
))
{
/* We got it. */
printk
(
KERN_NOTICE
"ad1848:
ISA
PnP reports '%s' at i/o %#x, irq %d, dma %d, %d
\n
"
,
printk
(
KERN_NOTICE
"ad1848: PnP reports '%s' at i/o %#x, irq %d, dma %d, %d
\n
"
,
busname
,
hw_config
->
io_base
,
hw_config
->
irq
,
hw_config
->
dma
,
hw_config
->
dma2
);
...
...
@@ -3122,8 +3121,7 @@ static void __exit cleanup_ad1848(void)
#ifdef CONFIG_PNP
if
(
ad1848_dev
){
if
(
audio_activated
)
pnp_disable_dev
(
ad1848_dev
);
put_device
(
&
ad1848_dev
->
dev
);
pnp_device_detach
(
ad1848_dev
);
}
#endif
}
...
...
sound/oss/cs4232.c
View file @
7a362921
...
...
@@ -357,7 +357,7 @@ MODULE_PARM_DESC(isapnp,"Enable ISAPnP probing (default 1)");
/* All cs4232 based cards have the main ad1848 card either as CSC0000 or
* CSC0100. */
static
const
struct
pnp_id
cs4232_pnp_table
[]
=
{
static
const
struct
pnp_
device_
id
cs4232_pnp_table
[]
=
{
{
.
id
=
"CSC0100"
,
.
driver_data
=
0
},
{
.
id
=
"CSC0000"
,
.
driver_data
=
0
},
/* Guillemot Turtlebeach something appears to be cs4232 compatible
...
...
@@ -366,9 +366,9 @@ static const struct pnp_id cs4232_pnp_table[] = {
{
.
id
=
""
}
};
/*MODULE_DEVICE_TABLE(isapnp, isapnp_cs4232_list);*/
MODULE_DEVICE_TABLE
(
pnp
,
cs4232_pnp_table
);
static
int
cs4232_pnp_probe
(
struct
pnp_dev
*
dev
,
const
struct
pnp_
id
*
card_id
,
const
struct
pnp
_id
*
dev_id
)
static
int
cs4232_pnp_probe
(
struct
pnp_dev
*
dev
,
const
struct
pnp_
device
_id
*
dev_id
)
{
struct
address_info
*
isapnpcfg
;
...
...
@@ -376,30 +376,31 @@ static int cs4232_pnp_probe(struct pnp_dev *dev, const struct pnp_id *card_id, c
if
(
!
isapnpcfg
)
return
-
ENOMEM
;
isapnpcfg
->
irq
=
dev
->
irq_resource
[
0
].
start
;
isapnpcfg
->
dma
=
dev
->
dma_resource
[
0
].
start
;
isapnpcfg
->
dma2
=
dev
->
dma_resource
[
1
].
start
;
isapnpcfg
->
io_base
=
dev
->
resource
[
0
].
start
;
isapnpcfg
->
irq
=
pnp_irq
(
dev
,
0
)
;
isapnpcfg
->
dma
=
pnp_dma
(
dev
,
0
)
;
isapnpcfg
->
dma2
=
pnp_dma
(
dev
,
1
)
;
isapnpcfg
->
io_base
=
pnp_port_start
(
dev
,
0
)
;
if
(
probe_cs4232
(
isapnpcfg
,
TRUE
)
==
0
)
{
printk
(
KERN_ERR
"cs4232: ISA PnP card found, but not detected?
\n
"
);
kfree
(
isapnpcfg
);
return
-
ENODEV
;
}
attach_cs4232
(
isapnpcfg
);
p
ci
_set_drvdata
(
dev
,
isapnpcfg
);
p
np
_set_drvdata
(
dev
,
isapnpcfg
);
return
0
;
}
static
void
cs4232_pnp_remove
(
struct
pnp_dev
*
dev
)
{
struct
address_info
*
cfg
=
(
struct
address_info
*
)
dev
->
driver_data
;
if
(
cfg
)
struct
address_info
*
cfg
=
pnp_get_drvdata
(
dev
)
;
if
(
cfg
)
{
unload_cs4232
(
cfg
);
kfree
(
cfg
);
}
}
static
struct
pnp_driver
cs4232_driver
=
{
.
name
=
"cs4232"
,
.
card_id_table
=
NULL
,
.
id_table
=
cs4232_pnp_table
,
.
probe
=
cs4232_pnp_probe
,
.
remove
=
cs4232_pnp_remove
,
...
...
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