kern_cpu.c (3b8f08459569bf0faa21473e5cec2491e95c9349) | kern_cpu.c (ed472910bab862b6b8db832634a09ddbcb7845ac) |
---|---|
1/*- 2 * Copyright (c) 2004-2007 Nate Lawson (SDG) 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 1023 unchanged lines hidden (view full) --- 1032 */ 1033 error = device_get_children(device_get_parent(dev), &devs, &devcount); 1034 if (error) 1035 return (error); 1036 cf_dev = device_find_child(device_get_parent(dev), "cpufreq", -1); 1037 if (cf_dev == NULL) { 1038 device_printf(dev, 1039 "warning: cpufreq_unregister called with no cpufreq device active\n"); | 1/*- 2 * Copyright (c) 2004-2007 Nate Lawson (SDG) 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 1023 unchanged lines hidden (view full) --- 1032 */ 1033 error = device_get_children(device_get_parent(dev), &devs, &devcount); 1034 if (error) 1035 return (error); 1036 cf_dev = device_find_child(device_get_parent(dev), "cpufreq", -1); 1037 if (cf_dev == NULL) { 1038 device_printf(dev, 1039 "warning: cpufreq_unregister called with no cpufreq device active\n"); |
1040 free(devs, M_TEMP); |
|
1040 return (0); 1041 } 1042 cfcount = 0; 1043 for (i = 0; i < devcount; i++) { 1044 if (!device_is_attached(devs[i])) 1045 continue; 1046 if (CPUFREQ_DRV_TYPE(devs[i], &type) == 0) 1047 cfcount++; --- 16 unchanged lines hidden --- | 1041 return (0); 1042 } 1043 cfcount = 0; 1044 for (i = 0; i < devcount; i++) { 1045 if (!device_is_attached(devs[i])) 1046 continue; 1047 if (CPUFREQ_DRV_TYPE(devs[i], &type) == 0) 1048 cfcount++; --- 16 unchanged lines hidden --- |