diff mbox series

[v1,2/2] clk: x86: lpss-atom: Use temporary variable for struct device

Message ID 20240822161452.1780149-3-andriy.shevchenko@linux.intel.com (mailing list archive)
State Superseded, archived
Headers show
Series clk: x86: lpss-atom: A couple of cleanups | expand

Commit Message

Andy Shevchenko Aug. 22, 2024, 4:14 p.m. UTC
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(-)
diff mbox series

Patch

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);