Received: by 10.213.65.68 with SMTP id h4csp2201205imn; Sun, 8 Apr 2018 22:21:54 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/Jyvc3BowK21i2eahUerDo/d7Dbugaf9YFdg2uNohEDs3WtkYsKfmSLUmbqPsSKMWo1JNN X-Received: by 10.98.205.69 with SMTP id o66mr28216921pfg.34.1523251314412; Sun, 08 Apr 2018 22:21:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523251314; cv=none; d=google.com; s=arc-20160816; b=0AM9jFwsD8APGZ62/gB6UPuBOhhmjiFAe2MT/cdYEbXnxAHZbl4BZ1V2j6ovPvQaU7 E7nbzl6DjzyN/qRFFBVZd+MzeRnyy125BC3aOV/vV7EryuOhOqmTzetDHi0JanCFmGf9 pW3bHolbM7Cl3v/lrhXQnBrMXB/8aLz0wu8ObYTLVoVmrPoR+k++CrfdK0/za+FrC7Vo NGrffkP+ozZw0E3X1o19DJhV8Mo8KZwlAkYGKPbe07L83LGADJqapaUGT+sYAXndw3x+ 3zUApnqSgOpBcx+SYtIjakEovBywoBb4fa+7KRXvQTgNr5CaIa+diyGHl6UQ4mnmm0km nwKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=jL66kT/QIldYPGb0LFH0VEwd3aMvnDphNWVlBld5Ft8=; b=OpcLyhzNbRnboBM8qt90TZxB3hfgjU3g7B/wgtgMiVcoykBpie+ab5EM774Eg0lXtP gvciYK1+erAqwFA5sXTiZSDd9JLxuDBvMhNDhKK7XUJDElB/0NxzISFCj3DS8GlwAabX E2qFRt1BCEBPHUg2wZITtU+HmjoHALdB+dSlH8XcFXdkPFG1gREHxFYt8nvP/oA8bTJw 3kMmPR3a4+Z5J/TZ6ygYdnMM55huLjE6dYgLMClbaPfeRzjH5+GYuvtWTRs/7gU+Ud6X lVAfbI7H/qYiw/I0PFgkx2evD6TnVX7uZzvrO06OT5tJJryWBfaPVLqgzui1qIvz/dTK 1xfw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=LYx5guNH; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z19si10809820pgn.46.2018.04.08.22.21.17; Sun, 08 Apr 2018 22:21:54 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=LYx5guNH; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754620AbeDIAWH (ORCPT + 99 others); Sun, 8 Apr 2018 20:22:07 -0400 Received: from mail-sn1nam02on0111.outbound.protection.outlook.com ([104.47.36.111]:52845 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754574AbeDIAWA (ORCPT ); Sun, 8 Apr 2018 20:22:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=jL66kT/QIldYPGb0LFH0VEwd3aMvnDphNWVlBld5Ft8=; b=LYx5guNHQy37oHvxL7xajdI6a72jtQ7et3g9dL0Kzad3+gCb0uE+5jdPhYK3A7pgjJULP3Rl61VMyLlVHpIL3KDikQDn2RjFbRSTl32OozIJbtdH/3tnMeC0gMM9tcnPGDyPrFLoNzkIRXTPRgeJugHImkx7aEnBzbOx3Mq080c= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB0936.namprd21.prod.outlook.com (52.132.131.166) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.696.3; Mon, 9 Apr 2018 00:21:56 +0000 Received: from DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8109:aef0:a777:7059]) by DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8109:aef0:a777:7059%2]) with mapi id 15.20.0696.003; Mon, 9 Apr 2018 00:21:56 +0000 From: Sasha Levin To: "stable@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: Hans de Goede , "Rafael J . Wysocki" , Sasha Levin Subject: [PATCH AUTOSEL for 4.14 004/161] ACPI / LPSS: Do not instiate platform_dev for devs without MMIO resources Thread-Topic: [PATCH AUTOSEL for 4.14 004/161] ACPI / LPSS: Do not instiate platform_dev for devs without MMIO resources Thread-Index: AQHTz5h1iQ7tlLju5U6g9VhV3gXhUQ== Date: Mon, 9 Apr 2018 00:19:44 +0000 Message-ID: <20180409001936.162706-4-alexander.levin@microsoft.com> References: <20180409001936.162706-1-alexander.levin@microsoft.com> In-Reply-To: <20180409001936.162706-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;DM5PR2101MB0936;7:Uej0pgu4nsKxdiQD0qj0JmNAjj6xge9lph0e/Nw37radF4BuXeqW7fX/fIdn02TC+zLm3jI+Z5l6LoVRu+DIpB0WH9n0/cT66vTHmWd4kimpJ8ZpFbn0CF/kuBataX3z7as58JqT+VDsFDTApxSP3dSRJ697jzSBNd0R/OSHJcLxxpDZ7vJm4mnOod8/pO08RlQYMShWwrrrCm/z6PxsWaEhQ3PtYrZsdBREi92jWQKMGQXM+a0JBRM7Ajrwp3IK;20:c9yc+1KyA8CdiXFGUa/Ew51tsYgVMU3z6TvKVwKKZ99RpsPnfMDYV0FBVHRPUVWE75/Evu2UWr+OGqGjugzejASBY9oUpUhB59OJmEG1BvhiDE7nsSqM6LPPStGHqJVU39wLYzfZIN9X1NXAQ8gyYLcDdHDdKR3moPTh4s5b0PQ= x-ms-office365-filtering-ht: Tenant X-MS-Office365-Filtering-Correlation-Id: f8784348-c4ed-4678-a759-08d59dafe6d9 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7193020);SRVR:DM5PR2101MB0936; x-ms-traffictypediagnostic: DM5PR2101MB0936: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(89211679590171)(228905959029699); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(61425038)(6040522)(2401047)(5005006)(8121501046)(93006095)(93001095)(3231221)(944501327)(52105095)(3002001)(10201501046)(6055026)(61426038)(61427038)(6041310)(20161123560045)(20161123564045)(20161123562045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011);SRVR:DM5PR2101MB0936;BCL:0;PCL:0;RULEID:;SRVR:DM5PR2101MB0936; x-forefront-prvs: 0637FCE711 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(346002)(39380400002)(39860400002)(396003)(376002)(366004)(199004)(189003)(3660700001)(36756003)(2501003)(76176011)(5890100001)(10290500003)(2616005)(5250100002)(3280700002)(478600001)(1076002)(72206003)(6436002)(53936002)(486006)(476003)(4326008)(6486002)(107886003)(5660300001)(54906003)(110136005)(102836004)(2906002)(6116002)(3846002)(86612001)(81156014)(81166006)(6666003)(8936002)(305945005)(8676002)(2900100001)(6506007)(68736007)(14454004)(106356001)(105586002)(25786009)(6512007)(86362001)(99286004)(446003)(59450400001)(10090500001)(11346002)(316002)(26005)(7736002)(66066001)(186003)(22452003)(97736004)(22906009)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:DM5PR2101MB0936;H:DM5PR2101MB1032.namprd21.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: Oy85mG/GRPX5v8m9TsCP8DuljM1EnpBLeuv1ZLe7bsJPfjCXhv/Cny9xOjxjHrPXjzFmjoXXYeEkqpNQC0hjb7EYOw5QdSECumtLsThqSva5TBN103GMh+dp1c74kXeTAqW/dlp3w1biEAyqjqHiqztR0gR6o1xj8LAlean0B6YXV9aryMR7ib4hqRjZjxg5cOR7SOL+n0BUPWQa67emAYv8SsLXU2XEcSL1BDwFiZTou2VPTpJmVpqCR38bTGBs1L6GwXe+zWWXINR1nrgYJTaNK/66SyLPCc1OlJxGEIrzslCIxksbeRbxusFwMYOAxKt4HYWM7NVTWN+Ksf26Ns7rTuhOXkdBQHCdKbZE5AMENjTrt7OXyBCfe9GgvPIna4mQ5yjDjSluO4AY6CQVxBDf5Y+aNbq3UalSLpzgxq8= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: f8784348-c4ed-4678-a759-08d59dafe6d9 X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Apr 2018 00:19:44.1076 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB0936 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Hans de Goede [ Upstream commit e1681599345b8466786b6e54a2db2a00a068a3f3 ] acpi_lpss_create_device() skips handling LPSS devices which do not have a mmio resources in their resource list (typically these devices are disabled by the firmware). But since the LPSS code does not bind to the device, acpi_bus_attach() ends up still creating a platform device for it and the regular platform_driver for the ACPI HID still tries to bind to it. This happens e.g. on some boards which do not use the pwm-controller and have an empty or invalid resource-table for it. Currently this causes these error messages to get logged: [ 3.281966] pwm-lpss 80862288:00: invalid resource [ 3.287098] pwm-lpss: probe of 80862288:00 failed with error -22 This commit stops the undesirable creation of a platform_device for disabled LPSS devices by setting pnp.type.platform_id to 0. Note that acpi_scan_attach_handler() also sets pnp.type.platform_id to 0 when there is a matching handler for the device and that handler has no attach callback, so we simply behave as a handler without an attach function in this case. Signed-off-by: Hans de Goede Acked-by: Mika Westerberg Reviewed-by: Andy Shevchenko Signed-off-by: Rafael J. Wysocki Signed-off-by: Sasha Levin --- drivers/acpi/acpi_lpss.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/acpi/acpi_lpss.c b/drivers/acpi/acpi_lpss.c index 032ae44710e5..a2be3fd2c72b 100644 --- a/drivers/acpi/acpi_lpss.c +++ b/drivers/acpi/acpi_lpss.c @@ -465,6 +465,8 @@ static int acpi_lpss_create_device(struct acpi_device *= adev, acpi_dev_free_resource_list(&resource_list); =20 if (!pdata->mmio_base) { + /* Avoid acpi_bus_attach() instantiating a pdev for this dev. */ + adev->pnp.type.platform_id =3D 0; /* Skip the device, but continue the namespace scan. */ ret =3D 0; goto err_out; --=20 2.15.1