Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp2383590lqb; Mon, 27 May 2024 19:21:21 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW63QoAhXYkhom4v1NTtuDXK8R+tgA5q1ztiR+DKZKOrCp2K3bhAfIUim95KYTZVeK3W7MlVf3ImtmTxA22L8oJWSpP/J2D58ARpoY31g== X-Google-Smtp-Source: AGHT+IH7+cqVkjcDaNyXjrmF6RqkVKFIvIleHvxD41lM87QIETUgdfLpRfxiC7nf1+ZU6zflJbLt X-Received: by 2002:a17:90b:30c1:b0:2bd:d2f9:e71a with SMTP id 98e67ed59e1d1-2bf5e169ea5mr10182201a91.29.1716862881156; Mon, 27 May 2024 19:21:21 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716862881; cv=pass; d=google.com; s=arc-20160816; b=qoAGy7ZxLaHU6wDOk/+2yhTvMscm0BY+mIULUy5gMnSryXeTXi0X0rx0yQa+9PR3Gt bPSbGiveAvApfXQmEhw376iR0RUZ54f+p5SC2t2QCj696tKTNso9QnWElNJF94dvtk/n 17W5Fc0opCeqGH9WUMEZiR+826Cb+zcI6SkdT9+iBPDYPNpl5FtL6Kg5KE95fWpwQhhL q2o9GpPGSWeIgA0d//5Ov5/NRbk2ueM71JMeGHAruTg0QEgyPt6QlnzF4xsQRyOojj2g dYE74FB2eEDQm19KOWI25fPsJQkaENqmnKqqfOVPcFEemzLRIlREzwV99OPVSkGmb64A IdaA== 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=a85QYDb7++M2uSaG99L38fDVzg6DCbNjacxMuKVscqB1z7cyLb/Wkzs5nTW1lKEJSa 4duXMBl/hHgI64ZzRD9IkWTizWpNQU+15f9blNV7ixxYbA+uKYYOkUmClbcdTvYXb6H1 ng5iaZ1MRLiQjn5Gj6PEL/7FgQ/IWouKlX5Bg2wc54PbNyzEV+605LoYWUoN4o5b6yVe OAoIWiytGbHk53Edj0GCAJgVUaifLCsvhNFEsLJOLFIG4Umx7sXVxhuvWsuxbEoZPKPm 6jOiTDVVLXrluM8KNz+POC4bCCmuU/C9J53gXxjJk4zDvBN5eMFiJr9wepxTH4+/vc31 XbNQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="lzAp/D3W"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-191644-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-191644-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id 98e67ed59e1d1-2bf5f9d146dsi7098312a91.17.2024.05.27.19.21.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 May 2024 19:21:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-191644-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="lzAp/D3W"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-191644-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-191644-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id D59CBB21748 for ; Tue, 28 May 2024 02:21:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3B9744DA04; Tue, 28 May 2024 02:19:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="lzAp/D3W" 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 5DB954D108; Tue, 28 May 2024 02:19:12 +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=1716862752; cv=none; b=UWRGfJJ86fdFBeGPjufZu+q0ifQKmXF/chJLCnIJ7K+A1UCk0tE7CUMV8dvfNAgRYOx/Gv4W5eeEog3hXDNFWBEY/JuTsumOjhrKXqkJmMdAW7bd8w1loLxFoExsaP3x4eUkNkakjH/AT1SOJoXsjEQy3Ddau5gblUGNvqjG9W4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716862752; c=relaxed/simple; bh=fwEiQiX4cnxFfIKH2+2+aLGcHFwRzp3EH0PqQdljIpQ=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=FMggcuOHcVOUXnmEc6MNZkkJl/VM02mvg7iuQY55GBZl0Ua7EYHbvOQaAghMcAzuv1Zhb5U/DSMd9hi+R6jtbvCsLbQyTapzYGINEv30yRuXAShkRP8l9JOlP3GkHiirrXqGMnoTrrHOMaJAli46e4Yn1vGKlTcn/qZiw75Ouug= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=lzAp/D3W; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id D1DD8C32786; Tue, 28 May 2024 02:19:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1716862752; bh=fwEiQiX4cnxFfIKH2+2+aLGcHFwRzp3EH0PqQdljIpQ=; h=From:To:Cc:Subject:Date:From; b=lzAp/D3WWQz6BDlfRFe7EbAGGBL8+HyTEzA88fY1vXptyaOWBMkkTBXBfbs/ouZzi 9he0rut9sApdQJOhiL4qPmyGglsZ32RJbCP+QH2xICEKBJFIVGA+1BlvdtNx9d0F1a KyyJ/MCCKQJBFKMHbyAkqGlqYxD5lkzHZTbqhBAo5YJBnT8IvdwWwUvaxwA+6D7/Jq kxMyPi18Wttk6K3QDwzt1nDeNXhBRVpxQNHz7ZOFBaKkE6m73XsHr6opwXVH7JBuUi DAkrP6vl/1E6i6jMJe6gP0UWxCXMi9yWCNg1NDPZqLywYWbFg6+QluWZrKiB2Mfl1z ms+WuAs2Oi7SA== 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.1 1/2] power: supply: cros_usbpd: provide ID table for avoiding fallback match Date: Mon, 27 May 2024 22:19:07 -0400 Message-ID: <20240528021909.3905362-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.1.92 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