Received: by 2002:a05:6602:2086:0:0:0:0 with SMTP id a6csp3906211ioa; Tue, 26 Apr 2022 12:05:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx90IAS71FPoUGzpUsN39ysgqND/NsjLNd/Fv+f1QR+wPVwsLZVnvxq056TOakbvNMWiIkI X-Received: by 2002:a17:902:b613:b0:156:7d82:c09b with SMTP id b19-20020a170902b61300b001567d82c09bmr24644157pls.80.1650999907051; Tue, 26 Apr 2022 12:05:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650999907; cv=none; d=google.com; s=arc-20160816; b=nr2NIAf3VjhBiDWSjtK7mrdecpZG/+45k+2yMfGw4F/YiCm1+nG52+QmxUI0QH02Dc CU/gaZtJq6V6f/fwwzANcu8BF0XyxideFNE0helRT21bJE0d/nwZaaLhT+0D0xEKYssm 8VXPHBNA380urNyDigEzqikkVW2KIIPl1eotR7pAO+3kPYLQlujy/ZjNRo3ExqRHnv3a fWTr0qsh9DN+BqMg1GW4UugDHGIE6UW4jKCf7dKD65ya10jHCLoCbqHqPSHQY9Is8ilj an4jHj+II+iUHMlNcw8iMAJOS/ptOkmrREEXKEVyeGM+E3DyvQ5fhEvoL5t/ZclUngmD 9sZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=AdKMYq1x4eFZR1761jMnOKfmipBzzsQvF9m6fKna6z4=; b=JC+4XGbeSQcEXQp9B3kkNDDu+tpUXt0JOZH4pQ/HR5SrtEbc4K4yf05AvSouvFpo/U 9L6MBHG/DLTt/wEATtzQhe5pTct0cfV1BbOW5Imh7eGvd5RH2updMuoJGEMjLjlCO8Jo MCYqeB6xfsuMWR1h4WNUkwaSrpJcmYiiqGqdM5+4rpnpSYxs6dwvv/eeaxWnw7yHY08N SRDRaLL6vRRJ1FZhaW6TbwO3Vyv5VZfTozDWBUJNX9Gi1px1gJMM8c0Y4+EzU4RgA4zC l2Pcarbezn1kzCsAFD8FKgakapNj3q225sCBVoFIczoiCxpFF3DfFebohC/HinytvWQf mx8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=lDscyfKc; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h10-20020a056a00170a00b00508248f5e21si20700222pfc.153.2022.04.26.12.04.50; Tue, 26 Apr 2022 12:05:07 -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=@gmail.com header.s=20210112 header.b=lDscyfKc; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349131AbiDZKgy (ORCPT + 99 others); Tue, 26 Apr 2022 06:36:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57428 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349228AbiDZKgm (ORCPT ); Tue, 26 Apr 2022 06:36:42 -0400 Received: from mail-ej1-x633.google.com (mail-ej1-x633.google.com [IPv6:2a00:1450:4864:20::633]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 120E21B7A9; Tue, 26 Apr 2022 03:19:05 -0700 (PDT) Received: by mail-ej1-x633.google.com with SMTP id y3so14684114ejo.12; Tue, 26 Apr 2022 03:19:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=AdKMYq1x4eFZR1761jMnOKfmipBzzsQvF9m6fKna6z4=; b=lDscyfKc/f26HqBYW5qPexzS57/2t5Fem/L8v0LNCuw3VArs/RHcMQrMTFpcDATVix Oxj3ZqfbTTcftOa/bvwgxeQwqYmqYMEvnZn1xFceiYAlXSzVwexcm028oXwPeHm5Cn5b dEki/D9koY1Vi4+3+idJLeArTzRzvb0LbS9P51sH8du51bsi2F2UzbaK5tlQunizK5D+ N+Xui1PR8XJXTxpFL/dZZDYt0uIZ9XC+kXT7UyFLixcO+VIUTD23OHFX/VUuGHw1Srj1 si8LK/h7EJuYJDyI5tSOwf0eLojJAtVXFae4YC/9MgFpXCmt6mOC864rcTVx8H0W4p1p xsLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=AdKMYq1x4eFZR1761jMnOKfmipBzzsQvF9m6fKna6z4=; b=U65/fn08k3+jKExKJYdfZt46YNr8Xqd+bqMBDY0wYO7L4ovcSHjrE5v+RvLPMHb4ec irlEGNsq4Tjv53kq6VYMHXVI1kH2IW3qw9TxBiR1qFS+9AO32ebOLUVFpAjFbV9PMzLA SYk76gveM1aHJC/uPq4KN+sA/jDsNuG2FbBCGU+xYKhbSfekyephYh736VmMHCifSY0S ixZI4tbtUAMUUQn+M3kRgS8h6FmMPJ2kJaGmq9ubj5Vy4o8+wAZO1LrgMTcuJzK0lHZf CFiE3H5DnCmpOZMnKXNUI9z2TNWi1mjKHGTyZPnKp3U+UEpyFbSI0kqSwXogA5c4gzEW 057w== X-Gm-Message-State: AOAM532Muo7oBxkFcrIOWRuvj9DyUa7hSAXN2ymKiljAPJBGlVjViil0 VNtL8+eYg7GmmlEuzncwZJxQNS/uiF7xiWf6fqhGpMDNSefSBUvZ X-Received: by 2002:a17:907:628e:b0:6d9:c6fa:6168 with SMTP id nd14-20020a170907628e00b006d9c6fa6168mr20282272ejc.132.1650968343655; Tue, 26 Apr 2022 03:19:03 -0700 (PDT) MIME-Version: 1.0 References: <20220425121340.1362-1-heikki.krogerus@linux.intel.com> <20220425121340.1362-2-heikki.krogerus@linux.intel.com> In-Reply-To: <20220425121340.1362-2-heikki.krogerus@linux.intel.com> From: Andy Shevchenko Date: Tue, 26 Apr 2022 12:18:24 +0200 Message-ID: Subject: Re: [PATCH v1 1/2] usb: core: acpi: Use the sysdev pointer instead of controller device To: Heikki Krogerus Cc: Greg Kroah-Hartman , Felipe Balbi , "Rafael J. Wysocki" , Mathias Nyman , Andy Shevchenko , USB , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS 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 Mon, Apr 25, 2022 at 3:41 PM Heikki Krogerus wrote: > > The controller device (hcd) does not always have the ACPI > companion assigned to it at all. We can not rely on it when > finding the ACPI companion for the root hub. Instead we need > to use the sysdev pointer here. ... > if (!udev->parent) { > /* root hub is only child (_ADR=0) under its parent, the HC */ I believe the comment can be amended now to point out that we use the physical device representing the parent of this child, and not (always) a direct parent of the device in terms of Linux device model. > - adev = ACPI_COMPANION(udev->dev.parent); > + adev = ACPI_COMPANION(udev->bus->sysdev); > return acpi_find_child_device(adev, 0, false); > } -- With Best Regards, Andy Shevchenko