From patchwork Tue Nov 20 12:38:44 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 151579 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp553130ljp; Tue, 20 Nov 2018 04:39:00 -0800 (PST) X-Google-Smtp-Source: AJdET5dRlJzpM74Kmzka4au8K3WP6lcj6fcPeQc/g51Ase9impfU1EFZp2Gvrsof6vtYyruZ+ORO X-Received: by 2002:a62:8145:: with SMTP id t66mr2008397pfd.55.1542717540799; Tue, 20 Nov 2018 04:39:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542717540; cv=none; d=google.com; s=arc-20160816; b=KxZFp9Dhvj7KuhdMeRk0fvp+kFBJwjYtrb/YMLeNDt0k/n0Xt2/1IuRfYGw0FGV4vQ du9AhE5V6z553RlTfGs+COxerfM9fOafTLePvPAjXUZfqGYgDb4FR9YTgoAEEF6sfMw+ gyEKG0lJPXGE55T6CFer8BDooDXsbnhB07itSc303fGCb1JrJH6qTKOcMPkC+luA+AAR CPh2G5Y+OaTc1yKximriQK7zDJ8Y1rD1jLd2Pznsxym5cG0WthwntXviFJTuFol5IY/G BDfue2K0QQirkm5vEb3bUKJWmao3+kSeFD9t04jazmkShLJATD4MV9dSKumR8rmzCHvx f3MQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:cms-type:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter; bh=T3aWJmrFtpoYPl94LWMU2junfDU4l3TEFHah795NpCo=; b=lzjfHpESGbXQZ8rkNfmpicMrp5hH2YymVw+AswLn4SlCErh+7NcpmAqSz6RTO4dQ/r WMkVcmyhMqiDBrdmpf7FhyhUX144eXcNwSR+ulSD4oN8tlB+J20Vs26Faxv3QfF/O0Yw 5wNOmtfMjxtft2WUFmz37zHCQMKrX6W8IL4KFAQ9d5OKcsJ+ctrDFRS5JurM9OquZC98 w+8PS7akyeacQGdNay5FHzVMbVTV1Da5x6qAaVr426BppDS88SXK1oadVHHgMV7SoI1P yjKNsHpE/ROOg4p3+E0HHk7GWBSAVNF0On6x3502iEksgpIyHP+WcKOjrI9oawAyvv9T dCTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=FNGewhDF; spf=pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-samsung-soc-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p16si8872146plr.31.2018.11.20.04.39.00; Tue, 20 Nov 2018 04:39:00 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=FNGewhDF; spf=pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-samsung-soc-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726414AbeKTXH4 (ORCPT + 3 others); Tue, 20 Nov 2018 18:07:56 -0500 Received: from mailout1.w1.samsung.com ([210.118.77.11]:46292 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725843AbeKTXHz (ORCPT ); Tue, 20 Nov 2018 18:07:55 -0500 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20181120123857euoutp0130ec33e7d88eeecdae9f5c69fb7d64e8~o1W0eNOFR2517425174euoutp01T; Tue, 20 Nov 2018 12:38:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20181120123857euoutp0130ec33e7d88eeecdae9f5c69fb7d64e8~o1W0eNOFR2517425174euoutp01T DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1542717537; bh=T3aWJmrFtpoYPl94LWMU2junfDU4l3TEFHah795NpCo=; h=From:To:Cc:Subject:Date:References:From; b=FNGewhDFU0vHjAz/9uAofq27segRLkYE3STOmckaWjT9BOEABr/u/AR/6mq0kKf64 VyQzewI8u6LuNLeB6cQUdM+5bBq3rhI2bHM+CuDyc6+z/v78rPT2p7Vodlz3EpydTb wisqXKCfXvgpEqWncorcuduk/TV+WPZ61ASfxpCw= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20181120123855eucas1p2fb407e9c9b6632d4bbb72f5d76590afc~o1WzY5sZ42021720217eucas1p2y; Tue, 20 Nov 2018 12:38:55 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id 48.B5.04294.F5004FB5; Tue, 20 Nov 2018 12:38:55 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20181120123855eucas1p1a969fba923e9243e576cae0b632504af~o1WyoS9Bx0254902549eucas1p1o; Tue, 20 Nov 2018 12:38:55 +0000 (GMT) X-AuditID: cbfec7f4-84fff700000010c6-b8-5bf4005fae2b Received: from eusync4.samsung.com ( [203.254.199.214]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 43.73.04128.E5004FB5; Tue, 20 Nov 2018 12:38:54 +0000 (GMT) Received: from AMDC2765.digital.local ([106.116.147.25]) by eusync4.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0PIH0030FSGPKL50@eusync4.samsung.com>; Tue, 20 Nov 2018 12:38:54 +0000 (GMT) From: Marek Szyprowski To: linux-kernel@vger.kernel.org, Mark Brown Cc: Marek Szyprowski , Liam Girdwood , Sangbeom Kim , Bartlomiej Zolnierkiewicz , Krzysztof Kozlowski , linux-samsung-soc@vger.kernel.org Subject: [PATCH] regulator: s2mps11: Fix GPIO descriptor initialization Date: Tue, 20 Nov 2018 13:38:44 +0100 Message-id: <20181120123844.3003-1-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.17.1 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprLIsWRmVeSWpSXmKPExsWy7djP87rxDF+iDZ5/U7LYOGM9q8XUh0/Y LM6f38Bu8e1KB5PF5V1z2CxmnN/HZLH2yF12i4srvjA5cHjsnHWX3WPTqk42j74tqxg9Pm+S C2CJ4rJJSc3JLEst0rdL4Mr4ve00c8Epjor3/xcwNjDOZe9i5OSQEDCROHR8D1sXIxeHkMAK Rom+IwsZIZzPjBIH7+1lg6naOv0ME4gtJLCMUeLDDxGIogYmidbpy1hAEmwChhJdb7vAGkQE HCUOTd4IFmcW+McosahHFsQWFnCXuDe9ixHEZhFQlZh/eT0ziM0rYCPR/mM6M8QyeYnVGw4w gyyQEHjJKnGt9xXUrS4Sc7b0skDYwhKvjm+BistIXJ7czQLR0Mwo0T5jFjuE08MosXXODqgf rCUOH7/ICnESn8SkbSDrOIDivBIdbUIQJR4S6zY9Yod4M1ZiyuSlrBMYJRYwMqxiFE8tLc5N Ty02ykst1ytOzC0uzUvXS87P3cQIjLTT/45/2cG460/SIUYBDkYlHt4dJp+jhVgTy4orcw8x SnAwK4nwvo0GCvGmJFZWpRblxxeV5qQWH2KU5mBREuetZngQLSSQnliSmp2aWpBaBJNl4uCU amDc/LPTL749oTBm6U9h65MveYsWLOG6f0/V89PVY7fm6UySC8yzefL/9fztFa8cGN/yhEx+ OT9yz9fmrKjSiNuzdfsyj04ubG+p/BI/R3+l+lmr+IV1O6dO/6S6Mmb3taROPr0P/Z5f06bw Tn2Y/mHmFI8v0v0/7pRvuxTD935xSZcj8zubavsUJZbijERDLeai4kQArbnx0bACAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrAJMWRmVeSWpSXmKPExsVy+t/xa7pxDF+iDfoW2VhsnLGe1WLqwyds FufPb2C3+Halg8ni8q45bBYzzu9jslh75C67xcUVX5gcODx2zrrL7rFpVSebR9+WVYwenzfJ BbBEcdmkpOZklqUW6dslcGX83naaueAUR8X7/wsYGxjnsncxcnJICJhIbJ1+hqmLkYtDSGAJ o8Ta00+ZIZwmJomps94zglSxCRhKdL3tYgOxRQQcJQ5N3sgCUsQs8I9R4t3VVWAJYQF3iXvT u8AaWARUJeZfXs8MYvMK2Ei0/5jODLFOXmL1hgPMExi5FjAyrGIUSS0tzk3PLTbSK07MLS7N S9dLzs/dxAgMh23Hfm7Zwdj1LvgQowAHoxIPr4D552gh1sSy4srcQ4wSHMxKIrxvo4FCvCmJ lVWpRfnxRaU5qcWHGKU5WJTEec8bVEYJCaQnlqRmp6YWpBbBZJk4OKUaGPflz77Sfo09v+45 /33D+BieqXGHOk5X71JM+MMQ85Il7pYUs/Tia6+K91y8ez/9iJnm71czmRktT7//tmjd2f67 smW918TF7rl9EXNyvaQxUa8sjlOqPKaM70fpb/fJRj0+32qSJ9Yb+t9kdUm+WfE6IHKjGxO7 8yM7M83pk+xvvW/smL7vlRJLcUaioRZzUXEiANxJDY0DAgAA X-CMS-MailID: 20181120123855eucas1p1a969fba923e9243e576cae0b632504af X-Msg-Generator: CA CMS-TYPE: 201P X-CMS-RootMailID: 20181120123855eucas1p1a969fba923e9243e576cae0b632504af References: Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org 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 --- 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(-) -- 2.17.1 Reviewed-by: Krzysztof Kozlowski 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;