Commit 2f1c3db0 authored by Jan Beulich's avatar Jan Beulich Committed by Guenter Roeck

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: default avatarJan Beulich <jbeulich@suse.com>
Signed-off-by: default avatarGuenter Roeck <guenter.roeck@ericsson.com>
parent e3204ed3
...@@ -442,11 +442,11 @@ static struct temp_data *init_temp_data(unsigned int cpu, int pkg_flag) ...@@ -442,11 +442,11 @@ static struct temp_data *init_temp_data(unsigned int cpu, int pkg_flag)
return tdata; return tdata;
} }
static int create_core_data(struct platform_data *pdata, static int create_core_data(struct platform_device *pdev,
struct platform_device *pdev,
unsigned int cpu, int pkg_flag) unsigned int cpu, int pkg_flag)
{ {
struct temp_data *tdata; struct temp_data *tdata;
struct platform_data *pdata = platform_get_drvdata(pdev);
struct cpuinfo_x86 *c = &cpu_data(cpu); struct cpuinfo_x86 *c = &cpu_data(cpu);
u32 eax, edx; u32 eax, edx;
int err, attr_no; int err, attr_no;
...@@ -514,16 +514,13 @@ static int create_core_data(struct platform_data *pdata, ...@@ -514,16 +514,13 @@ static int create_core_data(struct platform_data *pdata,
static void coretemp_add_core(unsigned int cpu, int pkg_flag) static void coretemp_add_core(unsigned int cpu, int pkg_flag)
{ {
struct platform_data *pdata;
struct platform_device *pdev = coretemp_get_pdev(cpu); struct platform_device *pdev = coretemp_get_pdev(cpu);
int err; int err;
if (!pdev) if (!pdev)
return; return;
pdata = platform_get_drvdata(pdev); err = create_core_data(pdev, cpu, pkg_flag);
err = create_core_data(pdata, pdev, cpu, pkg_flag);
if (err) if (err)
dev_err(&pdev->dev, "Adding Core %u failed\n", cpu); dev_err(&pdev->dev, "Adding Core %u failed\n", cpu);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment