diff options
| -rw-r--r-- | drivers/cpufreq/ti-cpufreq.c | 26 | ||||
| -rw-r--r-- | fs/exec.c | 5 |
2 files changed, 24 insertions, 7 deletions
diff --git a/drivers/cpufreq/ti-cpufreq.c b/drivers/cpufreq/ti-cpufreq.c index 3f0e2a14895a..22b53bf26817 100644 --- a/drivers/cpufreq/ti-cpufreq.c +++ b/drivers/cpufreq/ti-cpufreq.c | |||
| @@ -201,19 +201,28 @@ static const struct of_device_id ti_cpufreq_of_match[] = { | |||
| 201 | {}, | 201 | {}, |
| 202 | }; | 202 | }; |
| 203 | 203 | ||
| 204 | static const struct of_device_id *ti_cpufreq_match_node(void) | ||
| 205 | { | ||
| 206 | struct device_node *np; | ||
| 207 | const struct of_device_id *match; | ||
| 208 | |||
| 209 | np = of_find_node_by_path("/"); | ||
| 210 | match = of_match_node(ti_cpufreq_of_match, np); | ||
| 211 | of_node_put(np); | ||
| 212 | |||
| 213 | return match; | ||
| 214 | } | ||
| 215 | |||
| 204 | static int ti_cpufreq_probe(struct platform_device *pdev) | 216 | static int ti_cpufreq_probe(struct platform_device *pdev) |
| 205 | { | 217 | { |
| 206 | u32 version[VERSION_COUNT]; | 218 | u32 version[VERSION_COUNT]; |
| 207 | struct device_node *np; | ||
| 208 | const struct of_device_id *match; | 219 | const struct of_device_id *match; |
| 209 | struct opp_table *ti_opp_table; | 220 | struct opp_table *ti_opp_table; |
| 210 | struct ti_cpufreq_data *opp_data; | 221 | struct ti_cpufreq_data *opp_data; |
| 211 | const char * const reg_names[] = {"vdd", "vbb"}; | 222 | const char * const reg_names[] = {"vdd", "vbb"}; |
| 212 | int ret; | 223 | int ret; |
| 213 | 224 | ||
| 214 | np = of_find_node_by_path("/"); | 225 | match = dev_get_platdata(&pdev->dev); |
| 215 | match = of_match_node(ti_cpufreq_of_match, np); | ||
| 216 | of_node_put(np); | ||
| 217 | if (!match) | 226 | if (!match) |
| 218 | return -ENODEV; | 227 | return -ENODEV; |
| 219 | 228 | ||
| @@ -290,7 +299,14 @@ fail_put_node: | |||
| 290 | 299 | ||
| 291 | static int ti_cpufreq_init(void) | 300 | static int ti_cpufreq_init(void) |
| 292 | { | 301 | { |
| 293 | platform_device_register_simple("ti-cpufreq", -1, NULL, 0); | 302 | const struct of_device_id *match; |
| 303 | |||
| 304 | /* Check to ensure we are on a compatible platform */ | ||
| 305 | match = ti_cpufreq_match_node(); | ||
| 306 | if (match) | ||
| 307 | platform_device_register_data(NULL, "ti-cpufreq", -1, match, | ||
| 308 | sizeof(*match)); | ||
| 309 | |||
| 294 | return 0; | 310 | return 0; |
| 295 | } | 311 | } |
| 296 | module_init(ti_cpufreq_init); | 312 | module_init(ti_cpufreq_init); |
| @@ -62,6 +62,7 @@ | |||
| 62 | #include <linux/oom.h> | 62 | #include <linux/oom.h> |
| 63 | #include <linux/compat.h> | 63 | #include <linux/compat.h> |
| 64 | #include <linux/vmalloc.h> | 64 | #include <linux/vmalloc.h> |
| 65 | #include <linux/freezer.h> | ||
| 65 | 66 | ||
| 66 | #include <linux/uaccess.h> | 67 | #include <linux/uaccess.h> |
| 67 | #include <asm/mmu_context.h> | 68 | #include <asm/mmu_context.h> |
| @@ -1083,7 +1084,7 @@ static int de_thread(struct task_struct *tsk) | |||
| 1083 | while (sig->notify_count) { | 1084 | while (sig->notify_count) { |
| 1084 | __set_current_state(TASK_KILLABLE); | 1085 | __set_current_state(TASK_KILLABLE); |
| 1085 | spin_unlock_irq(lock); | 1086 | spin_unlock_irq(lock); |
| 1086 | schedule(); | 1087 | freezable_schedule(); |
| 1087 | if (unlikely(__fatal_signal_pending(tsk))) | 1088 | if (unlikely(__fatal_signal_pending(tsk))) |
| 1088 | goto killed; | 1089 | goto killed; |
| 1089 | spin_lock_irq(lock); | 1090 | spin_lock_irq(lock); |
| @@ -1111,7 +1112,7 @@ static int de_thread(struct task_struct *tsk) | |||
| 1111 | __set_current_state(TASK_KILLABLE); | 1112 | __set_current_state(TASK_KILLABLE); |
| 1112 | write_unlock_irq(&tasklist_lock); | 1113 | write_unlock_irq(&tasklist_lock); |
| 1113 | cgroup_threadgroup_change_end(tsk); | 1114 | cgroup_threadgroup_change_end(tsk); |
| 1114 | schedule(); | 1115 | freezable_schedule(); |
| 1115 | if (unlikely(__fatal_signal_pending(tsk))) | 1116 | if (unlikely(__fatal_signal_pending(tsk))) |
| 1116 | goto killed; | 1117 | goto killed; |
| 1117 | } | 1118 | } |
