diff options
author | Dan Murphy <dmurphy@ti.com> | 2012-02-02 14:16:57 -0600 |
---|---|---|
committer | Dan Murphy <dmurphy@ti.com> | 2012-02-02 14:19:13 -0600 |
commit | 04cc23436ebc4f0caf088a97ef9404ea71acfdd1 (patch) | |
tree | 9994f9a05d68e47e51368017288c157936e9e1cd /drivers/hwmon | |
parent | 50725abe80c6893a7134977c8b576a0ec4eef5a5 (diff) | |
parent | 235eae6e5e402f5f723203e4444f10c16c7c3be3 (diff) | |
download | kernel_samsung_espresso10-04cc23436ebc4f0caf088a97ef9404ea71acfdd1.zip kernel_samsung_espresso10-04cc23436ebc4f0caf088a97ef9404ea71acfdd1.tar.gz kernel_samsung_espresso10-04cc23436ebc4f0caf088a97ef9404ea71acfdd1.tar.bz2 |
Merge branch 'linux-3.0.18' into p-android-omap-3.0
Conflicts:
arch/arm/mach-omap2/smartreflex.c
drivers/i2c/busses/i2c-omap.c
drivers/usb/host/ehci.h
drivers/usb/musb/musb_core.c
fs/proc/base.c
Signed-off-by: Dan Murphy <dmurphy@ti.com>
Diffstat (limited to 'drivers/hwmon')
-rw-r--r-- | drivers/hwmon/coretemp.c | 7 | ||||
-rw-r--r-- | drivers/hwmon/jz4740-hwmon.c | 2 | ||||
-rw-r--r-- | drivers/hwmon/w83627ehf.c | 12 |
3 files changed, 17 insertions, 4 deletions
diff --git a/drivers/hwmon/coretemp.c b/drivers/hwmon/coretemp.c index 0070d54..6163cfa 100644 --- a/drivers/hwmon/coretemp.c +++ b/drivers/hwmon/coretemp.c @@ -50,14 +50,13 @@ #ifdef CONFIG_SMP #define TO_PHYS_ID(cpu) cpu_data(cpu).phys_proc_id #define TO_CORE_ID(cpu) cpu_data(cpu).cpu_core_id -#define TO_ATTR_NO(cpu) (TO_CORE_ID(cpu) + BASE_SYSFS_ATTR_NO) #define for_each_sibling(i, cpu) for_each_cpu(i, cpu_sibling_mask(cpu)) #else #define TO_PHYS_ID(cpu) (cpu) #define TO_CORE_ID(cpu) (cpu) -#define TO_ATTR_NO(cpu) (cpu) #define for_each_sibling(i, cpu) for (i = 0; false; ) #endif +#define TO_ATTR_NO(cpu) (TO_CORE_ID(cpu) + BASE_SYSFS_ATTR_NO) /* * Per-Core Temperature Data @@ -540,6 +539,8 @@ static void coretemp_add_core(unsigned int cpu, int pkg_flag) return; pdata = platform_get_drvdata(pdev); + if (!pdata) + return; err = create_core_data(pdata, pdev, cpu, pkg_flag); if (err) @@ -746,6 +747,8 @@ static void __cpuinit put_core_offline(unsigned int cpu) return; pdata = platform_get_drvdata(pdev); + if (!pdata) + return; indx = TO_ATTR_NO(cpu); diff --git a/drivers/hwmon/jz4740-hwmon.c b/drivers/hwmon/jz4740-hwmon.c index fea292d..b65a4da 100644 --- a/drivers/hwmon/jz4740-hwmon.c +++ b/drivers/hwmon/jz4740-hwmon.c @@ -59,7 +59,7 @@ static ssize_t jz4740_hwmon_read_adcin(struct device *dev, { struct jz4740_hwmon *hwmon = dev_get_drvdata(dev); struct completion *completion = &hwmon->read_completion; - unsigned long t; + long t; unsigned long val; int ret; diff --git a/drivers/hwmon/w83627ehf.c b/drivers/hwmon/w83627ehf.c index 36d7f27..4b2fc50 100644 --- a/drivers/hwmon/w83627ehf.c +++ b/drivers/hwmon/w83627ehf.c @@ -1756,7 +1756,17 @@ static inline void __devinit w83627ehf_init_device(struct w83627ehf_data *data, diode = 0x70; } for (i = 0; i < 3; i++) { - if ((tmp & (0x02 << i))) + const char *label = NULL; + + if (data->temp_label) + label = data->temp_label[data->temp_src[i]]; + + /* Digital source overrides analog type */ + if (label && strncmp(label, "PECI", 4) == 0) + data->temp_type[i] = 6; + else if (label && strncmp(label, "AMD", 3) == 0) + data->temp_type[i] = 5; + else if ((tmp & (0x02 << i))) data->temp_type[i] = (diode & (0x10 << i)) ? 1 : 3; else data->temp_type[i] = 4; /* thermistor */ |