Quellcode durchsuchen

Automatically updated using

perl -pi -0777 -e 's/_probe\s*\(\s*struct dev \*dev,\s*struct pci_device \*(\w+?)\s*\)\s*{(\s*)struct nic \*nic.*?$/_probe ( struct dev *dev ) {\n${2}struct nic *nic = nic_device ( dev );\n${2}struct pci_device *$1 = pci_device ( dev );/ms' *.c
tags/v0.9.3
Michael Brown vor 19 Jahren
Ursprung
Commit
bd9ae7cc70

+ 5
- 3
src/drivers/net/3c595.c Datei anzeigen

@@ -467,9 +467,11 @@ static void t595_irq(struct nic *nic __unused, irq_action_t action __unused)
467 467
 /**************************************************************************
468 468
 ETH_PROBE - Look for an adapter
469 469
 ***************************************************************************/
470
-static int t595_probe(struct dev *dev, struct pci_device *pci)
471
-{
472
-	struct nic *nic = (struct nic *)dev;
470
+static int t595_probe ( struct dev *dev ) {
471
+
472
+	struct nic *nic = nic_device ( dev );
473
+
474
+	struct pci_device *pci = pci_device ( dev );
473 475
 	int i;
474 476
 	unsigned short *p;
475 477
 

+ 5
- 3
src/drivers/net/3c90x.c Datei anzeigen

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

+ 5
- 3
src/drivers/net/davicom.c Datei anzeigen

@@ -654,9 +654,11 @@ static void davicom_irq(struct nic *nic __unused, irq_action_t action __unused)
654 654
 /*********************************************************************/
655 655
 /* eth_probe - Look for an adapter                                   */
656 656
 /*********************************************************************/
657
-static int davicom_probe(struct dev *dev, struct pci_device *pci)
658
-{
659
-  struct nic *nic = (struct nic *)dev;
657
+static int davicom_probe ( struct dev *dev ) {
658
+
659
+  struct nic *nic = nic_device ( dev );
660
+
661
+  struct pci_device *pci = pci_device ( dev );
660 662
   unsigned int i;
661 663
 
662 664
   whereami("davicom_probe\n");

+ 5
- 3
src/drivers/net/dmfe.c Datei anzeigen

@@ -461,9 +461,11 @@ PROBE - Look for an adapter, this routine's visible to the outside
461 461
 
462 462
 #define board_found 1
463 463
 #define valid_link 0
464
-static int dmfe_probe(struct dev *dev, struct pci_device *pci)
465
-{
466
-	struct nic *nic = (struct nic *) dev;
464
+static int dmfe_probe ( struct dev *dev ) {
465
+
466
+	struct nic *nic = nic_device ( dev );
467
+
468
+	struct pci_device *pci = pci_device ( dev );
467 469
 	uint32_t dev_rev, pci_pmr;
468 470
 	int i;
469 471
 

+ 5
- 3
src/drivers/net/e1000.c Datei anzeigen

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

+ 5
- 3
src/drivers/net/eepro100.c Datei anzeigen

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

+ 5
- 3
src/drivers/net/epic100.c Datei anzeigen

@@ -95,9 +95,11 @@ static unsigned char		tx_packet[PKT_BUF_SZ * TX_RING_SIZE];
95 95
 
96 96
 
97 97
     static int
98
-epic100_probe(struct dev *dev, struct pci_device *pci)
99
-{
100
-    struct nic *nic = (struct nic *)dev;
98
+epic100_probe ( struct dev *dev ) {
99
+
100
+    struct nic *nic = nic_device ( dev );
101
+
102
+    struct pci_device *pci = pci_device ( dev );
101 103
     int i;
102 104
     unsigned short* ap;
103 105
     unsigned int phy, phy_idx;

+ 5
- 3
src/drivers/net/forcedeth.c Datei anzeigen

@@ -925,9 +925,11 @@ PROBE - Look for an adapter, this routine's visible to the outside
925 925
 #define IORESOURCE_MEM 0x00000200
926 926
 #define board_found 1
927 927
 #define valid_link 0
928
-static int forcedeth_probe(struct dev *dev, struct pci_device *pci)
929
-{
930
-	struct nic *nic = (struct nic *) dev;
928
+static int forcedeth_probe ( struct dev *dev ) {
929
+
930
+	struct nic *nic = nic_device ( dev );
931
+
932
+	struct pci_device *pci = pci_device ( dev );
931 933
 	unsigned long addr;
932 934
 	int sz;
933 935
 	u8 *base;

+ 5
- 3
src/drivers/net/mtd80x.c Datei anzeigen

@@ -663,9 +663,11 @@ static void mtd_disable(struct dev *dev)
663 663
 PROBE - Look for an adapter, this routine's visible to the outside
664 664
 ***************************************************************************/
665 665
 
666
-static int mtd_probe(struct dev *dev, struct pci_device *pci)
667
-{
668
-    struct nic *nic = (struct nic *)dev;
666
+static int mtd_probe ( struct dev *dev ) {
667
+
668
+    struct nic *nic = nic_device ( dev );
669
+
670
+    struct pci_device *pci = pci_device ( dev );
669 671
     int i;
670 672
 
671 673
     if (pci->ioaddr == 0)

+ 5
- 3
src/drivers/net/natsemi.c Datei anzeigen

@@ -240,9 +240,11 @@ static void natsemi_irq(struct nic *nic, irq_action_t action);
240 240
  */
241 241
 
242 242
 static int
243
-natsemi_probe(struct dev *dev, struct pci_device *pci)
244
-{
245
-    struct nic *nic = (struct nic *)dev;
243
+natsemi_probe ( struct dev *dev ) {
244
+
245
+    struct nic *nic = nic_device ( dev );
246
+
247
+    struct pci_device *pci = pci_device ( dev );
246 248
     int i;
247 249
     int prev_eedata;
248 250
     u32 tmp;

+ 5
- 3
src/drivers/net/ns83820.c Datei anzeigen

@@ -811,9 +811,11 @@ PROBE - Look for an adapter, this routine's visible to the outside
811 811
 
812 812
 #define board_found 1
813 813
 #define valid_link 0
814
-static int ns83820_probe(struct dev *dev, struct pci_device *pci)
815
-{
816
-	struct nic *nic = (struct nic *) dev;
814
+static int ns83820_probe ( struct dev *dev ) {
815
+
816
+	struct nic *nic = nic_device ( dev );
817
+
818
+	struct pci_device *pci = pci_device ( dev );
817 819
 	int sz;
818 820
 	long addr;
819 821
 	int using_dac = 0;

+ 5
- 3
src/drivers/net/pcnet32.c Datei anzeigen

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

+ 5
- 3
src/drivers/net/r8169.c Datei anzeigen

@@ -709,9 +709,11 @@ PROBE - Look for an adapter, this routine's visible to the outside
709 709
 
710 710
 #define board_found 1
711 711
 #define valid_link 0
712
-static int r8169_probe(struct dev *dev, struct pci_device *pci)
713
-{
714
-	struct nic *nic = (struct nic *) dev;
712
+static int r8169_probe ( struct dev *dev ) {
713
+
714
+	struct nic *nic = nic_device ( dev );
715
+
716
+	struct pci_device *pci = pci_device ( dev );
715 717
 	static int board_idx = -1;
716 718
 	static int printed_version = 0;
717 719
 	int i, rc;

+ 5
- 3
src/drivers/net/rtl8139.c Datei anzeigen

@@ -182,9 +182,11 @@ static void rtl_disable(struct dev *);
182 182
 static void rtl_irq(struct nic *nic, irq_action_t action);
183 183
 
184 184
 
185
-static int rtl8139_probe(struct dev *dev, struct pci_device *pci)
186
-{
187
-	struct nic *nic = (struct nic *)dev;
185
+static int rtl8139_probe ( struct dev *dev ) {
186
+
187
+	struct nic *nic = nic_device ( dev );
188
+
189
+	struct pci_device *pci = pci_device ( dev );
188 190
 	int i;
189 191
 	int speed10, fullduplex;
190 192
 	int addr_len;

+ 5
- 3
src/drivers/net/sis900.c Datei anzeigen

@@ -307,9 +307,11 @@ static int sis635_get_mac_addr(struct pci_device * pci_dev __unused, struct nic
307 307
  * Returns:   struct nic *:          pointer to NIC data structure
308 308
  */
309 309
 
310
-static int sis900_probe(struct dev *dev, struct pci_device *pci)
311
-{
312
-    struct nic *nic = (struct nic *)dev;
310
+static int sis900_probe ( struct dev *dev ) {
311
+
312
+    struct nic *nic = nic_device ( dev );
313
+
314
+    struct pci_device *pci = pci_device ( dev );
313 315
     int i;
314 316
     int found=0;
315 317
     int phy_addr;

+ 5
- 3
src/drivers/net/skel.c Datei anzeigen

@@ -134,9 +134,11 @@ PROBE - Look for an adapter, this routine's visible to the outside
134 134
 
135 135
 #define board_found 1
136 136
 #define valid_link 0
137
-static int skel_probe(struct dev *dev, struct pci_device *pci)
138
-{
139
-	struct nic *nic = (struct nic *)dev;
137
+static int skel_probe ( struct dev *dev ) {
138
+
139
+	struct nic *nic = nic_device ( dev );
140
+
141
+	struct pci_device *pci = pci_device ( dev );
140 142
 
141 143
 	if (board_found && valid_link)
142 144
 	{

+ 5
- 3
src/drivers/net/sundance.c Datei anzeigen

@@ -577,9 +577,11 @@ static void sundance_disable(struct dev *dev __unused)
577 577
 /**************************************************************************
578 578
 PROBE - Look for an adapter, this routine's visible to the outside
579 579
 ***************************************************************************/
580
-static int sundance_probe(struct dev *dev, struct pci_device *pci)
581
-{
582
-	struct nic *nic = (struct nic *) dev;
580
+static int sundance_probe ( struct dev *dev ) {
581
+
582
+	struct nic *nic = nic_device ( dev );
583
+
584
+	struct pci_device *pci = pci_device ( dev );
583 585
 	u8 ee_data[EEPROM_SIZE];
584 586
 	u16 mii_ctl;
585 587
 	int i;

+ 5
- 3
src/drivers/net/tg3.c Datei anzeigen

@@ -3224,9 +3224,11 @@ static void tg3_irq(struct nic *nic __unused, irq_action_t action __unused)
3224 3224
 PROBE - Look for an adapter, this routine's visible to the outside
3225 3225
 You should omit the last argument struct pci_device * for a non-PCI NIC
3226 3226
 ***************************************************************************/
3227
-static int tg3_probe(struct dev *dev, struct pci_device *pdev)
3228
-{
3229
-	struct nic *nic = (struct nic *)dev;
3227
+static int tg3_probe ( struct dev *dev ) {
3228
+
3229
+	struct nic *nic = nic_device ( dev );
3230
+
3231
+	struct pci_device *pdev = pci_device ( dev );
3230 3232
 	struct tg3 *tp = &tg3;
3231 3233
 	unsigned long tg3reg_base, tg3reg_len;
3232 3234
 	int i, err, pm_cap;

+ 5
- 3
src/drivers/net/tlan.c Datei anzeigen

@@ -771,9 +771,11 @@ PROBE - Look for an adapter, this routine's visible to the outside
771 771
 
772 772
 #define board_found 1
773 773
 #define valid_link 0
774
-static int tlan_probe(struct dev *dev, struct pci_device *pci)
775
-{
776
-	struct nic *nic = (struct nic *) dev;
774
+static int tlan_probe ( struct dev *dev ) {
775
+
776
+	struct nic *nic = nic_device ( dev );
777
+
778
+	struct pci_device *pci = pci_device ( dev );
777 779
 	u16 data = 0;
778 780
 	int err;
779 781
 	int i;

+ 5
- 3
src/drivers/net/tulip.c Datei anzeigen

@@ -1218,9 +1218,11 @@ static void tulip_irq(struct nic *nic __unused, irq_action_t action __unused)
1218 1218
 /*********************************************************************/
1219 1219
 /* eth_probe - Look for an adapter                                   */
1220 1220
 /*********************************************************************/
1221
-static int tulip_probe(struct dev *dev, struct pci_device *pci)
1222
-{
1223
-    struct nic *nic = (struct nic *)dev;
1221
+static int tulip_probe ( struct dev *dev ) {
1222
+
1223
+    struct nic *nic = nic_device ( dev );
1224
+
1225
+    struct pci_device *pci = pci_device ( dev );
1224 1226
     u32 i;
1225 1227
     u8  chip_rev;
1226 1228
     u8 ee_data[EEPROM_SIZE];

+ 5
- 3
src/drivers/net/via-rhine.c Datei anzeigen

@@ -951,9 +951,11 @@ void rhine_irq ( struct nic *nic, irq_action_t action ) {
951 951
 }
952 952
 
953 953
 static int
954
-rhine_probe (struct dev *dev, struct pci_device *pci)
955
-{
956
-    struct nic *nic = (struct nic *)dev;
954
+rhine_probe ( struct dev *dev ) {
955
+
956
+    struct nic *nic = nic_device ( dev );
957
+
958
+    struct pci_device *pci = pci_device ( dev );
957 959
     struct rhine_private *tp = (struct rhine_private *) nic->priv_data;
958 960
     if (!pci->ioaddr)
959 961
 	return 0;

+ 5
- 3
src/drivers/net/w89c840.c Datei anzeigen

@@ -609,9 +609,11 @@ static void w89c840_irq(struct nic *nic __unused, irq_action_t action __unused)
609 609
 /**************************************************************************
610 610
 w89c840_probe - Look for an adapter, this routine's visible to the outside
611 611
 ***************************************************************************/
612
-static int w89c840_probe(struct dev *dev, struct pci_device *p)
613
-{
614
-    struct nic *nic = (struct nic *)dev;
612
+static int w89c840_probe ( struct dev *dev ) {
613
+
614
+    struct nic *nic = nic_device ( dev );
615
+
616
+    struct pci_device *p = pci_device ( dev );
615 617
     u16 sum = 0;
616 618
     int i, j;
617 619
     unsigned short value;

Laden…
Abbrechen
Speichern