cpufreq_conservative.c (5ff0a268037d344f86df690ccb994d8bc015d2d9) | cpufreq_conservative.c (d5b73cd870e2b049ef566aec2791dbf5fd26a7ec) |
---|---|
1/* 2 * drivers/cpufreq/cpufreq_conservative.c 3 * 4 * Copyright (C) 2001 Russell King 5 * (C) 2003 Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>. 6 * Jun Nakajima <jun.nakajima@intel.com> 7 * (C) 2009 Alexander Clouter <alex@digriz.org.uk> 8 * --- 303 unchanged lines hidden (view full) --- 312}; 313 314/************************** sysfs end ************************/ 315 316static int cs_init(struct dbs_data *dbs_data) 317{ 318 struct cs_dbs_tuners *tuners; 319 | 1/* 2 * drivers/cpufreq/cpufreq_conservative.c 3 * 4 * Copyright (C) 2001 Russell King 5 * (C) 2003 Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>. 6 * Jun Nakajima <jun.nakajima@intel.com> 7 * (C) 2009 Alexander Clouter <alex@digriz.org.uk> 8 * --- 303 unchanged lines hidden (view full) --- 312}; 313 314/************************** sysfs end ************************/ 315 316static int cs_init(struct dbs_data *dbs_data) 317{ 318 struct cs_dbs_tuners *tuners; 319 |
320 tuners = kzalloc(sizeof(struct cs_dbs_tuners), GFP_KERNEL); | 320 tuners = kzalloc(sizeof(*tuners), GFP_KERNEL); |
321 if (!tuners) { 322 pr_err("%s: kzalloc failed\n", __func__); 323 return -ENOMEM; 324 } 325 326 tuners->up_threshold = DEF_FREQUENCY_UP_THRESHOLD; 327 tuners->down_threshold = DEF_FREQUENCY_DOWN_THRESHOLD; 328 tuners->sampling_down_factor = DEF_SAMPLING_DOWN_FACTOR; --- 76 unchanged lines hidden --- | 321 if (!tuners) { 322 pr_err("%s: kzalloc failed\n", __func__); 323 return -ENOMEM; 324 } 325 326 tuners->up_threshold = DEF_FREQUENCY_UP_THRESHOLD; 327 tuners->down_threshold = DEF_FREQUENCY_DOWN_THRESHOLD; 328 tuners->sampling_down_factor = DEF_SAMPLING_DOWN_FACTOR; --- 76 unchanged lines hidden --- |