Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp521493iog; Wed, 29 Jun 2022 05:11:49 -0700 (PDT) X-Google-Smtp-Source: AGRyM1t+BuU5vk4qWoDswNgiWozR/viVaQTLCDYsLSkowT5u6yD9MX7xVNJOcTbbt4X4heTyx2jW X-Received: by 2002:a05:6402:3595:b0:437:7cb2:9a6f with SMTP id y21-20020a056402359500b004377cb29a6fmr3795760edc.334.1656504709466; Wed, 29 Jun 2022 05:11:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656504709; cv=none; d=google.com; s=arc-20160816; b=W2mzG04I8eDq3c6wR5gQ47Hixg9ksS1bY0Cp2Z5I4+pCmI8nYlCRRk3jgvOCroKDsw i6fadSg3dEp86CSQO8E/XLgWseMpdTQg1bVgmuAlDiegESzK5h3LQbhCPXFCcGsep2RZ krIA2XEDawFmC+QRReZabRpGilQoWqBdaDTfASqOdpg3j/jMlGh3VT3FNC7LC44qoD6W Rk46H7qPldTucPxEY7KJTIRMTj9G7gggp4emgFrLPlWmj10dYnpVxQQDLqgfXMuIawsi DlKuud+TMoE0XC+lsY1PqqN1HyLB1EwGwKAUuM7Y8v8fPqjcBSz2Zk3CJ3ePgdQ52hIi a+Rw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=yQnow1HOWKp6DTCQhD+GSVuXLmEvSvqdkzWLPD+qIrE=; b=QzQaAXAQKe5zNn4CX7dyQ6040zoCe9UIrEsc42AaObVZ2zxhT8denW2qVrunFqgH95 3/Qhn0JgNQ4NUj8IiAEFjaFYdKhrhD8fRgVibXfC0MVujzlRlZtBHHj4PCeABjmfeGIl UeOwnBpo7YvxxvLJIuXNCz/qHGt1IIdbuEngDBxxyZi3UZJp+np0T3YHbEBRIZy7VsV+ cQG5mJSLUdFLdS3Htro23Gidjadz2QaRQaq9XHe40Tcrk5KCoH52WxRywP9kIm5Deg46 X4gql0pXVuRN4XkgusgKKaOkIu1715z9JE+8SamrSKhfW3Z1ur0RSDWNXaP279Ho4b7I RVTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=mtxix1FQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i18-20020a1709064fd200b00722e1a20e41si2928502ejw.214.2022.06.29.05.11.18; Wed, 29 Jun 2022 05:11:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=mtxix1FQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233189AbiF2LuL (ORCPT + 99 others); Wed, 29 Jun 2022 07:50:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55150 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231579AbiF2LuJ (ORCPT ); Wed, 29 Jun 2022 07:50:09 -0400 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 35BF93EF31; Wed, 29 Jun 2022 04:50:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1656503408; x=1688039408; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=+6krQVdijwrt6bSpN8vEUeyDsgnZZttj6KBYBLaI76c=; b=mtxix1FQ8+cQX6Gs/FOATH6U0jKIPglFayqAMHtCld+fIst0YpQpJHhb fM7hHTwHoJZh2cF/x2DSM2Gk8IvtJCCdW8NOAec3EnHQWFm4PnDlyLPqz nvOqtPk6SuEOYmf6eLZ2J0QYB++y1rYYFHpq8XxiLgbotfTpUGG8/BOn0 lbOoyQ+WG8capIIk+xQOzR0VDGiVEPyyNLpQeZ7jIS3IGdixaR3g73k9G PD1q/TA2jWkETZYzvWa+ScawOnGxNqHkRAQyPpBpXlshP4QvlVQ//CdwT W6IWIf1oczrUAVW+lQMSjHO1frHHr/eK0+PT0yERYuSDJFoQKOXed+29b Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10392"; a="270773989" X-IronPort-AV: E=Sophos;i="5.92,231,1650956400"; d="scan'208";a="270773989" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jun 2022 04:50:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.92,231,1650956400"; d="scan'208";a="590723543" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga002.jf.intel.com with ESMTP; 29 Jun 2022 04:50:05 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 33E0DF1; Wed, 29 Jun 2022 14:50:11 +0300 (EEST) From: Andy Shevchenko To: Rob Herring , Frank Rowand , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org Cc: Rob Herring , Frank Rowand , Linus Walleij , Bartosz Golaszewski , Andy Shevchenko Subject: [PATCH v3 2/2] of: unittest: make unittest_gpio_remove() consistent with unittest_gpio_probe() Date: Wed, 29 Jun 2022 14:50:10 +0300 Message-Id: <20220629115010.10538-2-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220629115010.10538-1-andriy.shevchenko@linux.intel.com> References: <20220629115010.10538-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On the ->remove() stage the callback uses physical device node instead of one from GPIO chip and the variable name which is different to one used in unittest_gpio_probe(). Make these consistent with unittest_gpio_probe(). Signed-off-by: Andy Shevchenko --- v3: new patch drivers/of/unittest.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/drivers/of/unittest.c b/drivers/of/unittest.c index 5a842dfc27e8..eafa8ffefbd0 100644 --- a/drivers/of/unittest.c +++ b/drivers/of/unittest.c @@ -1620,20 +1620,19 @@ static int unittest_gpio_probe(struct platform_device *pdev) static int unittest_gpio_remove(struct platform_device *pdev) { - struct unittest_gpio_dev *gdev = platform_get_drvdata(pdev); + struct unittest_gpio_dev *devptr = platform_get_drvdata(pdev); struct device *dev = &pdev->dev; - struct device_node *np = pdev->dev.of_node; - dev_dbg(dev, "%s for node @%pOF\n", __func__, np); + dev_dbg(dev, "%s for node @%pfw\n", __func__, devptr->chip.fwnode); - if (!gdev) + if (!devptr) return -EINVAL; - if (gdev->chip.base != -1) - gpiochip_remove(&gdev->chip); + if (devptr->chip.base != -1) + gpiochip_remove(&devptr->chip); platform_set_drvdata(pdev, NULL); - kfree(gdev); + kfree(devptr); return 0; } -- 2.35.1