public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Tzung-Bi Shih <tzungbi@kernel.org>,
	Benson Leung <bleung@chromium.org>,
	Prashant Malani <pmalani@chromium.org>,
	Krzysztof Kozlowski <krzk@kernel.org>,
	Sasha Levin <sashal@kernel.org>,
	chrome-platform@lists.linux.dev
Subject: [PATCH AUTOSEL 6.9 11/15] platform/chrome: cros_usbpd_notify: provide ID table for avoiding fallback match
Date: Sun, 26 May 2024 05:41:43 -0400	[thread overview]
Message-ID: <20240526094152.3412316-11-sashal@kernel.org> (raw)
In-Reply-To: <20240526094152.3412316-1-sashal@kernel.org>

From: Tzung-Bi Shih <tzungbi@kernel.org>

[ Upstream commit 8ad3b9652ed6a115c56214a0eab06952818b3ddf ]

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 <bleung@chromium.org>
Acked-by: Prashant Malani <pmalani@chromium.org>
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/20240329075630.2069474-8-tzungbi@kernel.org
Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/platform/chrome/cros_usbpd_notify.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/drivers/platform/chrome/cros_usbpd_notify.c b/drivers/platform/chrome/cros_usbpd_notify.c
index aacad022f21df..c83f81d86483c 100644
--- a/drivers/platform/chrome/cros_usbpd_notify.c
+++ b/drivers/platform/chrome/cros_usbpd_notify.c
@@ -6,6 +6,7 @@
  */
 
 #include <linux/acpi.h>
+#include <linux/mod_devicetable.h>
 #include <linux/module.h>
 #include <linux/platform_data/cros_ec_proto.h>
 #include <linux/platform_data/cros_usbpd_notify.h>
@@ -218,12 +219,19 @@ static void cros_usbpd_notify_remove_plat(struct platform_device *pdev)
 					   &pdnotify->nb);
 }
 
+static const struct platform_device_id cros_usbpd_notify_id[] = {
+	{ DRV_NAME, 0 },
+	{}
+};
+MODULE_DEVICE_TABLE(platform, cros_usbpd_notify_id);
+
 static struct platform_driver cros_usbpd_notify_plat_driver = {
 	.driver = {
 		.name = DRV_NAME,
 	},
 	.probe = cros_usbpd_notify_probe_plat,
 	.remove_new = cros_usbpd_notify_remove_plat,
+	.id_table = cros_usbpd_notify_id,
 };
 
 static int __init cros_usbpd_notify_init(void)
@@ -258,4 +266,3 @@ module_exit(cros_usbpd_notify_exit);
 MODULE_LICENSE("GPL");
 MODULE_DESCRIPTION("ChromeOS power delivery notifier device");
 MODULE_AUTHOR("Jon Flatley <jflat@chromium.org>");
-MODULE_ALIAS("platform:" DRV_NAME);
-- 
2.43.0


  parent reply	other threads:[~2024-05-26  9:42 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-26  9:41 [PATCH AUTOSEL 6.9 01/15] fs/writeback: bail out if there is no more inodes for IO and queued once Sasha Levin
2024-05-26  9:41 ` [PATCH AUTOSEL 6.9 02/15] md: Fix overflow in is_mddev_idle Sasha Levin
2024-05-27  1:08   ` Yu Kuai
2024-06-19 14:27     ` Sasha Levin
2024-05-26  9:41 ` [PATCH AUTOSEL 6.9 03/15] padata: Disable BH when taking works lock on MT path Sasha Levin
2024-05-26  9:41 ` [PATCH AUTOSEL 6.9 04/15] crypto: hisilicon/sec - Fix memory leak for sec resource release Sasha Levin
2024-05-26  9:41 ` [PATCH AUTOSEL 6.9 05/15] crypto: hisilicon/qm - Add the err memory release process to qm uninit Sasha Levin
2024-05-26  9:41 ` [PATCH AUTOSEL 6.9 06/15] io_uring/sqpoll: work around a potential audit memory leak Sasha Levin
2024-05-26  9:41 ` [PATCH AUTOSEL 6.9 07/15] rcutorture: Fix rcu_torture_one_read() pipe_count overflow comment Sasha Levin
2024-05-26  9:41 ` [PATCH AUTOSEL 6.9 08/15] rcutorture: Make stall-tasks directly exit when rcutorture tests end Sasha Levin
2024-05-26  9:41 ` [PATCH AUTOSEL 6.9 09/15] rcutorture: Fix invalid context warning when enable srcu barrier testing Sasha Levin
2024-05-26  9:41 ` [PATCH AUTOSEL 6.9 10/15] platform/chrome: cros_usbpd_logger: provide ID table for avoiding fallback match Sasha Levin
2024-05-26  9:41 ` Sasha Levin [this message]
2024-05-26  9:41 ` [PATCH AUTOSEL 6.9 12/15] binfmt_elf: Leave a gap between .bss and brk Sasha Levin
2024-05-27 16:32   ` Kees Cook
2024-06-19 14:28     ` Sasha Levin
2024-05-26  9:41 ` [PATCH AUTOSEL 6.9 13/15] ubsan: Avoid i386 UBSAN handler crashes with Clang Sasha Levin
2024-05-26  9:41 ` [PATCH AUTOSEL 6.9 14/15] arm64: defconfig: select INTERCONNECT_QCOM_SM6115 as built-in Sasha Levin
2024-05-26  9:41 ` [PATCH AUTOSEL 6.9 15/15] block/ioctl: prefer different overflow check Sasha Levin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240526094152.3412316-11-sashal@kernel.org \
    --to=sashal@kernel.org \
    --cc=bleung@chromium.org \
    --cc=chrome-platform@lists.linux.dev \
    --cc=krzk@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pmalani@chromium.org \
    --cc=stable@vger.kernel.org \
    --cc=tzungbi@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox