Skip to content

Commit

Permalink
hwmon: (coretemp) remove struct platform_data * parameter from create…
Browse files Browse the repository at this point in the history
…_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>
  • Loading branch information
Jan Beulich authored and Guenter Roeck committed Sep 23, 2011
1 parent e3204ed commit 2f1c3db
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions drivers/hwmon/coretemp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -514,16 +514,13 @@ static int create_core_data(struct platform_data *pdata,

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);
}
Expand Down

0 comments on commit 2f1c3db

Please sign in to comment.