From patchwork Mon Mar 23 19:55:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 11453751 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 77F7417D4 for ; Mon, 23 Mar 2020 19:55:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6303D20774 for ; Mon, 23 Mar 2020 19:55:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726128AbgCWTzs (ORCPT ); Mon, 23 Mar 2020 15:55:48 -0400 Received: from mga03.intel.com ([134.134.136.65]:63557 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725839AbgCWTzs (ORCPT ); Mon, 23 Mar 2020 15:55:48 -0400 IronPort-SDR: V+YADPK+c+cy1HPF2ntklSIz8XkYYNJT8O+uXaQdAvVnJVxBvaodpyNlopThNcmGBz4AtHKigG +7DzaMCESgvw== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Mar 2020 12:55:47 -0700 IronPort-SDR: GkUSmEDGXADXUGzv+vM/PvPrrIgt6AA7AKWJVbEOlQmSkaKHPHFu3YQsbfCddWyR3Dwy/RElBV StY9pnHwTE5Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,297,1580803200"; d="scan'208";a="419623397" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga005.jf.intel.com with ESMTP; 23 Mar 2020 12:55:46 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 68C4914B; Mon, 23 Mar 2020 21:55:44 +0200 (EET) From: Andy Shevchenko To: Greg Kroah-Hartman , linux-usb@vger.kernel.org, "Rafael J. Wysocki" , linux-acpi@vger.kernel.org Cc: Andy Shevchenko Subject: [PATCH v1] usb: core: Add ACPI support for USB interfaces Date: Mon, 23 Mar 2020 21:55:43 +0200 Message-Id: <20200323195543.51050-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org The ACPI companion of the device has to be set for USB interfaces in order to read and attach the properties described in the ACPI table. Use ACPI_COMPANION_SET macro to set this. Signed-off-by: Andy Shevchenko --- drivers/usb/core/message.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/usb/core/message.c b/drivers/usb/core/message.c index 5adf489428aa..d5f834f16993 100644 --- a/drivers/usb/core/message.c +++ b/drivers/usb/core/message.c @@ -5,6 +5,7 @@ * Released under the GPLv2 only. */ +#include #include /* for scatterlist macros */ #include #include @@ -1941,6 +1942,7 @@ int usb_set_configuration(struct usb_device *dev, int configuration) intf->dev.of_node = usb_of_get_interface_node(dev, configuration, ifnum); } + ACPI_COMPANION_SET(&intf->dev, ACPI_COMPANION(&dev->dev)); intf->dev.driver = NULL; intf->dev.bus = &usb_bus_type; intf->dev.type = &usb_if_device_type;