Received: by 10.213.65.68 with SMTP id h4csp2161176imn; Sun, 8 Apr 2018 21:18:23 -0700 (PDT) X-Google-Smtp-Source: AIpwx49VtMr9UtZiZrhexF8bFMzVfTNo13hvwkg9g6ftVJhFWw2dPtyhnvQcIEZtz5snpmcA9MuN X-Received: by 10.98.194.195 with SMTP id w64mr28017656pfk.83.1523247503398; Sun, 08 Apr 2018 21:18:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523247503; cv=none; d=google.com; s=arc-20160816; b=Fk8nx9ngVvcSQKQE71SIlCRjNYii1+NEuDSIImN8uxRmEg24rKKll05MizxilMPmBO aPnc9aE4LV0NbP5srjVo8PqtY39BqXcuRTkWRqrT23i9M7uEE0PosJKJY7GLhB5/n9I3 2n9BegN1PtMSquHz4y7/pmLUVinM3ELq23SejUSgz5SCI4OUkCalgHaxSH52Z6roE4C9 ddUdKCt3/ywdSzyPs98KzAULsWgVihuO24I1PMCGDkTVgBPyczwiwy1KvPN582cxiipB ENntZI4Q+JXmO8VoCvBGxZv/UUm9oRekTnxpSSUOxVdzLy2M5DVMRwkEZFxA3O1I9JSU dr+Q== 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=9DmJafAQpkpgi4qMJ9iAScXaTGyCINoVqYiVtbaGXTc=; b=I6+AAUH52s2uaZPvfQxuCr0q+64lIILfFS1i1L2vYDPqiJAizMkZaZTPZRv5Ow+GkE m0RsB7+muLPzSYX2P5wem7aaKUTjq3MaEUcLTSMIcMTZ1nZ17Md8eo7/3yhXFLpA70NR B9jwIey/xpnTMFgN1yyJ2gyurEExKydEt32ZKqYy8bRVImgVfRl+0ko4MinG2hF9ZGA8 0rAnaZ5/SobTDW3rLdgzXstQVd3GYYSREl/HyT81nPM0NCXnBMj2aKVAsg+UjVIkGrLL Ahou/Ydai40dpIzN/DhhgUtwZAgHb+xwMVCxHlV9iSjWOCAds+1r3YjuDHbk2D5jE7xp VYQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=ZsxLEK4L; 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 p13-v6si13901200pll.416.2018.04.08.21.17.46; Sun, 08 Apr 2018 21:18:23 -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=ZsxLEK4L; 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 S1754533AbeDIEM6 (ORCPT + 99 others); Mon, 9 Apr 2018 00:12:58 -0400 Received: from mail-cys01nam02on0097.outbound.protection.outlook.com ([104.47.37.97]:28800 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752813AbeDIAQw (ORCPT ); Sun, 8 Apr 2018 20:16:52 -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=9DmJafAQpkpgi4qMJ9iAScXaTGyCINoVqYiVtbaGXTc=; b=ZsxLEK4L/FILeispY7b2Ue1VU3zwIGuYtBG255JRXiJ8Z5/+kl6XDTafMsYf8qJBWRxlksi8+CuOjdXWHLNMwXTqFYZ8pbSHB/nS1m0a79LEoyTqgM4XJEDPfEQsGl5LDQriwKd/j0r49nSBVSLwHg7ObJUc+DPpp1B8ryBpLXg= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB0968.namprd21.prod.outlook.com (52.132.133.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.696.0; Mon, 9 Apr 2018 00:16:48 +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:16:48 +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.15 006/189] ACPI / LPSS: Do not instiate platform_dev for devs without MMIO resources Thread-Topic: [PATCH AUTOSEL for 4.15 006/189] ACPI / LPSS: Do not instiate platform_dev for devs without MMIO resources Thread-Index: AQHTz5gMmgJzrprInUqzTs0kheGniQ== Date: Mon, 9 Apr 2018 00:16:48 +0000 Message-ID: <20180409001637.162453-6-alexander.levin@microsoft.com> References: <20180409001637.162453-1-alexander.levin@microsoft.com> In-Reply-To: <20180409001637.162453-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;DM5PR2101MB0968;7:b2LY2k8f9EdOlC3wcnkVOq1uO5RlLkwcWwXeIudj4JU0kmIEDrGC43lEIYShM17ZYdyfAMxjMwUf4YfgoGgq7ENSR3s7UZHvwG+IXra1s3qBW1Xbq3HUPY/AGGMV7PhQRqLvevxMqPMYSxD6IT92vkgR0/007EpntdBrF20dok6TnOyrcMDjjTrjpaN5zaql8vtxLYNUe74RMcVI7xLcm8RlY5rejLYPfJAwiWixz5TaLjQHRuyW4QJsO1FP1jbx;20:sT1Gs1UigEcy5ujqv+hO0F9R4Aim4V6GxfQc7wzwZna6LRsi+4p06RhPB6kddagbgiL9TX5wgQARquSVNkDCdVVfz4EM/Pt69k5aaPTHWG5TJb3Hsew8mBuZbwT6hwi2GtphFZVqID5WkXh37TiojQ7vncU+ikE3Od1O8uW7/l0= x-ms-exchange-antispam-srfa-diagnostics: SOS; X-MS-Office365-Filtering-Correlation-Id: fdece8b9-f4b3-4264-7ae9-08d59daf2f99 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(5600026)(4604075)(3008032)(48565401081)(2017052603328)(7193020);SRVR:DM5PR2101MB0968; x-ms-traffictypediagnostic: DM5PR2101MB0968: 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)(8121501046)(5005006)(93006095)(93001095)(3231221)(944501327)(52105095)(3002001)(10201501046)(6055026)(61426038)(61427038)(6041310)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123564045)(20161123560045)(6072148)(201708071742011);SRVR:DM5PR2101MB0968;BCL:0;PCL:0;RULEID:;SRVR:DM5PR2101MB0968; x-forefront-prvs: 0637FCE711 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(39860400002)(376002)(366004)(346002)(39380400002)(396003)(189003)(199004)(6486002)(53936002)(107886003)(81156014)(36756003)(10290500003)(6436002)(81166006)(5660300001)(478600001)(8936002)(8676002)(6512007)(106356001)(5890100001)(105586002)(5250100002)(2900100001)(7736002)(305945005)(2501003)(10090500001)(66066001)(25786009)(476003)(3846002)(6116002)(186003)(2616005)(59450400001)(68736007)(6506007)(486006)(14454004)(86362001)(99286004)(26005)(102836004)(22452003)(76176011)(11346002)(2906002)(316002)(3660700001)(110136005)(97736004)(86612001)(3280700002)(1076002)(4326008)(446003)(54906003)(72206003)(22906009)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:DM5PR2101MB0968;H:DM5PR2101MB1032.namprd21.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: pu1SWEh2CZ9XXT1e4wVdu1R2xWLkVXzsCWoiZAQkmHy7Z6P0+QabVAbS6O8z3sVXtwKXIBr6rkeO+8Ko2T4O5gcPSSjCj3MGOTTgaiovMyy3HQ2ytKm4Hf084GdUtY+CQpoqeI0f/6MHL74YJyRuahVPGeyMFpfe93Bp8LHNpTeQM5RW5kidW/KRDi2oS61AzP0iKm/VaaDe4qKXTPU6SBLP9g+0VIIJPJ5dKTSG3vVNd40iMlGRzHRuPRQ5DW+VAKUsrmqlBqr8oo80qpyp4GoaLjNhkVhPuenrQok65YDZ9w0PK9SwGOQkBtIyndnsqDtQFNMs9E9sbCJez5f+/q5uFVXz5qi9fw+a1JO38tIvdd/lGAqmn9eugbDbFn3x+76/JYVPbRzn5+zqP1/9JP1bf51ih5fbVhqeVZRD2KI= 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: fdece8b9-f4b3-4264-7ae9-08d59daf2f99 X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Apr 2018 00:16:48.4030 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB0968 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 7f2b02cc8ea1..c71f5a2a592e 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