public inbox for linux-i2c@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] eeprom: at24: use of_match_ptr()
@ 2023-11-22 15:59 Bartosz Golaszewski
  2023-11-22 16:41 ` Peter Rosin
  2023-11-23  3:16 ` kernel test robot
  0 siblings, 2 replies; 6+ messages in thread
From: Bartosz Golaszewski @ 2023-11-22 15:59 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: linux-i2c, linux-kernel, Bartosz Golaszewski

From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>

This driver does not depend on CONFIG_OF so using of_match_ptr() makes
sense to reduce the size a bit.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
---
 drivers/misc/eeprom/at24.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/misc/eeprom/at24.c b/drivers/misc/eeprom/at24.c
index f61a80597a22..76a0b9b2fcc4 100644
--- a/drivers/misc/eeprom/at24.c
+++ b/drivers/misc/eeprom/at24.c
@@ -18,6 +18,7 @@
 #include <linux/module.h>
 #include <linux/mutex.h>
 #include <linux/nvmem-provider.h>
+#include <linux/of.h>
 #include <linux/of_device.h>
 #include <linux/pm_runtime.h>
 #include <linux/property.h>
@@ -812,7 +813,7 @@ static struct i2c_driver at24_driver = {
 	.driver = {
 		.name = "at24",
 		.pm = &at24_pm_ops,
-		.of_match_table = at24_of_match,
+		.of_match_table = of_match_ptr(at24_of_match),
 		.acpi_match_table = ACPI_PTR(at24_acpi_ids),
 	},
 	.probe = at24_probe,
-- 
2.40.1


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

end of thread, other threads:[~2023-11-23  3:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-22 15:59 [PATCH] eeprom: at24: use of_match_ptr() Bartosz Golaszewski
2023-11-22 16:41 ` Peter Rosin
2023-11-22 16:57   ` Bartosz Golaszewski
2023-11-22 17:13     ` Peter Rosin
2023-11-22 17:26       ` Bartosz Golaszewski
2023-11-23  3:16 ` kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox