From 418d89456b535faaf9a9cec75132df2f1a62d54c Mon Sep 17 00:00:00 2001 From: Dmitry Ornatsky Date: Mon, 21 Dec 2015 12:54:28 -0600 Subject: [PATCH] pinctrl: pinctrl-msm: do not dump unallocated GPIOs Do not dump GPIOS that are not allocated by HLOS. This is a temporary change to avoid TZ exceptions. origin CR:(CR) Change-Id: I7b231457d186cbdc0a900b153bc8b09e9ccffddd Signed-off-by: Dmitry Ornatsky Reviewed-on: http://gerrit.mot.com/808904 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Igor Kovalenko Submit-Approved: Jira Key Reviewed-on: https://gerrit.mot.com/1230533 SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Xiaopeng Li Reviewed-by: Konstantin Makariev Submit-Approved: Jira Key Reviewed-on: https://gerrit.mot.com/1400180 Reviewed-on: https://gerrit.mot.com/1436604 Reviewed-on: https://gerrit.mot.com/1509717 Reviewed-by: Wang Wang Reviewed-on: https://gerrit.mot.com/1780444 Reviewed-by: Huosheng Liao --- drivers/pinctrl/qcom/pinctrl-msm.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/pinctrl/qcom/pinctrl-msm.c b/drivers/pinctrl/qcom/pinctrl-msm.c index 707183744178..3408d57bcfb0 100644 --- a/drivers/pinctrl/qcom/pinctrl-msm.c +++ b/drivers/pinctrl/qcom/pinctrl-msm.c @@ -594,6 +594,11 @@ static void msm_gpio_dbg_show_one(struct seq_file *s, if (!gpiochip_line_is_valid(chip, offset)) return; + if (!gpiochip_is_requested(chip, offset)) { + seq_printf(s, " gpio%d: is not allocated in gpiolib\n", offset); + return; + } + g = &pctrl->soc->groups[offset]; ctl_reg = msm_readl_ctl(pctrl, g); io_reg = msm_readl_io(pctrl, g);