@@ -16,11 +16,12 @@
static int lpss_atom_clk_probe(struct platform_device *pdev)
{
+ struct device *dev = &pdev->dev;
struct lpss_clk_data *drvdata;
struct clk *clk;
u32 rate;
- drvdata = devm_kzalloc(&pdev->dev, sizeof(*drvdata), GFP_KERNEL);
+ drvdata = devm_kzalloc(dev, sizeof(*drvdata), GFP_KERNEL);
if (!drvdata)
return -ENOMEM;
@@ -29,7 +30,7 @@ static int lpss_atom_clk_probe(struct platform_device *pdev)
/* LPSS free running clock */
drvdata->name = "lpss_clk";
- clk = clk_register_fixed_rate(&pdev->dev, drvdata->name, NULL, 0, rate);
+ clk = clk_register_fixed_rate(dev, drvdata->name, NULL, 0, rate);
if (IS_ERR(clk))
return PTR_ERR(clk);
Use temporary variable for struct device to make code neater. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> --- drivers/clk/x86/clk-lpss-atom.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)