]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
clk: bcm: rpi: Statically init clk_init_data
authorMaxime Ripard <maxime@cerno.tech>
Mon, 15 Jun 2020 08:40:45 +0000 (10:40 +0200)
committerStephen Boyd <sboyd@kernel.org>
Sat, 20 Jun 2020 00:21:15 +0000 (17:21 -0700)
Instead of declaring the clk_init_data and then calling memset on it, just
initialise properly.

Cc: Michael Turquette <mturquette@baylibre.com>
Cc: Stephen Boyd <sboyd@kernel.org>
Cc: linux-clk@vger.kernel.org
Acked-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Reviewed-by: Stephen Boyd <sboyd@kernel.org>
Tested-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://lore.kernel.org/r/0342572daa561dc1bb4c9fd10641b2016493e32b.1592210452.git-series.maxime@cerno.tech
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
drivers/clk/bcm/clk-raspberrypi.c

index 8610355bda4771fc31317972b527b7a48607a56c..ddc72207212e93ce8d7f1fa6ed10432cb97c4b04 100644 (file)
@@ -175,11 +175,10 @@ static const struct clk_ops raspberrypi_firmware_pll_clk_ops = {
 
 static int raspberrypi_register_pllb(struct raspberrypi_clk *rpi)
 {
+       struct clk_init_data init = {};
        u32 min_rate = 0, max_rate = 0;
-       struct clk_init_data init;
        int ret;
 
-       memset(&init, 0, sizeof(init));
 
        /* All of the PLLs derive from the external oscillator. */
        init.parent_names = (const char *[]){ "osc" };