Received: by 2002:a05:6a10:5594:0:0:0:0 with SMTP id ee20csp281101pxb; Mon, 25 Apr 2022 09:54:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx2kafPv/TR+WoVFmH6bSpwIU6BkUCIKKUpqINJFOll/F//lE8hpWmmCgbPQ56QPmYeADet X-Received: by 2002:a17:907:1b25:b0:6da:8206:fc56 with SMTP id mp37-20020a1709071b2500b006da8206fc56mr16783434ejc.81.1650905651743; Mon, 25 Apr 2022 09:54:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650905651; cv=none; d=google.com; s=arc-20160816; b=agEnm6zOwKjnv5HqokYawqr9w5u1A3MaMG+A44cEd9t6CretSIvKndBE0yriHRC4Ge OKZhiaEMUjPR9zaUUnXeARhRD2iD3n665+Ut9ZgtCThu+i6jvWltKYWTj4l+/3EVYDPf 8gN4nHd1uFRFRomwBp4tVM/RKd0IYqnGTyLRp3mS5XAvQ+yc+nS61Lb12reEzSAbomqQ fe+1L/ob8skOZ6563Hu/Akpx3gt7sv7gvH1DokT635TpIS7P+NmgpNfBfR4MrJq2gVWW dhZgnDgMxJ3gRfDOdozXGQi0TabypJHVJ2A09lfPOUifmiB6Y3ApodAnuiN99Qc3gzsK dQjg== 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=XNJ9Jdw2da3UFY4COeaXyBV+RHP51b8xi+jzTx/Npsw=; b=edH0P+Hk2pyH7XWTqCKPVhac1W7uhwZredDqQhiO+2FIJDslyuph5qCY3j1HP+PbIF SlgK8IaBzFI/XmPn1s9iFPJxQSayEfIUZIJHjwVUd0LlhC0oRWam1veISBXyrv+OH5Rs V75BJ+F7nr8eylXQw5/9ofJIRx0oUhHcjlXrIiFnlRMh6iiPq8CclZgZB3f1dWwBGfkC +hABZCqFZ2Y+lTbANPfSBxzq82LK0Wfl34YzG4TewqddLLMyfnlo9+NOFQbhy8lBRscA p6SfeoXSicmOm18Pdrv95nivomJgY6Dcf/Twt0h8gAXuA2I+/uD7oy19VOsjPg3vHC+N FdJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=G78c213x; 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 b17-20020a056402279100b00423e5ecea92si13972533ede.452.2022.04.25.09.53.42; Mon, 25 Apr 2022 09:54:11 -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=G78c213x; 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 S240059AbiDYMQx (ORCPT + 99 others); Mon, 25 Apr 2022 08:16:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35012 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231922AbiDYMQt (ORCPT ); Mon, 25 Apr 2022 08:16:49 -0400 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A1CA4193D4; Mon, 25 Apr 2022 05:13:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1650888825; x=1682424825; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=+/qh612LBKatRiWstzGf4VFJepxi//hEf4y18HWsw28=; b=G78c213x5XVYJIlYGlsGvdym8Pfrt0a3uEw1EB3mGg+GEy2J2lGYcYAM F3LIr8vzVlTHPu3mlzdreRlw7PPQdhtWXiBIUYhIo8H+mQtMvj15eeoMf fhsh/Otu2JZoXI9aAgbjVF9MzJqtN2CFSOSnYpsOcyoDuWG4FIJHVinJl a8TO2qiZXCJJfK4Yx8brKCkdz1iKAo0gzmK2/LZ+3XWXGNDJbo3vmYv6T CUk2Y0GNbPmryUYRyY6UIc1Q1WPPWKqcL/qBIfR15UYxq7yJX/VjARJCT N68N6vfUaS2ErkwBibK08oljgeTaamjXE0yWsaMBvslVmhDHttw8qncR4 g==; X-IronPort-AV: E=McAfee;i="6400,9594,10327"; a="351676968" X-IronPort-AV: E=Sophos;i="5.90,288,1643702400"; d="scan'208";a="351676968" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Apr 2022 05:13:45 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,288,1643702400"; d="scan'208";a="704535988" Received: from black.fi.intel.com (HELO black.fi.intel.com.) ([10.237.72.28]) by fmsmga001.fm.intel.com with ESMTP; 25 Apr 2022 05:13:43 -0700 From: Heikki Krogerus To: Greg Kroah-Hartman Cc: Felipe Balbi , "Rafael J. Wysocki" , Mathias Nyman , Andy Shevchenko , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v1 1/2] usb: core: acpi: Use the sysdev pointer instead of controller device Date: Mon, 25 Apr 2022 15:13:39 +0300 Message-Id: <20220425121340.1362-2-heikki.krogerus@linux.intel.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220425121340.1362-1-heikki.krogerus@linux.intel.com> References: <20220425121340.1362-1-heikki.krogerus@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE 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 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. Signed-off-by: Heikki Krogerus --- drivers/usb/core/usb-acpi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/core/usb-acpi.c b/drivers/usb/core/usb-acpi.c index bb1da35eb891e..fbaf5045507bb 100644 --- a/drivers/usb/core/usb-acpi.c +++ b/drivers/usb/core/usb-acpi.c @@ -206,7 +206,7 @@ usb_acpi_find_companion_for_device(struct usb_device *udev) if (!udev->parent) { /* root hub is only child (_ADR=0) under its parent, the HC */ - adev = ACPI_COMPANION(udev->dev.parent); + adev = ACPI_COMPANION(udev->bus->sysdev); return acpi_find_child_device(adev, 0, false); } -- 2.35.1