From: Vojtech P. <vo...@us...> - 2002-07-01 15:39:34
|
Update of /cvsroot/linuxconsole/ruby/linux/drivers/input/gameport In directory usw-pr-cvs1:/tmp/cvs-serv14910/drivers/input/gameport Modified Files: cs461x.c vortex.c emu10k1-gp.c Log Message: Fix search-and-replace in emu. Cleanup pci provate member handling in cs461x, vortex and emu. Index: cs461x.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/input/gameport/cs461x.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- cs461x.c 22 Jan 2002 19:38:19 -0000 1.1 +++ cs461x.c 1 Jul 2002 15:39:30 -0000 1.2 @@ -159,7 +159,7 @@ static int cs461x_free(struct pci_dev *pdev) { - struct gameport *port = (struct gameport *)pdev->driver_data; + struct gameport *port = pci_get_drvdata(pdev); if(port){ gameport_unregister_port(port); kfree(port); @@ -280,7 +280,7 @@ } memset(port, 0, sizeof(struct gameport)); - pdev->driver_data = port; + pci_set_drvdata(pdev, port); port->open = cs461x_gameport_open; port->trigger = cs461x_gameport_trigger; Index: vortex.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/input/gameport/vortex.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- vortex.c 24 Jan 2002 19:51:25 -0000 1.4 +++ vortex.c 1 Jul 2002 15:39:30 -0000 1.5 @@ -117,7 +117,7 @@ vortex->dev = dev; sprintf(vortex->phys, "pci%s/gameport0", dev->slot_name); - dev->driver_data = vortex; + pci_set_drvdata(dev, vortex); vortex->gameport.driver = vortex; vortex->gameport.fuzz = 64; @@ -153,7 +153,7 @@ static void __devexit vortex_remove(struct pci_dev *dev) { - struct vortex *vortex = dev->driver_data; + struct vortex *vortex = pci_get_drvdata(dev); gameport_unregister_port(&vortex->gameport); iounmap(vortex->base); kfree(vortex); Index: emu10k1-gp.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/input/gameport/emu10k1-gp.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- emu10k1-gp.c 22 Jan 2002 20:40:46 -0000 1.8 +++ emu10k1-gp.c 1 Jul 2002 15:39:30 -0000 1.9 @@ -60,21 +60,21 @@ static int __devinit emu_probe(struct pci_dev *pdev, const struct pci_device_id *ent) { - int ioemu, iolen; + int ioport, iolen; struct emu *emu; if (pci_enable_device(pdev)) return -EBUSY; - ioemu = pci_resource_start(pdev, 0); + ioport = pci_resource_start(pdev, 0); iolen = pci_resource_len(pdev, 0); - if (!request_region(ioemu, iolen, "emu10k1-gp")) + if (!request_region(ioport, iolen, "emu10k1-gp")) return -EBUSY; if (!(emu = kmalloc(sizeof(struct emu), GFP_KERNEL))) { printk(KERN_ERR "emu10k1-gp: Memory allocation failed.\n"); - release_region(ioemu, iolen); + release_region(ioport, iolen); return -ENOMEM; } memset(emu, 0, sizeof(struct emu)); @@ -84,14 +84,14 @@ emu->size = iolen; emu->dev = pdev; - emu->gameport.io = ioemu; + emu->gameport.io = ioport; emu->gameport.name = pdev->name; emu->gameport.phys = emu->phys; emu->gameport.idbus = BUS_PCI; emu->gameport.idvendor = pdev->vendor; emu->gameport.idproduct = pdev->device; - pdev->driver_data = emu; + pci_set_drvdata(pdev, emu); gameport_register_port(&emu->gameport); @@ -103,7 +103,7 @@ static void __devexit emu_remove(struct pci_dev *pdev) { - struct emu *emu = (void *)pdev->driver_data; + struct emu *emu = pci_get_drvdata(pdev); gameport_unregister_port(&emu->gameport); release_region(emu->gameport.io, emu->size); kfree(emu); |