Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp2382875lqb; Mon, 27 May 2024 19:18:35 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV+b+c6o8Q7mLNEWqq18+Vy/G71R7asOsLypG2mQaQbqmumNt42cPv6ma5VrsHeSi2Tp1VAJ4nCO1fl50FhFpKC8nv56rMY51QIRq4NdA== X-Google-Smtp-Source: AGHT+IFC2s19cHRVJqiiHBvibLdYQacZmUb+xl1G2nl1Kti7mdAVLrNPdrfoxt6DEhV17R4VTI5p X-Received: by 2002:a37:f50e:0:b0:792:bc86:2d21 with SMTP id af79cd13be357-794ab10f892mr992769885a.57.1716862715604; Mon, 27 May 2024 19:18:35 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716862715; cv=pass; d=google.com; s=arc-20160816; b=qFxQYaVt81ZJJtaoTt2TPphfVgacq1sWc6IfjjuxivAu1lsqSWdWeRxY2JqTsfAdCp Dw+X7IfqU4yeHdNg5pDlZ+EcHDTshcQs+j+ggWfatF/cYxGKsOTNQifJTLrcrMeS6hko 78vkymz2kJ+FddQ9dat/kbLeB/kTqFtUKvOhIT6IVFAmA+2pi+rOwOAXuzW29JsA3dmo 0FZoGDtWUjtTowIsTfjtf9KP6RudXQuUrO54QnFeNBjpSdJY9jusjDj+FFSI9e6Hojtp Sxqiju8Ilu+7eQsptRKUL1nG+byePjsMuBoosmq0mky7wg9VF3JyypmQM4DxpDZFYcRN sxUA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=YZSyQPVYiRZSKxNlbBNvTwOPwQgHsXZqsmgXWOXJxCM=; fh=jQUNAuWlXATPo4YcEj7zFnyeK2nlFvC3fiWVbu+C/uI=; b=YA46EBQkAP1T+YUzWYSTa4ZlSvueOpEgLSbZJsv/S6eXmeiwvTfnPKApdwTFSOPt0D rjFtH5EorTKJ9DI1ExH1RuymVq0e9xGI3hzzbcA0MOm49R0vKc1TgguqTqfbMXEa8Qbv 8Dbp+6vSKPkUhxmzM2HON1hAsekL20z5dWRo6Z3zakpJC/e8hkxkr/Qr1HkrlsjePCrQ rPu+5/MRbptxxe2nZLG/xAeJWPHmkxKMxI2nHce1mWQpzPmTjEJoDpdcb2ELJEJa40Zf F7H2s36ZKnPUw1ZwT1hLLV+p6kjDukV8dFJ1RjnS94m5UEF8wxB/C2dSv2gQ10dIBTej nwoA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mDZrcfQJ; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-191631-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-191631-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id d75a77b69052e-43fb18c742csi93892411cf.574.2024.05.27.19.18.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 May 2024 19:18:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-191631-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mDZrcfQJ; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-191631-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-191631-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 5472F1C21900 for ; Tue, 28 May 2024 02:18:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EEC08EEDB; Tue, 28 May 2024 02:18:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="mDZrcfQJ" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 179402563; Tue, 28 May 2024 02:18:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716862708; cv=none; b=Zcb5fnqYzxZDLBMpU36j4tj7SYgKyj09gJwU25P0XkE8+a9F8rVZLw7RDNcKlpo1BdrUzvoEUe4gX9+0UoI/0k9SXKPzvdw5SZG2vZ4UHjT7diN/13/rAzO0NZkURUu6aSy8rxtWEnsKC8Evbv77inQpCrJkOc3H0jxiaEgpR/I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716862708; c=relaxed/simple; bh=fwEiQiX4cnxFfIKH2+2+aLGcHFwRzp3EH0PqQdljIpQ=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=BIs+0YPLys18L7gltOigj0wWJwneq/39lMAo0/Ic9O9dRbIFNahFupLTZ828hR1Fkpz5yLvuQ7R8YNqzfotCVhxZbZX49ZxVVuRbY6RfpGHAfO1TCxBBIkYzIXDql9vNkIslCS6/tfjVZa2mXt2wLvl6oVgDX23LRwNhKXhDr/I= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=mDZrcfQJ; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 971AAC2BBFC; Tue, 28 May 2024 02:18:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1716862707; bh=fwEiQiX4cnxFfIKH2+2+aLGcHFwRzp3EH0PqQdljIpQ=; h=From:To:Cc:Subject:Date:From; b=mDZrcfQJCrXFZI0HvFMoMDPkL/NtRLqwZfB01/dIOO1cK7cxBbHf7OfkeClydmqs8 f/qJxSqes5Rk+x/JHUO1GcSEuwg6yr7m4Yo0m1xGmAGPzXAXscoJ99vI2zebG1P1Gb /PAXPb/3CBNWur+e3U1V4jGwPJyNyWnezaA0KbNdqkzay6tvY/7wYdf35Y29gOMYhv beLP/SAYYz4gI+P812f9jkO0GPX4Aoco2qAjYmVf8e97YY+sijweeffv0zJnEhzd9h MOp8O1JyzhBf0WO5g0FFlbLJRK1+rqzf8uGYAV/5alGdY2bADsNt9w2+P+bzNoEIpU N08zJakjAnWcg== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Tzung-Bi Shih , Benson Leung , Prashant Malani , Krzysztof Kozlowski , Sebastian Reichel , Sasha Levin , sre@kernel.org, linux-pm@vger.kernel.org Subject: [PATCH AUTOSEL 6.9 1/5] power: supply: cros_usbpd: provide ID table for avoiding fallback match Date: Mon, 27 May 2024 22:18:17 -0400 Message-ID: <20240528021823.3904980-1-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-stable-base: Linux 6.9.2 Content-Transfer-Encoding: 8bit From: Tzung-Bi Shih [ Upstream commit 0f8678c34cbfdc63569a9b0ede1fe235ec6ec693 ] Instead of using fallback driver name match, provide ID table[1] for the primary match. [1]: https://elixir.bootlin.com/linux/v6.8/source/drivers/base/platform.c#L1353 Reviewed-by: Benson Leung Reviewed-by: Prashant Malani Reviewed-by: Krzysztof Kozlowski Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20240401030052.2887845-4-tzungbi@kernel.org Signed-off-by: Sebastian Reichel Signed-off-by: Sasha Levin --- drivers/power/supply/cros_usbpd-charger.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/power/supply/cros_usbpd-charger.c b/drivers/power/supply/cros_usbpd-charger.c index b6c96376776a9..8008e31c0c098 100644 --- a/drivers/power/supply/cros_usbpd-charger.c +++ b/drivers/power/supply/cros_usbpd-charger.c @@ -5,6 +5,7 @@ * Copyright (c) 2014 - 2018 Google, Inc */ +#include #include #include #include @@ -711,16 +712,22 @@ static int cros_usbpd_charger_resume(struct device *dev) static SIMPLE_DEV_PM_OPS(cros_usbpd_charger_pm_ops, NULL, cros_usbpd_charger_resume); +static const struct platform_device_id cros_usbpd_charger_id[] = { + { DRV_NAME, 0 }, + {} +}; +MODULE_DEVICE_TABLE(platform, cros_usbpd_charger_id); + static struct platform_driver cros_usbpd_charger_driver = { .driver = { .name = DRV_NAME, .pm = &cros_usbpd_charger_pm_ops, }, - .probe = cros_usbpd_charger_probe + .probe = cros_usbpd_charger_probe, + .id_table = cros_usbpd_charger_id, }; module_platform_driver(cros_usbpd_charger_driver); MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("ChromeOS EC USBPD charger"); -MODULE_ALIAS("platform:" DRV_NAME); -- 2.43.0