* [PATCH] regulator: s2mps11: Fix GPIO descriptor initialization [not found] <CGME20181120123855eucas1p1a969fba923e9243e576cae0b632504af@eucas1p1.samsung.com> @ 2018-11-20 12:38 ` Marek Szyprowski 2018-11-20 12:51 ` Krzysztof Kozlowski 0 siblings, 1 reply; 2+ messages in thread From: Marek Szyprowski @ 2018-11-20 12:38 UTC (permalink / raw) To: linux-kernel, Mark Brown Cc: Marek Szyprowski, Liam Girdwood, Sangbeom Kim, Bartlomiej Zolnierkiewicz, Krzysztof Kozlowski, linux-samsung-soc GPIO descriptor array must be zero initialized to ensure that core will properly handle also the case when no external GPIO pin is defined. Fixes: 1c984942f0a4 ("regulator: s2mps11: Pass descriptor instead of GPIO number") Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> --- This fixes broken eMMC boot on Artik, Rinato and Odroid XU3/XU4/HC1 boards. --- drivers/regulator/s2mps11.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/regulator/s2mps11.c b/drivers/regulator/s2mps11.c index 6fec45897194..63e66f485cc0 100644 --- a/drivers/regulator/s2mps11.c +++ b/drivers/regulator/s2mps11.c @@ -1134,9 +1134,8 @@ static int s2mps11_pmic_probe(struct platform_device *pdev) return -EINVAL; } - s2mps11->ext_control_gpiod = devm_kmalloc_array(&pdev->dev, - rdev_num, sizeof(*s2mps11->ext_control_gpiod), - GFP_KERNEL); + s2mps11->ext_control_gpiod = devm_kcalloc(&pdev->dev, rdev_num, + sizeof(*s2mps11->ext_control_gpiod), GFP_KERNEL); if (!s2mps11->ext_control_gpiod) return -ENOMEM; -- 2.17.1 ^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] regulator: s2mps11: Fix GPIO descriptor initialization 2018-11-20 12:38 ` [PATCH] regulator: s2mps11: Fix GPIO descriptor initialization Marek Szyprowski @ 2018-11-20 12:51 ` Krzysztof Kozlowski 0 siblings, 0 replies; 2+ messages in thread From: Krzysztof Kozlowski @ 2018-11-20 12:51 UTC (permalink / raw) To: Marek Szyprowski Cc: linux-kernel, broonie, lgirdwood, sbkim73, Bartłomiej Żołnierkiewicz, linux-samsung-soc On Tue, 20 Nov 2018 at 13:39, Marek Szyprowski <m.szyprowski@samsung.com> wrote: > > GPIO descriptor array must be zero initialized to ensure that core will > properly handle also the case when no external GPIO pin is defined. > > Fixes: 1c984942f0a4 ("regulator: s2mps11: Pass descriptor instead of GPIO number") > Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> > --- > This fixes broken eMMC boot on Artik, Rinato and Odroid XU3/XU4/HC1 > boards. I missed that on my review. Now it looks fine, thanks for fixing it! Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org> Best regards, Krzysztof > --- > drivers/regulator/s2mps11.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/drivers/regulator/s2mps11.c b/drivers/regulator/s2mps11.c > index 6fec45897194..63e66f485cc0 100644 > --- a/drivers/regulator/s2mps11.c > +++ b/drivers/regulator/s2mps11.c > @@ -1134,9 +1134,8 @@ static int s2mps11_pmic_probe(struct platform_device *pdev) > return -EINVAL; > } > > - s2mps11->ext_control_gpiod = devm_kmalloc_array(&pdev->dev, > - rdev_num, sizeof(*s2mps11->ext_control_gpiod), > - GFP_KERNEL); > + s2mps11->ext_control_gpiod = devm_kcalloc(&pdev->dev, rdev_num, > + sizeof(*s2mps11->ext_control_gpiod), GFP_KERNEL); > if (!s2mps11->ext_control_gpiod) > return -ENOMEM; > > -- > 2.17.1 > ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-11-20 12:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <CGME20181120123855eucas1p1a969fba923e9243e576cae0b632504af@eucas1p1.samsung.com>
2018-11-20 12:38 ` [PATCH] regulator: s2mps11: Fix GPIO descriptor initialization Marek Szyprowski
2018-11-20 12:51 ` Krzysztof Kozlowski
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®