[PATCH v2 07/10] clk: en7523: reword and clean clk_probe variables
From: Christian Marangi
Date: Tue Jun 17 2025 - 09:10:25 EST
Rework and clean en7523_clk_probe variables to make them consistent with
the rest of the source. Also apply some minor cleanup for pdev
variables.
Signed-off-by: Christian Marangi <ansuelsmth@xxxxxxxxx>
---
drivers/clk/clk-en7523.c | 20 +++++++++++---------
1 file changed, 11 insertions(+), 9 deletions(-)
diff --git a/drivers/clk/clk-en7523.c b/drivers/clk/clk-en7523.c
index a768ba71feec..5236119bca83 100644
--- a/drivers/clk/clk-en7523.c
+++ b/drivers/clk/clk-en7523.c
@@ -881,25 +881,27 @@ static int en7581_clk_hw_init(struct platform_device *pdev,
static int en7523_clk_probe(struct platform_device *pdev)
{
- struct device_node *node = pdev->dev.of_node;
const struct en_clk_soc_data *soc_data;
struct clk_hw_onecell_data *clk_data;
- int r;
+ struct device *dev = &pdev->dev;
+ int err;
- soc_data = device_get_match_data(&pdev->dev);
+ soc_data = device_get_match_data(dev);
- clk_data = devm_kzalloc(&pdev->dev,
- struct_size(clk_data, hws, soc_data->num_clocks),
+ clk_data = devm_kzalloc(dev,
+ struct_size(clk_data, hws,
+ soc_data->num_clocks),
GFP_KERNEL);
if (!clk_data)
return -ENOMEM;
clk_data->num = soc_data->num_clocks;
- r = soc_data->hw_init(pdev, soc_data, clk_data);
- if (r)
- return r;
+ err = soc_data->hw_init(pdev, soc_data, clk_data);
+ if (err)
+ return err;
- return of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
+ return of_clk_add_hw_provider(dev->of_node, of_clk_hw_onecell_get,
+ clk_data);
}
static const struct en_clk_soc_data en7523_data = {
--
2.48.1