fix compile breakage in drivers/net/irda/vlsi_ir.c

fix compile breakage in drivers/net/irda/vlsi_ir.c

Post by Adrian Bun » Tue, 19 Nov 2002 15:30:10



Hi Matthew,

could you check whether the patch below that does a name -> dev.name to
fix the following compile error in 2.5.48 is correct?

<--  snip  -->

...
  gcc -Wp,-MD,drivers/net/irda/.vlsi_ir.o.d -D__KERNEL__ -Iinclude -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2 -march=k6 -Iarch/i386/mach-generic -nostdinc -iwithprefix include    -DKBUILD_BASENAME=vlsi_ir -DKBUILD_MODNAME=vlsi_ir   -c -o drivers/net/irda/vlsi_ir.o drivers/net/irda/vlsi_ir.c
...
drivers/net/irda/vlsi_ir.c: In function `vlsi_proc_pdev':
drivers/net/irda/vlsi_ir.c:165: structure has no member named `name'
drivers/net/irda/vlsi_ir.c: In function `vlsi_tx_timeout':
drivers/net/irda/vlsi_ir.c:1520: structure has no member named `name'
drivers/net/irda/vlsi_ir.c: In function `vlsi_irda_probe':
drivers/net/irda/vlsi_ir.c:1768: structure has no member named `name'
drivers/net/irda/vlsi_ir.c: In function `vlsi_irda_remove':
drivers/net/irda/vlsi_ir.c:1866: structure has no member named `name'
drivers/net/irda/vlsi_ir.c: In function `vlsi_irda_save_state':
drivers/net/irda/vlsi_ir.c:1882: structure has no member named `name'
drivers/net/irda/vlsi_ir.c: In function `vlsi_irda_suspend':
drivers/net/irda/vlsi_ir.c:1895: structure has no member named `name'
drivers/net/irda/vlsi_ir.c:1899: structure has no member named `name'
drivers/net/irda/vlsi_ir.c:1911: structure has no member named `name'
drivers/net/irda/vlsi_ir.c: In function `vlsi_irda_resume':
drivers/net/irda/vlsi_ir.c:1938: structure has no member named `name'
drivers/net/irda/vlsi_ir.c:1945: structure has no member named `name'
make[3]: *** [drivers/net/irda/vlsi_ir.o] Error 1

<--  snip  -->

TIA
Adrian

--- linux-2.5.48/drivers/net/irda/vlsi_ir.c.old 2002-11-18 14:11:30.000000000 +0100

                return 0;

        out += sprintf(out, "\n%s (vid/did: %04x/%04x)\n",
-                       pdev->name, (int)pdev->vendor, (int)pdev->device);
+                       pdev->dev.name, (int)pdev->vendor, (int)pdev->device);
        out += sprintf(out, "pci-power-state: %u\n", (unsigned) pdev->current_state);
        out += sprintf(out, "resources: irq=%u / io=0x%04x / dma_mask=0x%016Lx\n",

        if (vlsi_start_hw(idev))
                printk(KERN_CRIT "%s: failed to restart hw - %s(%s) unusable!\n",
-                       __FUNCTION__, idev->pdev->name, ndev->name);
+                       __FUNCTION__, idev->pdev->dev.name, ndev->name);
        else
                netif_start_queue(ndev);

                pdev->current_state = 0; /* hw must be running now */

        printk(KERN_INFO "%s: IrDA PCI controller %s detected\n",
-               drivername, pdev->name);
+               drivername, pdev->dev.name);

        if ( !pci_resource_start(pdev,0)

         * ndev->destructor called (if present) when going to free
         */

-       printk(KERN_INFO "%s: %s removed\n", drivername, pdev->name);
+       printk(KERN_INFO "%s: %s removed\n", drivername, pdev->dev.name);
 }


 {
        if (state < 1 || state > 3 ) {
                printk( KERN_ERR "%s - %s: invalid pm state request: %u\n",
-                       __FUNCTION__, pdev->name, state);
+                       __FUNCTION__, pdev->dev.name, state);
                return -1;
        }

        if (state < 1 || state > 3 ) {
                printk( KERN_ERR "%s - %s: invalid pm state request: %u\n",
-                       __FUNCTION__, pdev->name, state);
+                       __FUNCTION__, pdev->dev.name, state);
                return 0;
        }
        if (!ndev) {
-               printk(KERN_ERR "%s - %s: no netdevice \n", __FUNCTION__, pdev->name);
+               printk(KERN_ERR "%s - %s: no netdevice \n", __FUNCTION__, pdev->dev.name);
                return 0;
        }

                }
                else
                        printk(KERN_ERR "%s - %s: invalid suspend request %u -> %u\n",
-                               __FUNCTION__, pdev->name, pdev->current_state, state);
+                               __FUNCTION__, pdev->dev.name, pdev->current_state, state);
                up(&idev->sem);
                return 0;

        vlsi_irda_dev_t *idev;

        if (!ndev) {
-               printk(KERN_ERR "%s - %s: no netdevice \n", __FUNCTION__, pdev->name);
+               printk(KERN_ERR "%s - %s: no netdevice \n", __FUNCTION__, pdev->dev.name);
                return 0;
        }
        idev = ndev->priv;  
        down(&idev->sem);
        if (pdev->current_state == 0) {
                up(&idev->sem);
-               printk(KERN_ERR "%s - %s: already resumed\n", __FUNCTION__, pdev->name);
+               printk(KERN_ERR "%s - %s: already resumed\n", __FUNCTION__, pdev->dev.name);
                return 0;
        }

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

1. 2.5.45 drivers/net/irda/irda-usb.c Compile Fix

Fixes an apparent typo in irda-usb.c that prevented it from compiling.

[ linux-2.4.45-irda-usb.patch < 1K ]
--- drivers/net/irda/irda-usb.c.orig    2002-10-30 22:16:48.000000000 -0500

         * specify an alternate, but very few driver do like this.
         * Jean II */
        ret = usb_set_interface(dev, intf->altsetting->desc.bInterfaceNumber, 0);
-       IRDA_DEBUG(1, "usb-irda: set interface %d result %d\n", intf->altsetting->bInterfaceNumber, ret);
+       IRDA_DEBUG(1, "usb-irda: set interface %d result %d\n", intf->altsetting->desc.bInterfaceNumber, ret);
        switch (ret) {
                case 0:
                        break;

2. A Question for COLA - Put it to the vote.

3. fix compile breakage in drivers/net/arcnet/com20020-pci.c

4. viewing the whole Card database for xf86config

5. 2.5.34 : drivers/net/irda/irtty.c __FUNCTION__ fix

6. What's going on here?

7. fix compile breakage on drivers/scsi/ibmmca.c

8. Script to flash archive

9. fix compile breakage in drivers/input/gameport

10. fix compile breakage on drivers/scsi/fd_mcs.c

11. fix compile breakage on drivers/scsi/NCR53c406a.c

12. fix compile breakage on drivers/scsi/seagate.c

13. fix compile breakage on drivers/scsi/wd7000.c