mirror of
https://github.com/ipxe/ipxe
synced 2026-01-02 09:52:49 +03:00
Automatically updated with the program
#!/usr/bin/perl -w -pi -0777
use strict;
( my $type ) = /find_(\w+?)_boot_device/ or die "Could not find type\n";
( my $disable ) = /\.disable\s*=\s*(\w+)/ or die "Could not locate disable\n";
s/(${disable}\s*\(\s*struct\s+nic\s+\*nic)(\s*\)\s*\{)(\s*)/${1}, struct ${type}_device \*${type} __unused${2}${3}nic_disable ( nic );${3}/s;
s/(${disable}\s*\(\s*struct\s+nic\s+\*nic)(\s*\)\s*;)/${1}, struct ${type}_device \*${type}${2}/g;
s/^\s*.disable\s*=\s*${disable}\s*,\s*?$//m;
s/(_probe\s*\(\s*)struct\s+dev\s+\*dev/${1}struct nic \*nic/g;
s/^\s*struct\s+nic\s+\*nic\s*=\s*nic_device\s*\(\s*dev\s*\)\s*;\s*?$//m;
s/^(\s*)(nic->(ioaddr|irqno)\s*=\s*${type})/${1}${type}_fill_nic ( nic, ${type} );\n${1}${2}/m;
This commit is contained in:
@@ -576,15 +576,15 @@ static struct nic_operations sundance_operations = {
|
||||
.poll = sundance_poll,
|
||||
.transmit = sundance_transmit,
|
||||
.irq = sundance_irq,
|
||||
.disable = sundance_disable,
|
||||
|
||||
};
|
||||
static struct pci_driver sundance_driver;
|
||||
|
||||
/**************************************************************************
|
||||
PROBE - Look for an adapter, this routine's visible to the outside
|
||||
***************************************************************************/
|
||||
static int sundance_probe ( struct dev *dev, struct pci_device *pci ) {
|
||||
struct nic *nic = nic_device ( dev );
|
||||
static int sundance_probe ( struct nic *nic, struct pci_device *pci ) {
|
||||
|
||||
u8 ee_data[EEPROM_SIZE];
|
||||
u16 mii_ctl;
|
||||
int i;
|
||||
@@ -740,6 +740,7 @@ static int sundance_probe ( struct dev *dev, struct pci_device *pci ) {
|
||||
|
||||
/* point to NIC specific routines */
|
||||
nic->nic_op = &sundance_operations;
|
||||
pci_fill_nic ( nic, pci );
|
||||
nic->irqno = pci->irq;
|
||||
nic->ioaddr = BASE;
|
||||
|
||||
@@ -884,6 +885,7 @@ static struct pci_id sundance_nics[] = {
|
||||
};
|
||||
|
||||
static struct pci_driver sundance_driver =
|
||||
PCI_DRIVER ( "SUNDANCE/PCI", sundance_nics, PCI_NO_CLASS );
|
||||
PCI_DRIVER ( sundance_nics, PCI_NO_CLASS );
|
||||
|
||||
BOOT_DRIVER ( "SUNDANCE/PCI", find_pci_boot_device, sundance_driver, sundance_probe );
|
||||
DRIVER ( "SUNDANCE/PCI", nic_driver, pci_driver, sundance_driver,
|
||||
sundance_probe, sundance_disable );
|
||||
|
||||
Reference in New Issue
Block a user