cpint-2.5.3-kernel.patch 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. --- cpint-2.5.3/cpint.c
  2. +++ cpint-2.5.3/cpint.c
  3. @@ -131,7 +131,7 @@
  4. CPInt_Dev *cpint_devices;
  5. -static struct class_simple *cpint_class;
  6. +static struct class *cpint_class;
  7. /*----------------------------------------------------------*/
  8. /* The different file operations */
  9. @@ -309,7 +309,7 @@
  10. /*------------------------------------------------------*/
  11. /* Register this device class */
  12. /*------------------------------------------------------*/
  13. - cpint_class = class_simple_create(THIS_MODULE, "cpint");
  14. + cpint_class = class_create(THIS_MODULE, "cpint");
  15. if (IS_ERR(cpint_class)) {
  16. printk(KERN_ERR "Error creating cpint class.\n");
  17. kfree(cpint_devices);
  18. @@ -325,7 +325,7 @@
  19. fopIdx = fopMap[i_dev];
  20. if (fopIdx > -1 && !(cpint_devs_map & (1 << fopIdx))) {
  21. - class_simple_device_add(cpint_class,
  22. + class_device_create(cpint_class, NULL,
  23. MKDEV(cpint_major, i_dev), NULL,
  24. cpNames[fopIdx]);
  25. cpint_devs_map |= 1 << fopIdx;
  26. @@ -386,11 +386,11 @@
  27. fopIdx = fopMap[i_dev];
  28. if (fopIdx > -1 && (cpint_devs_map & (1 << fopIdx))) {
  29. - class_simple_device_remove(MKDEV(cpint_major, i_dev));
  30. + class_device_destroy(cpint_class, MKDEV(cpint_major, i_dev));
  31. }
  32. }
  33. cpint_devs_map = 0;
  34. - class_simple_destroy(cpint_class);
  35. + class_destroy(cpint_class);
  36. unregister_chrdev(cpint_major, "cpint");
  37. for (i_dev = 0; i_dev < CPINT_NR_DEVS; i_dev++) {