SHARE
TWEET

Untitled

a guest Aug 13th, 2017 53 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. diff -Nrupad /home/user/android/teamhacksung_sammy-cm7//drivers/acpi/sleep.c ./drivers/acpi/sleep.c
  2. --- /home/user/android/teamhacksung_sammy-cm7//drivers/acpi/sleep.c 2011-04-19 00:17:08.394072081 +0200
  3. +++ ./drivers/acpi/sleep.c  2011-04-23 00:11:48.127721983 +0200
  4. @@ -144,7 +144,8 @@ static int acpi_pm_prepare(void)
  5.     int error = __acpi_pm_prepare();
  6.  
  7.     if (!error)
  8. -       acpi_pm_freeze();
  9. +/*     acpi_pm_freeze(); - used is: acpi_pm_pre_suspend() */
  10. +       error = acpi_pm_freeze();
  11.  
  12.     return error;
  13.  }
  14. @@ -520,8 +521,7 @@ static int acpi_hibernation_begin_old(vo
  15.  static int acpi_hibernation_pre_snapshot_old(void)
  16.  {
  17.     acpi_pm_freeze();
  18. -   suspend_nvs_save();
  19. -   return 0;
  20. +   return suspend_nvs_save();
  21.  }
  22.  
  23.  /*
  24. diff -Nrupad /home/user/android/teamhacksung_sammy-cm7//drivers/acpi/sleep.c.rej ./drivers/acpi/sleep.c.rej
  25. --- /home/user/android/teamhacksung_sammy-cm7//drivers/acpi/sleep.c.rej 1970-01-01 01:00:00.000000000 +0100
  26. +++ ./drivers/acpi/sleep.c.rej  2011-04-23 00:08:02.639721872 +0200
  27. @@ -0,0 +1,11 @@
  28. +--- drivers/acpi/sleep.c
  29. ++++ drivers/acpi/sleep.c
  30. +@@ -150,7 +149,7 @@
  31. + {
  32. +   int error = __acpi_pm_prepare();
  33. +   if (!error)
  34. +-      acpi_pm_pre_suspend();          [acpi_pm_freeze]
  35. ++      error = acpi_pm_pre_suspend();     
  36. +
  37. +   return error;
  38. + }
  39. diff -Nrupad /home/user/android/teamhacksung_sammy-cm7//include/linux/suspend.h ./include/linux/suspend.h
  40. --- /home/user/android/teamhacksung_sammy-cm7//include/linux/suspend.h  2011-04-19 00:17:10.527072081 +0200
  41. +++ ./include/linux/suspend.h   2011-04-23 00:06:25.560721834 +0200
  42. @@ -260,7 +260,7 @@ static inline bool system_entering_hiber
  43.  extern int suspend_nvs_register(unsigned long start, unsigned long size);
  44.  extern int suspend_nvs_alloc(void);
  45.  extern void suspend_nvs_free(void);
  46. -extern void suspend_nvs_save(void);
  47. +extern int suspend_nvs_save(void);
  48.  extern void suspend_nvs_restore(void);
  49.  #else /* CONFIG_SUSPEND_NVS */
  50.  static inline int suspend_nvs_register(unsigned long a, unsigned long b)
  51. @@ -269,7 +269,7 @@ static inline int suspend_nvs_register(u
  52.  }
  53.  static inline int suspend_nvs_alloc(void) { return 0; }
  54.  static inline void suspend_nvs_free(void) {}
  55. -static inline void suspend_nvs_save(void) {}
  56. +static inline int suspend_nvs_save(void) {}
  57.  static inline void suspend_nvs_restore(void) {}
  58.  #endif /* CONFIG_SUSPEND_NVS */
  59.  
  60. diff -Nrupad /home/user/android/teamhacksung_sammy-cm7//kernel/power/nvs.c ./kernel/power/nvs.c
  61. --- /home/user/android/teamhacksung_sammy-cm7//kernel/power/nvs.c   2011-04-19 00:17:10.625072081 +0200
  62. +++ ./kernel/power/nvs.c    2011-04-23 00:06:25.560721834 +0200
  63. @@ -105,7 +105,7 @@ int suspend_nvs_alloc(void)
  64.  /**
  65.   * suspend_nvs_save - save NVS memory regions
  66.   */
  67. -void suspend_nvs_save(void)
  68. +int suspend_nvs_save(void)
  69.  {
  70.     struct nvs_page *entry;
  71.  
  72. @@ -114,8 +114,14 @@ void suspend_nvs_save(void)
  73.     list_for_each_entry(entry, &nvs_list, node)
  74.         if (entry->data) {
  75.             entry->kaddr = ioremap(entry->phys_start, entry->size);
  76. +           if (!entry->kaddr) {
  77. +               suspend_nvs_free();
  78. +               return -ENOMEM;
  79. +           }
  80.             memcpy(entry->data, entry->kaddr, entry->size);
  81.         }
  82. +
  83. +   return 0;
  84.  }
  85.  
  86.  /**
  87. diff -Nrupad /home/user/android/teamhacksung_sammy-cm7//kernel/printk.c ./kernel/printk.c
  88. --- /home/user/android/teamhacksung_sammy-cm7//kernel/printk.c  2011-04-19 00:17:10.627072081 +0200
  89. +++ ./kernel/printk.c   2011-04-23 00:26:55.076722431 +0200
  90. @@ -1125,7 +1125,7 @@ int update_console_cmdline(char *name, i
  91.     return -1;
  92.  }
  93.  
  94. -int console_suspend_enabled = 1;
  95. +int console_suspend_enabled = 0;
  96.  EXPORT_SYMBOL(console_suspend_enabled);
  97.  
  98.  static int __init console_suspend_disable(char *str)
RAW Paste Data
Top