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
 /**************************************************************************
467
 /**************************************************************************
468
 ETH_PROBE - Look for an adapter
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
 	int i;
475
 	int i;
474
 	unsigned short *p;
476
 	unsigned short *p;
475
 
477
 

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

688
  *** initialization.  If this routine is called, the pci functions did find the
688
  *** initialization.  If this routine is called, the pci functions did find the
689
  *** card.  We just have to init it here.
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
     int i, c;
696
     int i, c;
695
     unsigned short eeprom[0x21];
697
     unsigned short eeprom[0x21];
696
     unsigned int cfg;
698
     unsigned int cfg;

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

654
 /*********************************************************************/
654
 /*********************************************************************/
655
 /* eth_probe - Look for an adapter                                   */
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
   unsigned int i;
662
   unsigned int i;
661
 
663
 
662
   whereami("davicom_probe\n");
664
   whereami("davicom_probe\n");

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

461
 
461
 
462
 #define board_found 1
462
 #define board_found 1
463
 #define valid_link 0
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
 	uint32_t dev_rev, pci_pmr;
469
 	uint32_t dev_rev, pci_pmr;
468
 	int i;
470
 	int i;
469
 
471
 

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

3580
 PROBE - Look for an adapter, this routine's visible to the outside
3580
 PROBE - Look for an adapter, this routine's visible to the outside
3581
 You should omit the last argument struct pci_device * for a non-PCI NIC
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
 	unsigned long mmio_start, mmio_len;
3588
 	unsigned long mmio_start, mmio_len;
3587
 	int ret_val, i;
3589
 	int ret_val, i;
3588
 
3590
 

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

601
  *            leaves the 82557 initialized, and ready to recieve packets.
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
 	unsigned short sum = 0;
609
 	unsigned short sum = 0;
608
 	int i;
610
 	int i;
609
 	int read_cmd, ee_size;
611
 	int read_cmd, ee_size;

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

95
 
95
 
96
 
96
 
97
     static int
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
     int i;
103
     int i;
102
     unsigned short* ap;
104
     unsigned short* ap;
103
     unsigned int phy, phy_idx;
105
     unsigned int phy, phy_idx;

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

925
 #define IORESOURCE_MEM 0x00000200
925
 #define IORESOURCE_MEM 0x00000200
926
 #define board_found 1
926
 #define board_found 1
927
 #define valid_link 0
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
 	unsigned long addr;
933
 	unsigned long addr;
932
 	int sz;
934
 	int sz;
933
 	u8 *base;
935
 	u8 *base;

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

663
 PROBE - Look for an adapter, this routine's visible to the outside
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
     int i;
671
     int i;
670
 
672
 
671
     if (pci->ioaddr == 0)
673
     if (pci->ioaddr == 0)

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

240
  */
240
  */
241
 
241
 
242
 static int
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
     int i;
248
     int i;
247
     int prev_eedata;
249
     int prev_eedata;
248
     u32 tmp;
250
     u32 tmp;

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

811
 
811
 
812
 #define board_found 1
812
 #define board_found 1
813
 #define valid_link 0
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
 	int sz;
819
 	int sz;
818
 	long addr;
820
 	long addr;
819
 	int using_dac = 0;
821
 	int using_dac = 0;

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

665
 PROBE - Look for an adapter, this routine's visible to the outside
665
 PROBE - Look for an adapter, this routine's visible to the outside
666
 You should omit the last argument struct pci_device * for a non-PCI NIC
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
 	int i, media;
673
 	int i, media;
672
 	int fdx, mii, fset, dxsuflo, ltint;
674
 	int fdx, mii, fset, dxsuflo, ltint;
673
 	int chip_version;
675
 	int chip_version;

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

709
 
709
 
710
 #define board_found 1
710
 #define board_found 1
711
 #define valid_link 0
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
 	static int board_idx = -1;
717
 	static int board_idx = -1;
716
 	static int printed_version = 0;
718
 	static int printed_version = 0;
717
 	int i, rc;
719
 	int i, rc;

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

182
 static void rtl_irq(struct nic *nic, irq_action_t action);
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
 	int i;
190
 	int i;
189
 	int speed10, fullduplex;
191
 	int speed10, fullduplex;
190
 	int addr_len;
192
 	int addr_len;

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

307
  * Returns:   struct nic *:          pointer to NIC data structure
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
     int i;
315
     int i;
314
     int found=0;
316
     int found=0;
315
     int phy_addr;
317
     int phy_addr;

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

134
 
134
 
135
 #define board_found 1
135
 #define board_found 1
136
 #define valid_link 0
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
 	if (board_found && valid_link)
143
 	if (board_found && valid_link)
142
 	{
144
 	{

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

577
 /**************************************************************************
577
 /**************************************************************************
578
 PROBE - Look for an adapter, this routine's visible to the outside
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
 	u8 ee_data[EEPROM_SIZE];
585
 	u8 ee_data[EEPROM_SIZE];
584
 	u16 mii_ctl;
586
 	u16 mii_ctl;
585
 	int i;
587
 	int i;

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

3224
 PROBE - Look for an adapter, this routine's visible to the outside
3224
 PROBE - Look for an adapter, this routine's visible to the outside
3225
 You should omit the last argument struct pci_device * for a non-PCI NIC
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
 	struct tg3 *tp = &tg3;
3232
 	struct tg3 *tp = &tg3;
3231
 	unsigned long tg3reg_base, tg3reg_len;
3233
 	unsigned long tg3reg_base, tg3reg_len;
3232
 	int i, err, pm_cap;
3234
 	int i, err, pm_cap;

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

771
 
771
 
772
 #define board_found 1
772
 #define board_found 1
773
 #define valid_link 0
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
 	u16 data = 0;
779
 	u16 data = 0;
778
 	int err;
780
 	int err;
779
 	int i;
781
 	int i;

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

1218
 /*********************************************************************/
1218
 /*********************************************************************/
1219
 /* eth_probe - Look for an adapter                                   */
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
     u32 i;
1226
     u32 i;
1225
     u8  chip_rev;
1227
     u8  chip_rev;
1226
     u8 ee_data[EEPROM_SIZE];
1228
     u8 ee_data[EEPROM_SIZE];

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

951
 }
951
 }
952
 
952
 
953
 static int
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
     struct rhine_private *tp = (struct rhine_private *) nic->priv_data;
959
     struct rhine_private *tp = (struct rhine_private *) nic->priv_data;
958
     if (!pci->ioaddr)
960
     if (!pci->ioaddr)
959
 	return 0;
961
 	return 0;

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

609
 /**************************************************************************
609
 /**************************************************************************
610
 w89c840_probe - Look for an adapter, this routine's visible to the outside
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
     u16 sum = 0;
617
     u16 sum = 0;
616
     int i, j;
618
     int i, j;
617
     unsigned short value;
619
     unsigned short value;

Laden…
Abbrechen
Speichern