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
1b99d876
Commit
1b99d876
authored
Jun 09, 2003
by
Greg Kroah-Hartman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PCI: remove pci_present() from drivers/char/ip2main.c
parent
08c681a6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
31 deletions
+29
-31
drivers/char/ip2main.c
drivers/char/ip2main.c
+29
-31
No files found.
drivers/char/ip2main.c
View file @
1b99d876
...
...
@@ -691,41 +691,39 @@ ip2_loadmain(int *iop, int *irqp, unsigned char *firmware, int firmsize)
}
}
#else
/* LINUX_VERSION_CODE > 2.1.99 */
if
(
pci_present
())
{
struct
pci_dev
*
pci_dev_i
=
NULL
;
pci_dev_i
=
pci_find_device
(
PCI_VENDOR_ID_COMPUTONE
,
PCI_DEVICE_ID_COMPUTONE_IP2EX
,
pci_dev_i
);
if
(
pci_dev_i
!=
NULL
)
{
unsigned
int
addr
;
unsigned
char
pci_irq
;
ip2config
.
type
[
i
]
=
PCI
;
status
=
pci_read_config_dword
(
pci_dev_i
,
PCI_BASE_ADDRESS_1
,
&
addr
);
if
(
addr
&
1
)
{
ip2config
.
addr
[
i
]
=
(
USHORT
)(
addr
&
0xfffe
);
}
else
{
printk
(
KERN_ERR
"IP2: PCI I/O address error
\n
"
);
}
status
=
pci_read_config_byte
(
pci_dev_i
,
PCI_INTERRUPT_LINE
,
&
pci_irq
);
struct
pci_dev
*
pci_dev_i
=
NULL
;
pci_dev_i
=
pci_find_device
(
PCI_VENDOR_ID_COMPUTONE
,
PCI_DEVICE_ID_COMPUTONE_IP2EX
,
pci_dev_i
);
if
(
pci_dev_i
!=
NULL
)
{
unsigned
int
addr
;
unsigned
char
pci_irq
;
ip2config
.
type
[
i
]
=
PCI
;
status
=
pci_read_config_dword
(
pci_dev_i
,
PCI_BASE_ADDRESS_1
,
&
addr
);
if
(
addr
&
1
)
{
ip2config
.
addr
[
i
]
=
(
USHORT
)(
addr
&
0xfffe
);
}
else
{
printk
(
KERN_ERR
"IP2: PCI I/O address error
\n
"
);
}
status
=
pci_read_config_byte
(
pci_dev_i
,
PCI_INTERRUPT_LINE
,
&
pci_irq
);
// If the PCI BIOS assigned it, lets try and use it. If we
// can't acquire it or it screws up, deal with it then.
// if (!is_valid_irq(pci_irq)) {
// printk( KERN_ERR "IP2: Bad PCI BIOS IRQ(%d)\n",pci_irq);
// pci_irq = 0;
// }
ip2config
.
irq
[
i
]
=
pci_irq
;
}
else
{
// ann error
ip2config
.
addr
[
i
]
=
0
;
if
(
status
==
PCIBIOS_DEVICE_NOT_FOUND
)
{
printk
(
KERN_ERR
"IP2: PCI board %d not found
\n
"
,
i
);
}
else
{
pcibios_strerror
(
status
);
}
}
// if (!is_valid_irq(pci_irq)) {
// printk( KERN_ERR "IP2: Bad PCI BIOS IRQ(%d)\n",pci_irq);
// pci_irq = 0;
// }
ip2config
.
irq
[
i
]
=
pci_irq
;
}
else
{
// ann error
ip2config
.
addr
[
i
]
=
0
;
if
(
status
==
PCIBIOS_DEVICE_NOT_FOUND
)
{
printk
(
KERN_ERR
"IP2: PCI board %d not found
\n
"
,
i
);
}
else
{
pcibios_strerror
(
status
);
}
}
#endif
/* ! 2_0_X */
#else
...
...
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