From patchwork Thu Mar 11 09:00:49 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shawn Guo X-Patchwork-Id: 397477 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp141323jai; Thu, 11 Mar 2021 01:01:00 -0800 (PST) X-Google-Smtp-Source: ABdhPJzhubFMc9GHxxLPmYOIHN+0Ot/9H9EcQtBROBcWBFc836ZPHTbwR444aKJjDGy5mBweNfaV X-Received: by 2002:a17:906:7cc:: with SMTP id m12mr2003511ejc.171.1615453260536; Thu, 11 Mar 2021 01:01:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615453260; cv=none; d=google.com; s=arc-20160816; b=ZTI7kQ2+AcM2r4NXvpM08R/sP+jc9NtOBVexVNgjFvMim9DNGQGhDDbCIidVCHdBz1 aBsCJc9HnYl1Lyvw0gjpsbeSb+KH54LolWrkLx9DzxDI3hWbcDBmpcZI45aoDWh2nJBQ hKb3m8yTyM0lWuGMAh9fH1oMir1pQkpOftKjD55Prgud9prkq985M16Zhr4AEz8KiSYS 8+VAY/+wRwcA26eYmuvSy8ISM3DEZ+mECAyCZtqwaCIM2PYAul/XhTVRt0qjjs8C64OZ Fj6EXuf5XhaeAm+hot+QQYB2+fVXVJiBaFnnHzAWtmz+0gQ3ReWoeH5bw6ltrYzc0Ruh oF6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from :dkim-signature; bh=qIBHCWzKJJjDmvyCh1b8W/iF9n5EqxTW50Y/4eXZCoU=; b=T/Ct8z34vJn/IRWx7jK8SGk8R7SCGQBhe77PHLnO5JjNEztB8hEasvw457tJGWbyR8 3zT83Zsni7itTBZh2bw39YMasKy5qxITpsguMPgj/PU2JAC6FaA2TVVd/EU3RTiwYM4v xQ+tdqQp1vroIW+Fe3SgX+MskXhYIsVA9Bc9Q9A0VlinaSPv8dnwVX8UHBmgTb+sBHmb VHqbxS+3P3iWVLhZgTpw0tQDYimUvzvHehP+lBfE/GZNPlXV48Y2l4CITav+46bwrRIo ZtpNefclnY3/nP7Hbn5hv0vpMeKBtQuIU/H/phzJ9iMevNeUx2My9CgqSjfvkOBeFjE8 7K9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ZbSVbPeu; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u8si1376146ejt.132.2021.03.11.01.00.59; Thu, 11 Mar 2021 01:01:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ZbSVbPeu; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231735AbhCKJA7 (ORCPT + 16 others); Thu, 11 Mar 2021 04:00:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45278 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231788AbhCKJA6 (ORCPT ); Thu, 11 Mar 2021 04:00:58 -0500 Received: from mail-pj1-x102b.google.com (mail-pj1-x102b.google.com [IPv6:2607:f8b0:4864:20::102b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5B297C061574 for ; Thu, 11 Mar 2021 01:00:58 -0800 (PST) Received: by mail-pj1-x102b.google.com with SMTP id nh23-20020a17090b3657b02900c0d5e235a8so9020946pjb.0 for ; Thu, 11 Mar 2021 01:00:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=qIBHCWzKJJjDmvyCh1b8W/iF9n5EqxTW50Y/4eXZCoU=; b=ZbSVbPeuLFBwUZfqSzmF/03QD0/d22RJ+yYj/brm3j/kFFHLkZ/CCnzc3MC6WYq1f/ NYkwbhTvfoObhSyni78APKvrvJYlARDRHcyW3KwDjUeo/ud3T3RbDIME6TkR87+PBT3i dgqf8wB989iQvcfMNwSdH1ALt3Ep884jB7xRdgiY5UTMSbg591D7mxlk+JkS9kJ9HZ+y d7betEZWOvj9xTlugdCULz2b5OGVtA6PDYppAiVNGDlvS1SOPYk4CIpzeB/oe57fiffG 5cP/bvt7V9Pu9E6KFOqmroGv431xh1FPFQWKlLg3Hee/Ckxe9hOe+vBAxs2EmCZ0r1P9 inug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=qIBHCWzKJJjDmvyCh1b8W/iF9n5EqxTW50Y/4eXZCoU=; b=IDcREB4ntN7TqavV3Buf4ZMYvt0ZbhICC3gJWR7/dLN2BQ2xmreew3i0Vl8Bixdrr0 ca6sSdBCBhd8eDTf0G0lBGOOp+ZXw9egVg4kRBvY8tE3AAP4jVn9Uq2Mv5q5ma0RuRCQ +cA/y45x2goYtJoQ7fkn7+3QHZpR6wCc5ljSePjpVNiSQlzYnJyOIRnsVT2k9TOs0ibh 0nU10mUSx5ixZyOG9kFED5u6Npje3YLSciLicuG39u1r6cBME3u7zNRil7zT8j46MOGL n8yilgeWRMhvJA0/ywfItKVGVU1Gl9IiPJpUnEAFkvSqrR1H3sKRhOOhAyzNJXDHtryO liqA== X-Gm-Message-State: AOAM532gn56E6Ct+Y69Kg/ZXL6K7LBe+6BcpAlxV71gikazced7GqqPC pVllGSfzTPtfKW9zt5pI5C3lNZu/zp7naQ== X-Received: by 2002:a17:90b:116:: with SMTP id p22mr7771781pjz.161.1615453257771; Thu, 11 Mar 2021 01:00:57 -0800 (PST) Received: from localhost.localdomain (80.251.214.228.16clouds.com. [80.251.214.228]) by smtp.gmail.com with ESMTPSA id k27sm1873201pfg.95.2021.03.11.01.00.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Mar 2021 01:00:57 -0800 (PST) From: Shawn Guo To: Felipe Balbi Cc: Bjorn Andersson , Heikki Krogerus , Greg Kroah-Hartman , linux-arm-msm@vger.kernel.org, linux-usb@vger.kernel.org, Shawn Guo Subject: [PATCH] Revert "usb: dwc3: qcom: Constify the software node" Date: Thu, 11 Mar 2021 17:00:49 +0800 Message-Id: <20210311090049.7354-1-shawn.guo@linaro.org> X-Mailer: git-send-email 2.17.1 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org This reverts commit 8dc6e6dd1bee39cd65a232a17d51240fc65a0f4a. The commit causes an regression for ACPI probe on Lenovo Yoga C630 laptop. platform_device_add_properties() will fail with -EEXIST for the second USB instance, because of the software_node_to_swnode() check in function software_node_register(). Signed-off-by: Shawn Guo --- drivers/usb/dwc3/dwc3-qcom.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) -- 2.17.1 diff --git a/drivers/usb/dwc3/dwc3-qcom.c b/drivers/usb/dwc3/dwc3-qcom.c index 0c11e45bccaf..7dc74885a635 100644 --- a/drivers/usb/dwc3/dwc3-qcom.c +++ b/drivers/usb/dwc3/dwc3-qcom.c @@ -570,10 +570,6 @@ static const struct property_entry dwc3_qcom_acpi_properties[] = { {} }; -static const struct software_node dwc3_qcom_swnode = { - .properties = dwc3_qcom_acpi_properties, -}; - static int dwc3_qcom_acpi_register_core(struct platform_device *pdev) { struct dwc3_qcom *qcom = platform_get_drvdata(pdev); @@ -620,17 +616,16 @@ static int dwc3_qcom_acpi_register_core(struct platform_device *pdev) goto out; } - ret = device_add_software_node(&qcom->dwc3->dev, &dwc3_qcom_swnode); + ret = platform_device_add_properties(qcom->dwc3, + dwc3_qcom_acpi_properties); if (ret < 0) { dev_err(&pdev->dev, "failed to add properties\n"); goto out; } ret = platform_device_add(qcom->dwc3); - if (ret) { + if (ret) dev_err(&pdev->dev, "failed to add device\n"); - device_remove_software_node(&qcom->dwc3->dev); - } out: kfree(child_res); @@ -845,7 +840,6 @@ static int dwc3_qcom_remove(struct platform_device *pdev) struct device *dev = &pdev->dev; int i; - device_remove_software_node(&qcom->dwc3->dev); of_platform_depopulate(dev); for (i = qcom->num_clocks - 1; i >= 0; i--) {