[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240822161452.1780149-3-andriy.shevchenko@linux.intel.com>
Date: Thu, 22 Aug 2024 19:14:08 +0300
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
linux-clk@...r.kernel.org,
linux-kernel@...r.kernel.org
Cc: Michael Turquette <mturquette@...libre.com>,
Stephen Boyd <sboyd@...nel.org>
Subject: [PATCH v1 2/2] clk: x86: lpss-atom: Use temporary variable for struct device
Use temporary variable for struct device to make code neater.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
---
drivers/clk/x86/clk-lpss-atom.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/clk/x86/clk-lpss-atom.c b/drivers/clk/x86/clk-lpss-atom.c
index c70088be72d1..391a7d2e98e4 100644
--- a/drivers/clk/x86/clk-lpss-atom.c
+++ b/drivers/clk/x86/clk-lpss-atom.c
@@ -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);
--
2.43.0.rc1.1336.g36b5255a03ac
Powered by blists - more mailing lists