patch-drivers_isdn_hardware_mISDN_debugtool_c 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. - big kernel lock unavailable
  2. - CLASS_ATTR callbacks changed signature
  3. --- mISDN-1_1_9_2.orig/drivers/isdn/hardware/mISDN/debugtool.c 2009-01-22 14:36:34.000000000 +0100
  4. +++ mISDN-1_1_9_2/drivers/isdn/hardware/mISDN/debugtool.c 2011-07-11 14:46:28.845001528 +0200
  5. @@ -121,11 +121,11 @@ static void dt_run (void)
  6. struct socket *sock;
  7. struct sockaddr_in addr;
  8. - lock_kernel();
  9. + //lock_kernel();
  10. current->flags |= PF_NOFREEZE;
  11. daemonize(MODULE_NAME);
  12. allow_signal(SIGKILL);
  13. - unlock_kernel();
  14. + //unlock_kernel();
  15. /* init socket */
  16. ret = sock_create(AF_INET, SOCK_DGRAM, IPPROTO_UDP, &sock);
  17. @@ -181,12 +181,12 @@ static struct class dt_class = {
  18. #endif
  19. };
  20. -static ssize_t attr_show_enabled (struct class *class, char *buf)
  21. +static ssize_t attr_show_enabled (struct class *class, struct class_attribute *attr, char *buf)
  22. {
  23. return sprintf(buf, "%d\n", dt_enabled);
  24. }
  25. -static ssize_t attr_store_enabled (struct class *class, const char *buf, size_t count)
  26. +static ssize_t attr_store_enabled (struct class *class, struct class_attribute *attr, const char *buf, size_t count)
  27. {
  28. if (count > 0 && *buf == '1') {
  29. mISDN_dt_enable();
  30. @@ -241,13 +241,13 @@ void __exit dt_exit(void)
  31. mISDN_module_unregister(THIS_MODULE);
  32. if (thread) {
  33. - lock_kernel();
  34. + //lock_kernel();
  35. #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
  36. ret = kill_pid(find_pid_ns(thread->pid, &init_pid_ns), SIGKILL, 1);
  37. #else
  38. ret = kill_proc(thread->pid, SIGKILL, 1);
  39. #endif
  40. - unlock_kernel();
  41. + //unlock_kernel();
  42. if (ret < 0)
  43. printk(KERN_INFO MODULE_NAME ": Unknown error (%d) while trying to terminate kernel thread!\n", -ret);
  44. wake_up_interruptible(&skb_q_wait);