From patchwork Mon May 22 13:59:35 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shawn Guo X-Patchwork-Id: 100302 Delivered-To: patch@linaro.org Received: by 10.182.142.97 with SMTP id rv1csp1409463obb; Mon, 22 May 2017 07:00:28 -0700 (PDT) X-Received: by 10.99.2.3 with SMTP id 3mr25312638pgc.17.1495461627960; Mon, 22 May 2017 07:00:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1495461627; cv=none; d=google.com; s=arc-20160816; b=DuuNR3Ua52+JhwYXJbyi2onrsDZnea6LNwKHFSAiIKr834jxWvOpn80p0iC6IZLky5 Lh9wiB6XXofB3pcv3OLUSXyJpuwpkUAAgfve4+4vUQVnSleguCCATE950yHBHf0oETHw ZwCMqSnFAW8S9ZuDgzC9fkjqyMAwv21OB3BhDzm5K2lLLtgq/DHC48qb+ii/ysgj9cs9 +WMWp1YA2aB5DpWLSji6uYANOnsRISzgoCkgEJprdp0yD1/BuFrrTXd37hdar65JKCPh JqQOTzNi+e8CoFucQJGWoZUmUOpdx+NiLR0Y9pj9KkxNDfpeeBhrUO/mz/foHy34Lp8N l3sA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dmarc-filter:arc-authentication-results; bh=QCT109HJY6j892vk5P5jqgobPqr6GlBfjQXHbR0Uoy8=; b=RVQNSy8ln5JT7CY0kHvvP0NXtYFHQPg4bP3dH95cktlyqwHEeS5zcrMk8XCcLhLj/Y sQWJiJcKhW32zlSeVm9x08/iKcLefphkrc/SLIn291tayPndFuokAkmQveGPSbCWAIFJ 89ieGuLB2aBKEwCHusJft0r+snxRMNoa1vTIeZhRcY1s1Uxz63d4IHlkxoLHgBdhlsKH AAFapaHlwL4WbN8WnQkIcZFZJpO9S3kqeFI4myENTPC9fULvP2Kz0yCEUWBIS5JvMT+y e2VTQeVJZY8unleWUpv/JiNZB/9GvyZp5hN8+nBPO7PA64qGfqtwNZjkJOhGzHYeOEvJ 5/EQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-gpio-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q72si17641745pfl.405.2017.05.22.07.00.27; Mon, 22 May 2017 07:00:27 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-gpio-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933744AbdEVOA0 (ORCPT + 4 others); Mon, 22 May 2017 10:00:26 -0400 Received: from mail.kernel.org ([198.145.29.99]:39436 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933667AbdEVOA0 (ORCPT ); Mon, 22 May 2017 10:00:26 -0400 Received: from localhost.localdomain (unknown [106.187.91.102]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 21BE1239E2; Mon, 22 May 2017 14:00:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 21BE1239E2 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=shawnguo@kernel.org From: Shawn Guo To: Linus Walleij Cc: linux-arm-kernel@lists.infradead.org, linux-gpio@vger.kernel.org, Shawn Guo Subject: [PATCH] pinctrl: zte: fix group_desc initialization Date: Mon, 22 May 2017 21:59:35 +0800 Message-Id: <1495461575-29488-1-git-send-email-shawnguo@kernel.org> X-Mailer: git-send-email 1.9.1 Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org From: Shawn Guo There are a couple of issues with group_desc initialization in function zx_pinctrl_build_state(). - num_pins is not initialized and remains zero. - pins shouldn't be initialized with a pointer to variable in the stack. With them fixed, pin_request() in pinmux_enable_setting() can be invoked correctly. Signed-off-by: Shawn Guo --- Hi Linus, This is a fix for ZTE pinctrl driver that is queued on your devel branch. Shawn drivers/pinctrl/zte/pinctrl-zx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/pinctrl/zte/pinctrl-zx.c b/drivers/pinctrl/zte/pinctrl-zx.c index 2aca4e4b3f1c..787e3967bd5c 100644 --- a/drivers/pinctrl/zte/pinctrl-zx.c +++ b/drivers/pinctrl/zte/pinctrl-zx.c @@ -282,10 +282,10 @@ static int zx_pinctrl_build_state(struct platform_device *pdev) for (i = 0; i < ngroups; i++) { const struct pinctrl_pin_desc *pindesc = info->pins + i; struct group_desc *group = groups + i; - int id = pindesc->number; group->name = pindesc->name; - group->pins = &id; + group->pins = (int *) &pindesc->number; + group->num_pins = 1; radix_tree_insert(&pctldev->pin_group_tree, i, group); }