aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Beulich <JBeulich@suse.com>2011-09-23 06:40:08 -0400
committerGuenter Roeck <guenter.roeck@ericsson.com>2011-09-23 10:39:11 -0700
commit2f1c3db0a6adcfd12d556afa3605d4923658b307 (patch)
tree519cd7440d27cb4faad8cf8aa6af300745ef6028
parente3204ed3a4a78ca4d10eee8b661b94429bd38da8 (diff)
downloadlinux-3.0-android-ux500-2f1c3db0a6adcfd12d556afa3605d4923658b307.tar.gz
hwmon: (coretemp) remove struct platform_data * parameter from create_core_data()
The only caller of the function obtained the pointer solely for the purpose of passing it to this function, while it can be easily determined from the struct platform_device * parameter also passed. Signed-off-by: Jan Beulich <jbeulich@suse.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
-rw-r--r--drivers/hwmon/coretemp.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/hwmon/coretemp.c b/drivers/hwmon/coretemp.c
index ac1c81f1d59..44b23917d4c 100644
--- a/drivers/hwmon/coretemp.c
+++ b/drivers/hwmon/coretemp.c
@@ -442,11 +442,11 @@ static struct temp_data *init_temp_data(unsigned int cpu, int pkg_flag)
return tdata;
}
-static int create_core_data(struct platform_data *pdata,
- struct platform_device *pdev,
+static int create_core_data(struct platform_device *pdev,
unsigned int cpu, int pkg_flag)
{
struct temp_data *tdata;
+ struct platform_data *pdata = platform_get_drvdata(pdev);
struct cpuinfo_x86 *c = &cpu_data(cpu);
u32 eax, edx;
int err, attr_no;
@@ -514,16 +514,13 @@ exit_free:
static void coretemp_add_core(unsigned int cpu, int pkg_flag)
{
- struct platform_data *pdata;
struct platform_device *pdev = coretemp_get_pdev(cpu);
int err;
if (!pdev)
return;
- pdata = platform_get_drvdata(pdev);
-
- err = create_core_data(pdata, pdev, cpu, pkg_flag);
+ err = create_core_data(pdev, cpu, pkg_flag);
if (err)
dev_err(&pdev->dev, "Adding Core %u failed\n", cpu);
}