Skip to content

Commit

Permalink
[WIP] Rename clk_np variable to np
Browse files Browse the repository at this point in the history
  • Loading branch information
neuschaefer committed Sep 23, 2023
1 parent 16a7a9e commit a743b68
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions drivers/clk/nuvoton/clk-wpcm450.c
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ static DEFINE_SPINLOCK(wpcm450_clk_lock);
* by a few leaked resources.
*/

static void __init wpcm450_clk_init(struct device_node *clk_np)
static void __init wpcm450_clk_init(struct device_node *np)
{
struct clk_hw_onecell_data *clk_data;
static struct clk_hw **hws;
Expand All @@ -258,13 +258,13 @@ static void __init wpcm450_clk_init(struct device_node *clk_np)
int i, ret;
struct reset_simple_data *reset;

clk_base = of_iomap(clk_np, 0);
clk_base = of_iomap(np, 0);
if (!clk_base) {
pr_err("%pOFP: failed to map registers\n", clk_np);
of_node_put(clk_np);
pr_err("%pOFP: failed to map registers\n", np);
of_node_put(np);
return;
}
of_node_put(clk_np);
of_node_put(np);

clk_data = kzalloc(struct_size(clk_data, hws, WPCM450_NUM_CLKS), GFP_KERNEL);
if (!clk_data)
Expand Down Expand Up @@ -349,7 +349,7 @@ static void __init wpcm450_clk_init(struct device_node *clk_np)
clk_data->hws[data->bitnum] = hw;
}

ret = of_clk_add_hw_provider(clk_np, of_clk_hw_onecell_get, clk_data);
ret = of_clk_add_hw_provider(np, of_clk_hw_onecell_get, clk_data);
if (ret)
pr_err("Failed to add DT provider: %pe\n", ERR_PTR(ret));

Expand All @@ -360,13 +360,13 @@ static void __init wpcm450_clk_init(struct device_node *clk_np)
reset->rcdev.owner = THIS_MODULE;
reset->rcdev.nr_resets = WPCM450_NUM_RESETS;
reset->rcdev.ops = &reset_simple_ops;
reset->rcdev.of_node = clk_np;
reset->rcdev.of_node = np;
reset->membase = clk_base + REG_IPSRST;
ret = reset_controller_register(&reset->rcdev);
if (ret)
pr_err("Failed to register reset controller: %pe\n", ERR_PTR(ret));

of_node_put(clk_np);
of_node_put(np);
}

CLK_OF_DECLARE(wpcm450_clk_init, "nuvoton,wpcm450-clk", wpcm450_clk_init);

0 comments on commit a743b68

Please sign in to comment.