linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 1/2] i2c: davinci: Use platform table macro over module_alias
@ 2023-05-15 17:50 Andrew Davis
  2023-05-15 17:50 ` [PATCH v2 2/2] i2c: davinci: Use struct name not type with devm_kzalloc() Andrew Davis
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Andrew Davis @ 2023-05-15 17:50 UTC (permalink / raw)
  To: Wolfram Sang, Bartosz Golaszewski
  Cc: linux-arm-kernel, linux-i2c, linux-kernel, Andrew Davis

Generates the same platform module alias. More standard usage.

Signed-off-by: Andrew Davis <afd@ti.com>
---
 drivers/i2c/busses/i2c-davinci.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/i2c/busses/i2c-davinci.c b/drivers/i2c/busses/i2c-davinci.c
index 9750310f2c96..c55bd937def7 100644
--- a/drivers/i2c/busses/i2c-davinci.c
+++ b/drivers/i2c/busses/i2c-davinci.c
@@ -940,12 +940,16 @@ static const struct dev_pm_ops davinci_i2c_pm = {
 #define davinci_i2c_pm_ops NULL
 #endif
 
-/* work with hotplug and coldplug */
-MODULE_ALIAS("platform:i2c_davinci");
+static const struct platform_device_id davinci_i2c_driver_ids[] = {
+	{ .name = "i2c_davinci", },
+	{ /* sentinel */ }
+};
+MODULE_DEVICE_TABLE(platform, davinci_i2c_driver_ids);
 
 static struct platform_driver davinci_i2c_driver = {
 	.probe		= davinci_i2c_probe,
 	.remove		= davinci_i2c_remove,
+	.id_table	= davinci_i2c_driver_ids,
 	.driver		= {
 		.name	= "i2c_davinci",
 		.pm	= davinci_i2c_pm_ops,
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2023-06-23  8:27 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-15 17:50 [PATCH v2 1/2] i2c: davinci: Use platform table macro over module_alias Andrew Davis
2023-05-15 17:50 ` [PATCH v2 2/2] i2c: davinci: Use struct name not type with devm_kzalloc() Andrew Davis
2023-05-16 14:45   ` Bartosz Golaszewski
2023-06-07  9:29   ` Wolfram Sang
     [not found]   ` <61846ef5-26fb-52bf-11a3-b1c0b3b53b94@web.de>
2023-06-08 11:24     ` Wolfram Sang
     [not found]       ` <d210abe3-7a9d-61fd-c358-dd4b2c8f2f60@web.de>
2023-06-08 13:37         ` [v2 " Wolfram Sang
2023-05-16 14:46 ` [PATCH v2 1/2] i2c: davinci: Use platform table macro over module_alias Bartosz Golaszewski
2023-06-07  9:32 ` Wolfram Sang
2023-06-23  8:27   ` Wolfram Sang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).