lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1545100282-15756-1-git-send-email-chuanjia.liu@mediatek.com>
Date:   Tue, 18 Dec 2018 10:31:22 +0800
From:   <chuanjia.liu@...iatek.com>
To:     <sean.wang@...nel.org>, <linus.walleij@...aro.org>,
        <matthias.bgg@...il.com>, <linux-mediatek@...ts.infradead.org>,
        <linux-gpio@...r.kernel.org>,
        <linux-arm-kernel@...ts.infradead.org>,
        <linux-kernel@...r.kernel.org>
CC:     <zhiyong.tao@...iatek.com>, <eddie.huang@...iatek.com>,
        <hailong.fan@...iatek.com>, <youlin.pei@...iatek.com>,
        <chuanjia.liu@...iatek.com>,
        Chuanjia Liu <Chuanjia.Liu@...iatek.com>
Subject: [PATCH v2] pinctrl:mediatek:add judgment conditions

From: Chuanjia Liu <Chuanjia.Liu@...iatek.com>

This patch avoid return err when virtual gpio set SMT.

Signed-off-by: Chuanjia Liu <Chuanjia.Liu@...iatek.com>
---
change note:
v2 : 1. delete virtual gpio number
     2. add judgment conditions
---
 drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c b/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c
index 4a9e0d4c2bbc..a576e417744a 100644
--- a/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c
+++ b/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c
@@ -290,7 +290,11 @@ static int mtk_xt_set_gpio_as_eint(void *data, unsigned long eint_n)
 		return err;
 
 	err = mtk_hw_set_value(hw, desc, PINCTRL_PIN_REG_SMT, MTK_ENABLE);
-	if (err)
+
+	/* SMT doesn't support virtual GPIO, add err != -ENOTSUPP is used for
+	 * avoid return err when virtual gpio set SMT.
+	 */
+	if (err && err != -ENOTSUPP)
 		return err;
 
 	return 0;
-- 
2.19.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ