diff options
Diffstat (limited to 'drivers/regulator/mc13xxx-regulator-core.c')
-rw-r--r-- | drivers/regulator/mc13xxx-regulator-core.c | 30 |
1 files changed, 13 insertions, 17 deletions
diff --git a/drivers/regulator/mc13xxx-regulator-core.c b/drivers/regulator/mc13xxx-regulator-core.c index 0281c31ae2ed..da4fb9824757 100644 --- a/drivers/regulator/mc13xxx-regulator-core.c +++ b/drivers/regulator/mc13xxx-regulator-core.c @@ -1,19 +1,15 @@ -/* - * Regulator Driver for Freescale MC13xxx PMIC - * - * Copyright 2010 Yong Shen <yong.shen@linaro.org> - * - * Based on mc13783 regulator driver : - * Copyright (C) 2008 Sascha Hauer, Pengutronix <s.hauer@pengutronix.de> - * Copyright 2009 Alberto Panizzo <maramaopercheseimorto@gmail.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * Regs infos taken from mc13xxx drivers from freescale and mc13xxx.pdf file - * from freescale - */ +// SPDX-License-Identifier: GPL-2.0 +// +// Regulator Driver for Freescale MC13xxx PMIC +// +// Copyright 2010 Yong Shen <yong.shen@linaro.org> +// +// Based on mc13783 regulator driver : +// Copyright (C) 2008 Sascha Hauer, Pengutronix <s.hauer@pengutronix.de> +// Copyright 2009 Alberto Panizzo <maramaopercheseimorto@gmail.com> +// +// Regs infos taken from mc13xxx drivers from freescale and mc13xxx.pdf file +// from freescale #include <linux/mfd/mc13xxx.h> #include <linux/regulator/machine.h> @@ -175,7 +171,7 @@ struct mc13xxx_regulator_init_data *mc13xxx_parse_regulators_dt( if (!parent) return NULL; - data = devm_kzalloc(&pdev->dev, sizeof(*data) * priv->num_regulators, + data = devm_kcalloc(&pdev->dev, priv->num_regulators, sizeof(*data), GFP_KERNEL); if (!data) { of_node_put(parent); |