mmc: meson-gx: remove unneeded devm_kstrdup in meson_mmc_clk_init
authorHeiner Kallweit <hkallweit1@gmail.com>
Sat, 4 Mar 2017 12:26:24 +0000 (13:26 +0100)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 24 Apr 2017 19:41:10 +0000 (21:41 +0200)
CLK core does a deep copy of init.name, therefore it's fully ok to
provide a local variable.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Acked-by: Kevin Hilman <khilman@baylibre.com>
Tested-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/meson-gx-mmc.c

index 002e4aac7ca99f05dc3bcbdb21b8d665dfa862b1..684cc08813ac534362b86a307c69ff4bec416694 100644 (file)
@@ -281,7 +281,7 @@ static int meson_mmc_clk_init(struct meson_host *host)
 
        /* create the divider */
        snprintf(clk_name, sizeof(clk_name), "%s#div", dev_name(host->dev));
-       init.name = devm_kstrdup(host->dev, clk_name, GFP_KERNEL);
+       init.name = clk_name;
        init.ops = &clk_divider_ops;
        init.flags = CLK_SET_RATE_PARENT;
        clk_div_parents[0] = __clk_get_name(host->mux_clk);