diff options
author | Jan Beulich <JBeulich@suse.com> | 2011-09-23 06:40:08 -0400 |
---|---|---|
committer | Guenter Roeck <guenter.roeck@ericsson.com> | 2011-09-23 13:39:11 -0400 |
commit | 2f1c3db0a6adcfd12d556afa3605d4923658b307 (patch) | |
tree | 519cd7440d27cb4faad8cf8aa6af300745ef6028 /drivers | |
parent | e3204ed3a4a78ca4d10eee8b661b94429bd38da8 (diff) |
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/hwmon/coretemp.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/hwmon/coretemp.c b/drivers/hwmon/coretemp.c index ac1c81f1d593..44b23917d4cc 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) | |||
442 | return tdata; | 442 | return tdata; |
443 | } | 443 | } |
444 | 444 | ||
445 | static int create_core_data(struct platform_data *pdata, | 445 | static int create_core_data(struct platform_device *pdev, |
446 | struct platform_device *pdev, | ||
447 | unsigned int cpu, int pkg_flag) | 446 | unsigned int cpu, int pkg_flag) |
448 | { | 447 | { |
449 | struct temp_data *tdata; | 448 | struct temp_data *tdata; |
449 | struct platform_data *pdata = platform_get_drvdata(pdev); | ||
450 | struct cpuinfo_x86 *c = &cpu_data(cpu); | 450 | struct cpuinfo_x86 *c = &cpu_data(cpu); |
451 | u32 eax, edx; | 451 | u32 eax, edx; |
452 | int err, attr_no; | 452 | int err, attr_no; |
@@ -514,16 +514,13 @@ exit_free: | |||
514 | 514 | ||
515 | static void coretemp_add_core(unsigned int cpu, int pkg_flag) | 515 | static void coretemp_add_core(unsigned int cpu, int pkg_flag) |
516 | { | 516 | { |
517 | struct platform_data *pdata; | ||
518 | struct platform_device *pdev = coretemp_get_pdev(cpu); | 517 | struct platform_device *pdev = coretemp_get_pdev(cpu); |
519 | int err; | 518 | int err; |
520 | 519 | ||
521 | if (!pdev) | 520 | if (!pdev) |
522 | return; | 521 | return; |
523 | 522 | ||
524 | pdata = platform_get_drvdata(pdev); | 523 | err = create_core_data(pdev, cpu, pkg_flag); |
525 | |||
526 | err = create_core_data(pdata, pdev, cpu, pkg_flag); | ||
527 | if (err) | 524 | if (err) |
528 | dev_err(&pdev->dev, "Adding Core %u failed\n", cpu); | 525 | dev_err(&pdev->dev, "Adding Core %u failed\n", cpu); |
529 | } | 526 | } |