diff options
author | Todd Poynor <toddpoynor@google.com> | 2012-05-08 11:36:40 -0700 |
---|---|---|
committer | Todd Poynor <toddpoynor@google.com> | 2012-05-08 11:36:40 -0700 |
commit | 52f91d889a2c2a0f9e0b5e97fa7be8b584834016 (patch) | |
tree | e9c820e826581e430c53f523651fc9e2465a4b37 /drivers/hwmon/coretemp.c | |
parent | 434b9914eec503fc0eaaa52908765bca6430d22b (diff) | |
parent | bea37381fd9a34c6660e5195d31beea86aa3dda3 (diff) | |
download | kernel_samsung_crespo-52f91d889a2c2a0f9e0b5e97fa7be8b584834016.zip kernel_samsung_crespo-52f91d889a2c2a0f9e0b5e97fa7be8b584834016.tar.gz kernel_samsung_crespo-52f91d889a2c2a0f9e0b5e97fa7be8b584834016.tar.bz2 |
Merge commit 'v3.0.31' into android-3.0
Diffstat (limited to 'drivers/hwmon/coretemp.c')
-rw-r--r-- | drivers/hwmon/coretemp.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/hwmon/coretemp.c b/drivers/hwmon/coretemp.c index 6163cfa..3cf2353 100644 --- a/drivers/hwmon/coretemp.c +++ b/drivers/hwmon/coretemp.c @@ -42,7 +42,7 @@ #define DRVNAME "coretemp" #define BASE_SYSFS_ATTR_NO 2 /* Sysfs Base attr no for coretemp */ -#define NUM_REAL_CORES 16 /* Number of Real cores per cpu */ +#define NUM_REAL_CORES 32 /* Number of Real cores per cpu */ #define CORETEMP_NAME_LENGTH 17 /* String Length of attrs */ #define MAX_ATTRS 5 /* Maximum no of per-core attrs */ #define MAX_CORE_DATA (NUM_REAL_CORES + BASE_SYSFS_ATTR_NO) @@ -752,6 +752,10 @@ static void __cpuinit put_core_offline(unsigned int cpu) indx = TO_ATTR_NO(cpu); + /* The core id is too big, just return */ + if (indx > MAX_CORE_DATA - 1) + return; + if (pdata->core_data[indx] && pdata->core_data[indx]->cpu == cpu) coretemp_remove_core(pdata, &pdev->dev, indx); |