summaryrefslogtreecommitdiff
path: root/drivers/clk/mvebu
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/clk/mvebu')
-rw-r--r--drivers/clk/mvebu/clk-corediv.c6
-rw-r--r--drivers/clk/mvebu/clk-cpu.c4
-rw-r--r--drivers/clk/mvebu/common.c8
-rw-r--r--drivers/clk/mvebu/cp110-system-controller.c2
-rw-r--r--drivers/clk/mvebu/kirkwood.c5
5 files changed, 10 insertions, 15 deletions
diff --git a/drivers/clk/mvebu/clk-corediv.c b/drivers/clk/mvebu/clk-corediv.c
index 628032341cbb..ae48293b0c41 100644
--- a/drivers/clk/mvebu/clk-corediv.c
+++ b/drivers/clk/mvebu/clk-corediv.c
@@ -270,13 +270,11 @@ mvebu_corediv_clk_init(struct device_node *node,
clk_data.clk_num = soc_desc->ndescs;
/* clks holds the clock array */
- clks = kcalloc(clk_data.clk_num, sizeof(struct clk *),
- GFP_KERNEL);
+ clks = kzalloc_objs(struct clk *, clk_data.clk_num);
if (WARN_ON(!clks))
goto err_unmap;
/* corediv holds the clock specific array */
- corediv = kcalloc(clk_data.clk_num, sizeof(struct clk_corediv),
- GFP_KERNEL);
+ corediv = kzalloc_objs(struct clk_corediv, clk_data.clk_num);
if (WARN_ON(!corediv))
goto err_free_clks;
diff --git a/drivers/clk/mvebu/clk-cpu.c b/drivers/clk/mvebu/clk-cpu.c
index 0de7660e73d2..26d52ecaac50 100644
--- a/drivers/clk/mvebu/clk-cpu.c
+++ b/drivers/clk/mvebu/clk-cpu.c
@@ -183,11 +183,11 @@ static void __init of_cpu_clk_setup(struct device_node *node)
pr_warn("%s: pmu-dfs base register not set, dynamic frequency scaling not available\n",
__func__);
- cpuclk = kcalloc(ncpus, sizeof(*cpuclk), GFP_KERNEL);
+ cpuclk = kzalloc_objs(*cpuclk, ncpus);
if (WARN_ON(!cpuclk))
goto cpuclk_out;
- clks = kcalloc(ncpus, sizeof(*clks), GFP_KERNEL);
+ clks = kzalloc_objs(*clks, ncpus);
if (WARN_ON(!clks))
goto clks_out;
diff --git a/drivers/clk/mvebu/common.c b/drivers/clk/mvebu/common.c
index 5adbbd91a6db..28f2e1b2a932 100644
--- a/drivers/clk/mvebu/common.c
+++ b/drivers/clk/mvebu/common.c
@@ -124,8 +124,7 @@ void __init mvebu_coreclk_setup(struct device_node *np,
if (desc->get_refclk_freq)
clk_data.clk_num += 1;
- clk_data.clks = kcalloc(clk_data.clk_num, sizeof(*clk_data.clks),
- GFP_KERNEL);
+ clk_data.clks = kzalloc_objs(*clk_data.clks, clk_data.clk_num);
if (WARN_ON(!clk_data.clks)) {
iounmap(base);
return;
@@ -258,7 +257,7 @@ void __init mvebu_clk_gating_setup(struct device_node *np,
clk_put(clk);
}
- ctrl = kzalloc(sizeof(*ctrl), GFP_KERNEL);
+ ctrl = kzalloc_obj(*ctrl);
if (WARN_ON(!ctrl))
goto ctrl_out;
@@ -272,8 +271,7 @@ void __init mvebu_clk_gating_setup(struct device_node *np,
n++;
ctrl->num_gates = n;
- ctrl->gates = kcalloc(ctrl->num_gates, sizeof(*ctrl->gates),
- GFP_KERNEL);
+ ctrl->gates = kzalloc_objs(*ctrl->gates, ctrl->num_gates);
if (WARN_ON(!ctrl->gates))
goto gates_out;
diff --git a/drivers/clk/mvebu/cp110-system-controller.c b/drivers/clk/mvebu/cp110-system-controller.c
index b47c86906046..fa95eb7197af 100644
--- a/drivers/clk/mvebu/cp110-system-controller.c
+++ b/drivers/clk/mvebu/cp110-system-controller.c
@@ -180,7 +180,7 @@ static struct clk_hw *cp110_register_gate(const char *name,
struct clk_init_data init;
int ret;
- gate = kzalloc(sizeof(*gate), GFP_KERNEL);
+ gate = kzalloc_obj(*gate);
if (!gate)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/clk/mvebu/kirkwood.c b/drivers/clk/mvebu/kirkwood.c
index 8bc893df4736..ed061d82fb65 100644
--- a/drivers/clk/mvebu/kirkwood.c
+++ b/drivers/clk/mvebu/kirkwood.c
@@ -297,7 +297,7 @@ static void __init kirkwood_clk_muxing_setup(struct device_node *np,
if (WARN_ON(!base))
return;
- ctrl = kzalloc(sizeof(*ctrl), GFP_KERNEL);
+ ctrl = kzalloc_obj(*ctrl);
if (WARN_ON(!ctrl))
goto ctrl_out;
@@ -309,8 +309,7 @@ static void __init kirkwood_clk_muxing_setup(struct device_node *np,
n++;
ctrl->num_muxes = n;
- ctrl->muxes = kcalloc(ctrl->num_muxes, sizeof(struct clk *),
- GFP_KERNEL);
+ ctrl->muxes = kzalloc_objs(struct clk *, ctrl->num_muxes);
if (WARN_ON(!ctrl->muxes))
goto muxes_out;