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
d45fc8df
Commit
d45fc8df
authored
Oct 05, 2004
by
Greg Kroah-Hartman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] PCI: get rid of pci_find_device() from arch/i386/*
Signed-off-by:
Greg Kroah-Hartman
<
greg@kroah.com
>
parent
7bfaf2ed
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
28 additions
and
13 deletions
+28
-13
arch/i386/kernel/cpu/cpufreq/gx-suspmod.c
arch/i386/kernel/cpu/cpufreq/gx-suspmod.c
+2
-1
arch/i386/kernel/cpu/cyrix.c
arch/i386/kernel/cpu/cyrix.c
+10
-2
arch/i386/pci/acpi.c
arch/i386/pci/acpi.c
+1
-1
arch/i386/pci/i386.c
arch/i386/pci/i386.c
+2
-2
arch/i386/pci/irq.c
arch/i386/pci/irq.c
+13
-7
No files found.
arch/i386/kernel/cpu/cpufreq/gx-suspmod.c
View file @
d45fc8df
...
...
@@ -199,7 +199,7 @@ static __init struct pci_dev *gx_detect_chipset(void)
}
/* detect which companion chip is used */
while
((
gx_pci
=
pci_
find
_device
(
PCI_ANY_ID
,
PCI_ANY_ID
,
gx_pci
))
!=
NULL
)
{
while
((
gx_pci
=
pci_
get
_device
(
PCI_ANY_ID
,
PCI_ANY_ID
,
gx_pci
))
!=
NULL
)
{
if
((
pci_match_device
(
gx_chipset_tbl
,
gx_pci
))
!=
NULL
)
{
return
gx_pci
;
}
...
...
@@ -499,6 +499,7 @@ static int __init cpufreq_gx_init(void)
static
void
__exit
cpufreq_gx_exit
(
void
)
{
cpufreq_unregister_driver
(
&
gx_suspmod_driver
);
pci_dev_put
(
gx_params
->
cs55x0
);
kfree
(
gx_params
);
}
...
...
arch/i386/kernel/cpu/cyrix.c
View file @
d45fc8df
...
...
@@ -192,6 +192,7 @@ static void __init init_cyrix(struct cpuinfo_x86 *c)
unsigned
char
dir0
,
dir0_msn
,
dir0_lsn
,
dir1
=
0
;
char
*
buf
=
c
->
x86_model_id
;
const
char
*
p
=
NULL
;
struct
pci_dev
*
dev
;
/* Bit 31 in normal CPUID used for nonstandard 3DNow ID;
3DNow is IDd by bit 31 in extended CPUID (1*32+31) anyway */
...
...
@@ -274,9 +275,16 @@ static void __init init_cyrix(struct cpuinfo_x86 *c)
/*
* The 5510/5520 companion chips have a funky PIT.
*/
if
(
pci_find_device
(
PCI_VENDOR_ID_CYRIX
,
PCI_DEVICE_ID_CYRIX_5510
,
NULL
)
||
pci_find_device
(
PCI_VENDOR_ID_CYRIX
,
PCI_DEVICE_ID_CYRIX_5520
,
NULL
))
dev
=
pci_get_device
(
PCI_VENDOR_ID_CYRIX
,
PCI_DEVICE_ID_CYRIX_5510
,
NULL
);
if
(
dev
)
{
pci_dev_put
(
dev
);
pit_latch_buggy
=
1
;
}
dev
=
pci_find_device
(
PCI_VENDOR_ID_CYRIX
,
PCI_DEVICE_ID_CYRIX_5520
,
NULL
);
if
(
dev
)
{
pci_dev_put
(
dev
);
pit_latch_buggy
=
1
;
}
/* GXm supports extended cpuid levels 'ala' AMD */
if
(
c
->
cpuid_level
==
2
)
{
...
...
arch/i386/pci/acpi.c
View file @
d45fc8df
...
...
@@ -35,7 +35,7 @@ static int __init pci_acpi_init(void)
* also do it here in case there are still broken drivers that
* don't use pci_enable_device().
*/
while
((
dev
=
pci_
find
_device
(
PCI_ANY_ID
,
PCI_ANY_ID
,
dev
))
!=
NULL
)
while
((
dev
=
pci_
get
_device
(
PCI_ANY_ID
,
PCI_ANY_ID
,
dev
))
!=
NULL
)
acpi_pci_irq_enable
(
dev
);
#ifdef CONFIG_X86_IO_APIC
...
...
arch/i386/pci/i386.c
View file @
d45fc8df
...
...
@@ -124,7 +124,7 @@ static void __init pcibios_allocate_resources(int pass)
u16
command
;
struct
resource
*
r
,
*
pr
;
while
((
dev
=
pci_
find
_device
(
PCI_ANY_ID
,
PCI_ANY_ID
,
dev
))
!=
NULL
)
{
while
((
dev
=
pci_
get
_device
(
PCI_ANY_ID
,
PCI_ANY_ID
,
dev
))
!=
NULL
)
{
pci_read_config_word
(
dev
,
PCI_COMMAND
,
&
command
);
for
(
idx
=
0
;
idx
<
6
;
idx
++
)
{
r
=
&
dev
->
resource
[
idx
];
...
...
@@ -168,7 +168,7 @@ static int __init pcibios_assign_resources(void)
int
idx
;
struct
resource
*
r
;
while
((
dev
=
pci_
find
_device
(
PCI_ANY_ID
,
PCI_ANY_ID
,
dev
))
!=
NULL
)
{
while
((
dev
=
pci_
get
_device
(
PCI_ANY_ID
,
PCI_ANY_ID
,
dev
))
!=
NULL
)
{
int
class
=
dev
->
class
>>
8
;
/* Don't touch classless devices and host bridges */
...
...
arch/i386/pci/irq.c
View file @
d45fc8df
...
...
@@ -455,12 +455,18 @@ static int pirq_bios_set(struct pci_dev *router, struct pci_dev *dev, int pirq,
static
__init
int
intel_router_probe
(
struct
irq_router
*
r
,
struct
pci_dev
*
router
,
u16
device
)
{
struct
pci_dev
*
dev1
,
*
dev2
;
/* 440GX has a proprietary PIRQ router -- don't use it */
if
(
pci_find_device
(
PCI_VENDOR_ID_INTEL
,
PCI_DEVICE_ID_INTEL_82443GX_0
,
NULL
)
||
pci_find_device
(
PCI_VENDOR_ID_INTEL
,
PCI_DEVICE_ID_INTEL_82443GX_2
,
NULL
))
dev1
=
pci_get_device
(
PCI_VENDOR_ID_INTEL
,
PCI_DEVICE_ID_INTEL_82443GX_0
,
NULL
);
dev2
=
pci_get_device
(
PCI_VENDOR_ID_INTEL
,
PCI_DEVICE_ID_INTEL_82443GX_2
,
NULL
);
if
((
dev1
!=
NULL
)
||
(
dev2
!=
NULL
))
{
pci_dev_put
(
dev1
);
pci_dev_put
(
dev2
);
return
0
;
}
switch
(
device
)
{
...
...
@@ -804,7 +810,7 @@ static int pcibios_lookup_irq(struct pci_dev *dev, int assign)
printk
(
KERN_INFO
"PCI: %s IRQ %d for device %s
\n
"
,
msg
,
irq
,
pci_name
(
dev
));
/* Update IRQ for all devices with the same pirq value */
while
((
dev2
=
pci_
find
_device
(
PCI_ANY_ID
,
PCI_ANY_ID
,
dev2
))
!=
NULL
)
{
while
((
dev2
=
pci_
get
_device
(
PCI_ANY_ID
,
PCI_ANY_ID
,
dev2
))
!=
NULL
)
{
pci_read_config_byte
(
dev2
,
PCI_INTERRUPT_PIN
,
&
pin
);
if
(
!
pin
)
continue
;
...
...
@@ -838,7 +844,7 @@ static void __init pcibios_fixup_irqs(void)
u8
pin
;
DBG
(
"PCI: IRQ fixup
\n
"
);
while
((
dev
=
pci_
find
_device
(
PCI_ANY_ID
,
PCI_ANY_ID
,
dev
))
!=
NULL
)
{
while
((
dev
=
pci_
get
_device
(
PCI_ANY_ID
,
PCI_ANY_ID
,
dev
))
!=
NULL
)
{
/*
* If the BIOS has set an out of range IRQ number, just ignore it.
* Also keep track of which IRQ's are already in use.
...
...
@@ -854,7 +860,7 @@ static void __init pcibios_fixup_irqs(void)
}
dev
=
NULL
;
while
((
dev
=
pci_
find
_device
(
PCI_ANY_ID
,
PCI_ANY_ID
,
dev
))
!=
NULL
)
{
while
((
dev
=
pci_
get
_device
(
PCI_ANY_ID
,
PCI_ANY_ID
,
dev
))
!=
NULL
)
{
pci_read_config_byte
(
dev
,
PCI_INTERRUPT_PIN
,
&
pin
);
#ifdef CONFIG_X86_IO_APIC
/*
...
...
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