From mboxrd@z Thu Jan 1 00:00:00 1970 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 76E9E149E0A; Tue, 25 Jun 2024 09:39:22 +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=1719308362; cv=none; b=sDsbQRyRi5PWCRTtg19Cx0nCTQEGXtGn85xsBSaEAhsmpNOzN8l9099KNvvIqmhdjNMPAehmZcuLws4Ga9Ob7BlJEiZKYMifuIWP9Lyvu6LFiULOZzyHBQyfMdlk0TaszBGAUtI1g4vEceOLITI5iqwuHGQX4rQ0QBLT3EOVbM4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719308362; c=relaxed/simple; bh=EOn2qNt61frWteXLqGiE7z1R0bNHkbAWh6Mml0Cd/Mo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ExhL0B+Ph1ACzCyC8eb0otx3Qh1d6eNF0KgBjQqwl2bQh3NyBwhDiF4VHzmmi6x7LnZZSEG7RSUZLxjrd90I0rqWEp8/V0BTKamCObPjOVHS8oxHUeCCY/Zn7f8tDaE0/g5QuX4JFwcUCmm5F5BNnK5cMFrolbDdDqMv+iNi1TI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=i5NBo4HO; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="i5NBo4HO" Received: by smtp.kernel.org (Postfix) with ESMTPSA id F11D1C32789; Tue, 25 Jun 2024 09:39:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1719308362; bh=EOn2qNt61frWteXLqGiE7z1R0bNHkbAWh6Mml0Cd/Mo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=i5NBo4HOApydyIRlkwJvye3TMDZ1sN+CZz0ehCEy4qzO3ow6nizj8I7LTxotDm2Kc WmHI1bnD2y2p4tI1wLPU717vACi5TvGUKuA2Cyp99sp5Zq+MSFH2gKcN8gDW1jH51R /hDKrwrFxX8weB1CDtjdkrXts/nOlw3pUH1Df4BQ= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Benson Leung , Prashant Malani , Krzysztof Kozlowski , Tzung-Bi Shih , Sebastian Reichel , Sasha Levin Subject: [PATCH 6.9 065/250] power: supply: cros_usbpd: provide ID table for avoiding fallback match Date: Tue, 25 Jun 2024 11:30:23 +0200 Message-ID: <20240625085550.560078514@linuxfoundation.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240625085548.033507125@linuxfoundation.org> References: <20240625085548.033507125@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.9-stable review patch. If anyone has any objections, please let me know. ------------------ 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