Browse Source

Automatically updated using

perl -pi -0777 -e 's/(_probe\s*\(\s*struct\s+dev.*?)(\s*\)\s*{.*?$)\s*struct pci_device.*?=\s*pci_device \( dev \);$/${1}, struct pci_device *pci${2}/ms' *.c

sis900 excluded from update
tags/v0.9.3
Michael Brown 19 years ago
parent
commit
963dbefb51

+ 1
- 2
src/drivers/net/3c595.c View File

468
 /**************************************************************************
468
 /**************************************************************************
469
 ETH_PROBE - Look for an adapter
469
 ETH_PROBE - Look for an adapter
470
 ***************************************************************************/
470
 ***************************************************************************/
471
-static int t595_probe ( struct dev *dev ) {
471
+static int t595_probe ( struct dev *dev, struct pci_device *pci ) {
472
 	struct nic *nic = nic_device ( dev );
472
 	struct nic *nic = nic_device ( dev );
473
-	struct pci_device *pci = pci_device ( dev );
474
 	int i;
473
 	int i;
475
 	unsigned short *p;
474
 	unsigned short *p;
476
 
475
 

+ 1
- 2
src/drivers/net/3c90x.c View File

690
  *** initialization.  If this routine is called, the pci functions did find the
690
  *** initialization.  If this routine is called, the pci functions did find the
691
  *** card.  We just have to init it here.
691
  *** card.  We just have to init it here.
692
  ***/
692
  ***/
693
-static int a3c90x_probe ( struct dev *dev ) {
693
+static int a3c90x_probe ( struct dev *dev, struct pci_device *pci ) {
694
     struct nic *nic = nic_device ( dev );
694
     struct nic *nic = nic_device ( dev );
695
-    struct pci_device *pci = pci_device ( dev );
696
     int i, c;
695
     int i, c;
697
     unsigned short eeprom[0x21];
696
     unsigned short eeprom[0x21];
698
     unsigned int cfg;
697
     unsigned int cfg;

+ 1
- 2
src/drivers/net/davicom.c View File

178
 /*********************************************************************/
178
 /*********************************************************************/
179
 /* Utility Routines                                                  */
179
 /* Utility Routines                                                  */
180
 /*********************************************************************/
180
 /*********************************************************************/
181
-static inline void whereami(const char *str)
181
+static inline void whereami(const char *str, struct pci_device *pci)
182
 {
182
 {
183
   printf("%s\n", str);
183
   printf("%s\n", str);
184
   /* sleep(2); */
184
   /* sleep(2); */
657
 /*********************************************************************/
657
 /*********************************************************************/
658
 static int davicom_probe ( struct dev *dev ) {
658
 static int davicom_probe ( struct dev *dev ) {
659
   struct nic *nic = nic_device ( dev );
659
   struct nic *nic = nic_device ( dev );
660
-  struct pci_device *pci = pci_device ( dev );
661
   unsigned int i;
660
   unsigned int i;
662
 
661
 
663
   whereami("davicom_probe\n");
662
   whereami("davicom_probe\n");

+ 1
- 2
src/drivers/net/dmfe.c View File

459
 
459
 
460
 #define board_found 1
460
 #define board_found 1
461
 #define valid_link 0
461
 #define valid_link 0
462
-static int dmfe_probe ( struct dev *dev ) {
462
+static int dmfe_probe ( struct dev *dev, struct pci_device *pci ) {
463
 	struct nic *nic = nic_device ( dev );
463
 	struct nic *nic = nic_device ( dev );
464
-	struct pci_device *pci = pci_device ( dev );
465
 	uint32_t dev_rev, pci_pmr;
464
 	uint32_t dev_rev, pci_pmr;
466
 	int i;
465
 	int i;
467
 
466
 

+ 1
- 2
src/drivers/net/e1000.c View File

3582
 PROBE - Look for an adapter, this routine's visible to the outside
3582
 PROBE - Look for an adapter, this routine's visible to the outside
3583
 You should omit the last argument struct pci_device * for a non-PCI NIC
3583
 You should omit the last argument struct pci_device * for a non-PCI NIC
3584
 ***************************************************************************/
3584
 ***************************************************************************/
3585
-static int e1000_probe ( struct dev *dev ) {
3585
+static int e1000_probe ( struct dev *dev, struct pci_device *pci ) {
3586
 	struct nic *nic = nic_device ( dev );
3586
 	struct nic *nic = nic_device ( dev );
3587
-	struct pci_device *p = pci_device ( dev );
3588
 	unsigned long mmio_start, mmio_len;
3587
 	unsigned long mmio_start, mmio_len;
3589
 	int ret_val, i;
3588
 	int ret_val, i;
3590
 
3589
 

+ 1
- 2
src/drivers/net/eepro100.c View File

603
  *            leaves the 82557 initialized, and ready to recieve packets.
603
  *            leaves the 82557 initialized, and ready to recieve packets.
604
  */
604
  */
605
 
605
 
606
-static int eepro100_probe ( struct dev *dev ) {
606
+static int eepro100_probe ( struct dev *dev, struct pci_device *pci ) {
607
 	struct nic *nic = nic_device ( dev );
607
 	struct nic *nic = nic_device ( dev );
608
-	struct pci_device *p = pci_device ( dev );
609
 	unsigned short sum = 0;
608
 	unsigned short sum = 0;
610
 	int i;
609
 	int i;
611
 	int read_cmd, ee_size;
610
 	int read_cmd, ee_size;

+ 1
- 2
src/drivers/net/epic100.c View File

99
 
99
 
100
 
100
 
101
 static int
101
 static int
102
-epic100_probe ( struct dev *dev ) {
102
+epic100_probe ( struct dev *dev, struct pci_device *pci ) {
103
     struct nic *nic = nic_device ( dev );
103
     struct nic *nic = nic_device ( dev );
104
-    struct pci_device *pci = pci_device ( dev );
105
     int i;
104
     int i;
106
     unsigned short* ap;
105
     unsigned short* ap;
107
     unsigned int phy, phy_idx;
106
     unsigned int phy, phy_idx;

+ 1
- 2
src/drivers/net/forcedeth.c View File

941
 #define IORESOURCE_MEM 0x00000200
941
 #define IORESOURCE_MEM 0x00000200
942
 #define board_found 1
942
 #define board_found 1
943
 #define valid_link 0
943
 #define valid_link 0
944
-static int forcedeth_probe ( struct dev *dev ) {
944
+static int forcedeth_probe ( struct dev *dev, struct pci_device *pci ) {
945
 	struct nic *nic = nic_device ( dev );
945
 	struct nic *nic = nic_device ( dev );
946
-	struct pci_device *pci = pci_device ( dev );
947
 	unsigned long addr;
946
 	unsigned long addr;
948
 	int sz;
947
 	int sz;
949
 	u8 *base;
948
 	u8 *base;

+ 1
- 2
src/drivers/net/mtd80x.c View File

674
 PROBE - Look for an adapter, this routine's visible to the outside
674
 PROBE - Look for an adapter, this routine's visible to the outside
675
 ***************************************************************************/
675
 ***************************************************************************/
676
 
676
 
677
-static int mtd_probe ( struct dev *dev ) {
677
+static int mtd_probe ( struct dev *dev, struct pci_device *pci ) {
678
     struct nic *nic = nic_device ( dev );
678
     struct nic *nic = nic_device ( dev );
679
-    struct pci_device *pci = pci_device ( dev );
680
     int i;
679
     int i;
681
 
680
 
682
     if ( ! find_pci_device ( pci, &mtd80x_driver ) )
681
     if ( ! find_pci_device ( pci, &mtd80x_driver ) )

+ 1
- 3
src/drivers/net/natsemi.c View File

243
  */
243
  */
244
 
244
 
245
 static int
245
 static int
246
-natsemi_probe ( struct dev *dev ) {
246
+natsemi_probe ( struct dev *dev, struct pci_device *pci ) {
247
 
247
 
248
     struct nic *nic = nic_device ( dev );
248
     struct nic *nic = nic_device ( dev );
249
-
250
-    struct pci_device *pci = pci_device ( dev );
251
     int i;
249
     int i;
252
     int prev_eedata;
250
     int prev_eedata;
253
     u32 tmp;
251
     u32 tmp;

+ 1
- 2
src/drivers/net/ns83820.c View File

825
 
825
 
826
 #define board_found 1
826
 #define board_found 1
827
 #define valid_link 0
827
 #define valid_link 0
828
-static int ns83820_probe ( struct dev *dev ) {
828
+static int ns83820_probe ( struct dev *dev, struct pci_device *pci ) {
829
 	struct nic *nic = nic_device ( dev );
829
 	struct nic *nic = nic_device ( dev );
830
-	struct pci_device *pci = pci_device ( dev );
831
 	int sz;
830
 	int sz;
832
 	long addr;
831
 	long addr;
833
 	int using_dac = 0;
832
 	int using_dac = 0;

+ 1
- 2
src/drivers/net/pcnet32.c View File

666
 PROBE - Look for an adapter, this routine's visible to the outside
666
 PROBE - Look for an adapter, this routine's visible to the outside
667
 You should omit the last argument struct pci_device * for a non-PCI NIC
667
 You should omit the last argument struct pci_device * for a non-PCI NIC
668
 ***************************************************************************/
668
 ***************************************************************************/
669
-static int pcnet32_probe ( struct dev *dev ) {
669
+static int pcnet32_probe ( struct dev *dev, struct pci_device *pci ) {
670
 	struct nic *nic = nic_device ( dev );
670
 	struct nic *nic = nic_device ( dev );
671
-	struct pci_device *pci = pci_device ( dev );
672
 	int i, media;
671
 	int i, media;
673
 	int fdx, mii, fset, dxsuflo, ltint;
672
 	int fdx, mii, fset, dxsuflo, ltint;
674
 	int chip_version;
673
 	int chip_version;

+ 1
- 2
src/drivers/net/prism2_pci.c View File

26
 static struct pci_driver prism2_pci_driver =
26
 static struct pci_driver prism2_pci_driver =
27
 	PCI_DRIVER ( "Prism2_PCI", prism2_pci_nics, PCI_NO_CLASS );
27
 	PCI_DRIVER ( "Prism2_PCI", prism2_pci_nics, PCI_NO_CLASS );
28
 
28
 
29
-static int prism2_pci_probe ( struct dev *dev ) {
29
+static int prism2_pci_probe ( struct dev *dev, struct pci_device *pci ) {
30
   struct nic *nic = nic_device ( dev );
30
   struct nic *nic = nic_device ( dev );
31
-  struct pci_device *pci = pci_device ( dev );
32
   hfa384x_t *hw = &hw_global;
31
   hfa384x_t *hw = &hw_global;
33
   uint32_t membase = 0; /* Prism2.5 Memory Base */
32
   uint32_t membase = 0; /* Prism2.5 Memory Base */
34
 
33
 

+ 1
- 2
src/drivers/net/prism2_plx.c View File

92
   return found;
92
   return found;
93
 }
93
 }
94
 
94
 
95
-static int prism2_plx_probe ( struct dev *dev ) {
95
+static int prism2_plx_probe ( struct dev *dev, struct pci_device *pci ) {
96
   struct nic *nic = nic_device ( dev );
96
   struct nic *nic = nic_device ( dev );
97
-  struct pci_device *pci = pci_device ( dev );
98
   hfa384x_t *hw = &hw_global;
97
   hfa384x_t *hw = &hw_global;
99
 
98
 
100
   if ( ! find_pci_device ( pci, &prism2_plx_driver ) )
99
   if ( ! find_pci_device ( pci, &prism2_plx_driver ) )

+ 1
- 2
src/drivers/net/r8169.c View File

723
 
723
 
724
 #define board_found 1
724
 #define board_found 1
725
 #define valid_link 0
725
 #define valid_link 0
726
-static int r8169_probe ( struct dev *dev ) {
726
+static int r8169_probe ( struct dev *dev, struct pci_device *pci ) {
727
 	struct nic *nic = nic_device ( dev );
727
 	struct nic *nic = nic_device ( dev );
728
-	struct pci_device *pci = pci_device ( dev );
729
 	static int board_idx = -1;
728
 	static int board_idx = -1;
730
 	static int printed_version = 0;
729
 	static int printed_version = 0;
731
 	int i, rc;
730
 	int i, rc;

+ 1
- 2
src/drivers/net/rtl8139.c View File

183
 static struct nic_operations rtl_operations;
183
 static struct nic_operations rtl_operations;
184
 static struct pci_driver rtl8139_driver;
184
 static struct pci_driver rtl8139_driver;
185
 
185
 
186
-static int rtl8139_probe ( struct dev *dev ) {
186
+static int rtl8139_probe ( struct dev *dev, struct pci_device *pci ) {
187
 	struct nic *nic = nic_device ( dev );
187
 	struct nic *nic = nic_device ( dev );
188
-	struct pci_device *pci = pci_device ( dev );
189
 	int i;
188
 	int i;
190
 	int speed10, fullduplex;
189
 	int speed10, fullduplex;
191
 	int addr_len;
190
 	int addr_len;

+ 1
- 3
src/drivers/net/skel.c View File

133
 
133
 
134
 #define board_found 1
134
 #define board_found 1
135
 #define valid_link 0
135
 #define valid_link 0
136
-static int skel_probe ( struct dev *dev ) {
136
+static int skel_probe ( struct dev *dev, struct pci_device *pci ) {
137
 
137
 
138
 	struct nic *nic = nic_device ( dev );
138
 	struct nic *nic = nic_device ( dev );
139
 
139
 
140
-	struct pci_device *pci = pci_device ( dev );
141
-
142
 	if (board_found && valid_link)
140
 	if (board_found && valid_link)
143
 	{
141
 	{
144
 		/* store NIC parameters */
142
 		/* store NIC parameters */

+ 1
- 2
src/drivers/net/sundance.c View File

583
 /**************************************************************************
583
 /**************************************************************************
584
 PROBE - Look for an adapter, this routine's visible to the outside
584
 PROBE - Look for an adapter, this routine's visible to the outside
585
 ***************************************************************************/
585
 ***************************************************************************/
586
-static int sundance_probe ( struct dev *dev ) {
586
+static int sundance_probe ( struct dev *dev, struct pci_device *pci ) {
587
 	struct nic *nic = nic_device ( dev );
587
 	struct nic *nic = nic_device ( dev );
588
-	struct pci_device *pci = pci_device ( dev );
589
 	u8 ee_data[EEPROM_SIZE];
588
 	u8 ee_data[EEPROM_SIZE];
590
 	u16 mii_ctl;
589
 	u16 mii_ctl;
591
 	int i;
590
 	int i;

+ 1
- 2
src/drivers/net/tg3.c View File

3264
 PROBE - Look for an adapter, this routine's visible to the outside
3264
 PROBE - Look for an adapter, this routine's visible to the outside
3265
 You should omit the last argument struct pci_device * for a non-PCI NIC
3265
 You should omit the last argument struct pci_device * for a non-PCI NIC
3266
 ***************************************************************************/
3266
 ***************************************************************************/
3267
-static int tg3_probe ( struct dev *dev ) {
3267
+static int tg3_probe ( struct dev *dev, struct pci_device *pci ) {
3268
 	struct nic *nic = nic_device ( dev );
3268
 	struct nic *nic = nic_device ( dev );
3269
-	struct pci_device *pdev = pci_device ( dev );
3270
 	struct tg3 *tp = &tg3;
3269
 	struct tg3 *tp = &tg3;
3271
 	unsigned long tg3reg_base, tg3reg_len;
3270
 	unsigned long tg3reg_base, tg3reg_len;
3272
 	int i, err, pm_cap;
3271
 	int i, err, pm_cap;

+ 1
- 2
src/drivers/net/tlan.c View File

781
 
781
 
782
 #define board_found 1
782
 #define board_found 1
783
 #define valid_link 0
783
 #define valid_link 0
784
-static int tlan_probe ( struct dev *dev ) {
784
+static int tlan_probe ( struct dev *dev, struct pci_device *pci ) {
785
 	struct nic *nic = nic_device ( dev );
785
 	struct nic *nic = nic_device ( dev );
786
-	struct pci_device *pci = pci_device ( dev );
787
 	u16 data = 0;
786
 	u16 data = 0;
788
 	int err;
787
 	int err;
789
 	int i;
788
 	int i;

+ 1
- 2
src/drivers/net/tulip.c View File

516
 /*********************************************************************/
516
 /*********************************************************************/
517
 
517
 
518
 #ifdef TULIP_DEBUG_WHERE
518
 #ifdef TULIP_DEBUG_WHERE
519
-static void whereami (const char *str)
519
+static void whereami (const char *str, struct pci_device *pci)
520
 {
520
 {
521
     printf("%s: %s\n", tp->nic_name, str);
521
     printf("%s: %s\n", tp->nic_name, str);
522
     /* sleep(2); */
522
     /* sleep(2); */
1227
 /*********************************************************************/
1227
 /*********************************************************************/
1228
 static int tulip_probe ( struct dev *dev ) {
1228
 static int tulip_probe ( struct dev *dev ) {
1229
     struct nic *nic = nic_device ( dev );
1229
     struct nic *nic = nic_device ( dev );
1230
-    struct pci_device *pci = pci_device ( dev );
1231
     u32 i;
1230
     u32 i;
1232
     u8  chip_rev;
1231
     u8  chip_rev;
1233
     u8 ee_data[EEPROM_SIZE];
1232
     u8 ee_data[EEPROM_SIZE];

+ 1
- 2
src/drivers/net/via-rhine.c View File

954
 static struct pci_driver rhine_driver;
954
 static struct pci_driver rhine_driver;
955
 
955
 
956
 static int
956
 static int
957
-rhine_probe ( struct dev *dev ) {
957
+rhine_probe ( struct dev *dev, struct pci_device *pci ) {
958
     struct nic *nic = nic_device ( dev );
958
     struct nic *nic = nic_device ( dev );
959
-    struct pci_device *pci = pci_device ( dev );
960
     struct rhine_private *tp = (struct rhine_private *) nic->priv_data;
959
     struct rhine_private *tp = (struct rhine_private *) nic->priv_data;
961
 
960
 
962
     if ( ! find_pci_device ( pci, &rhine_driver ) )
961
     if ( ! find_pci_device ( pci, &rhine_driver ) )

+ 1
- 2
src/drivers/net/w89c840.c View File

623
 /**************************************************************************
623
 /**************************************************************************
624
 w89c840_probe - Look for an adapter, this routine's visible to the outside
624
 w89c840_probe - Look for an adapter, this routine's visible to the outside
625
 ***************************************************************************/
625
 ***************************************************************************/
626
-static int w89c840_probe ( struct dev *dev ) {
626
+static int w89c840_probe ( struct dev *dev, struct pci_device *pci ) {
627
     struct nic *nic = nic_device ( dev );
627
     struct nic *nic = nic_device ( dev );
628
-    struct pci_device *p = pci_device ( dev );
629
 
628
 
630
     if ( ! find_pci_device ( p, &w89c840_driver ) )
629
     if ( ! find_pci_device ( p, &w89c840_driver ) )
631
 	    return 0;
630
 	    return 0;

Loading…
Cancel
Save