1 diff -Nur a/Embedded/src/CAN/can_main.c b/Embedded/src/CAN/can_main.c
2 --- a/Embedded/src/CAN/can_main.c 2009-11-30 10:44:39.044269751 +0100
3 +++ b/Embedded/src/CAN/can_main.c 2009-11-30 10:54:41.434355642 +0100
5 spin_lock_init(&(g_can_os[can_num].int_spinlock));
6 spin_lock_init(&(g_can_os[can_num].open_spinlock));
8 - dev->dev.driver_data = (void *) &(g_can_os[can_num]);
9 - if (!dev->dev.driver_data)
10 + dev_set_drvdata(&dev->dev, (void *) &(g_can_os[can_num]));
11 + if (!dev_get_drvdata(&dev->dev))
13 printk("Couldn't create CAN device %d. Exiting.\n",
16 *****************************************************************************/
17 void can_pci_remove(struct pci_dev *dev)
19 - can_os_t *can_os = dev->dev.driver_data;
20 + can_os_t *can_os = dev_get_drvdata(&dev->dev);
22 iounmap(can_os->pci_remap);
23 icp_can_destroy(can_os->can);
27 unsigned int int_status;
28 - can_os_t *can_os = dev->dev.driver_data;
29 + can_os_t *can_os = dev_get_drvdata(&dev->dev);
32 /* Indicate that we are suspending */
34 int can_pci_resume(struct pci_dev *dev)
37 - can_os_t *can_os = dev->dev.driver_data;
38 + can_os_t *can_os = dev_get_drvdata(&dev->dev);
40 /* Restore PCI CFG space */
41 pci_restore_state(dev);