From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>
Subject: [PATCH v1 2/2] clk: x86: lpss-atom: Use temporary variable for struct device
Date: Thu, 22 Aug 2024 19:14:08 +0300 [thread overview]
Message-ID: <20240822161452.1780149-3-andriy.shevchenko@linux.intel.com> (raw)
In-Reply-To: <20240822161452.1780149-1-andriy.shevchenko@linux.intel.com>
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 --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
prev parent reply other threads:[~2024-08-22 16:14 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-22 16:14 [PATCH v1 0/2] clk: x86: lpss-atom: A couple of cleanups Andy Shevchenko
2024-08-22 16:14 ` [PATCH v1 1/2] clk: x86: lpss-atom: Use predefined constants from units.h Andy Shevchenko
2024-08-28 0:21 ` Stephen Boyd
2024-08-28 13:11 ` Andy Shevchenko
2024-08-28 18:38 ` Stephen Boyd
2024-08-22 16:14 ` Andy Shevchenko [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240822161452.1780149-3-andriy.shevchenko@linux.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=sboyd@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox