powernow-k8.c (6a33fc8cacfc7fac829c72bd321868be7e72f609) | powernow-k8.c (d5b73cd870e2b049ef566aec2791dbf5fd26a7ec) |
---|---|
1/* 2 * (c) 2003-2012 Advanced Micro Devices, Inc. 3 * Your use of this code is subject to the terms and conditions of the 4 * GNU general public license version 2. See "COPYING" or 5 * http://www.gnu.org/licenses/gpl.html 6 * 7 * Maintainer: 8 * Andreas Herrmann <herrmann.der.user@googlemail.com> --- 609 unchanged lines hidden (view full) --- 618 if (data->numps < 2) { 619 printk(KERN_ERR PFX "no p states to transition\n"); 620 return -ENODEV; 621 } 622 623 if (check_pst_table(data, pst, maxvid)) 624 return -EINVAL; 625 | 1/* 2 * (c) 2003-2012 Advanced Micro Devices, Inc. 3 * Your use of this code is subject to the terms and conditions of the 4 * GNU general public license version 2. See "COPYING" or 5 * http://www.gnu.org/licenses/gpl.html 6 * 7 * Maintainer: 8 * Andreas Herrmann <herrmann.der.user@googlemail.com> --- 609 unchanged lines hidden (view full) --- 618 if (data->numps < 2) { 619 printk(KERN_ERR PFX "no p states to transition\n"); 620 return -ENODEV; 621 } 622 623 if (check_pst_table(data, pst, maxvid)) 624 return -EINVAL; 625 |
626 powernow_table = kmalloc((sizeof(struct cpufreq_frequency_table) | 626 powernow_table = kmalloc((sizeof(*powernow_table) |
627 * (data->numps + 1)), GFP_KERNEL); 628 if (!powernow_table) { 629 printk(KERN_ERR PFX "powernow_table memory alloc failure\n"); 630 return -ENOMEM; 631 } 632 633 for (j = 0; j < data->numps; j++) { 634 int freq; --- 153 unchanged lines hidden (view full) --- 788 if ((control != ACPI_ADR_SPACE_FIXED_HARDWARE) || 789 (status != ACPI_ADR_SPACE_FIXED_HARDWARE)) { 790 pr_debug("Invalid control/status registers (%llx - %llx)\n", 791 control, status); 792 goto err_out; 793 } 794 795 /* fill in data->powernow_table */ | 627 * (data->numps + 1)), GFP_KERNEL); 628 if (!powernow_table) { 629 printk(KERN_ERR PFX "powernow_table memory alloc failure\n"); 630 return -ENOMEM; 631 } 632 633 for (j = 0; j < data->numps; j++) { 634 int freq; --- 153 unchanged lines hidden (view full) --- 788 if ((control != ACPI_ADR_SPACE_FIXED_HARDWARE) || 789 (status != ACPI_ADR_SPACE_FIXED_HARDWARE)) { 790 pr_debug("Invalid control/status registers (%llx - %llx)\n", 791 control, status); 792 goto err_out; 793 } 794 795 /* fill in data->powernow_table */ |
796 powernow_table = kmalloc((sizeof(struct cpufreq_frequency_table) | 796 powernow_table = kmalloc((sizeof(*powernow_table) |
797 * (data->acpi_data.state_count + 1)), GFP_KERNEL); 798 if (!powernow_table) { 799 pr_debug("powernow_table memory alloc failure\n"); 800 goto err_out; 801 } 802 803 /* fill in data */ 804 data->numps = data->acpi_data.state_count; --- 296 unchanged lines hidden (view full) --- 1101 struct powernow_k8_data *data; 1102 struct init_on_cpu init_on_cpu; 1103 int rc; 1104 1105 smp_call_function_single(pol->cpu, check_supported_cpu, &rc, 1); 1106 if (rc) 1107 return -ENODEV; 1108 | 797 * (data->acpi_data.state_count + 1)), GFP_KERNEL); 798 if (!powernow_table) { 799 pr_debug("powernow_table memory alloc failure\n"); 800 goto err_out; 801 } 802 803 /* fill in data */ 804 data->numps = data->acpi_data.state_count; --- 296 unchanged lines hidden (view full) --- 1101 struct powernow_k8_data *data; 1102 struct init_on_cpu init_on_cpu; 1103 int rc; 1104 1105 smp_call_function_single(pol->cpu, check_supported_cpu, &rc, 1); 1106 if (rc) 1107 return -ENODEV; 1108 |
1109 data = kzalloc(sizeof(struct powernow_k8_data), GFP_KERNEL); | 1109 data = kzalloc(sizeof(*data), GFP_KERNEL); |
1110 if (!data) { 1111 printk(KERN_ERR PFX "unable to alloc powernow_k8_data"); 1112 return -ENOMEM; 1113 } 1114 1115 data->cpu = pol->cpu; 1116 1117 if (powernow_k8_cpu_init_acpi(data)) { --- 199 unchanged lines hidden --- | 1110 if (!data) { 1111 printk(KERN_ERR PFX "unable to alloc powernow_k8_data"); 1112 return -ENOMEM; 1113 } 1114 1115 data->cpu = pol->cpu; 1116 1117 if (powernow_k8_cpu_init_acpi(data)) { --- 199 unchanged lines hidden --- |