patch-2.4.15 linux/drivers/char/joystick/cs461x.c

Next file: linux/drivers/char/joystick/emu10k1-gp.c
Previous file: linux/drivers/char/isicom.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.14/linux/drivers/char/joystick/cs461x.c linux/drivers/char/joystick/cs461x.c
@@ -158,7 +158,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);
@@ -284,7 +284,7 @@
 	}
 	memset(port, 0, sizeof(struct gameport));
 
-	pdev->driver_data = port;
+	pci_set_drvdata(pdev, port);
 	
 	port->open = cs461x_gameport_open;
 	port->read = cs461x_gameport_read;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)