]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
Documentation: i2c: Constify struct i2c_device_id
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Tue, 12 Nov 2024 21:01:00 +0000 (22:01 +0100)
committerWolfram Sang <wsa+renesas@sang-engineering.com>
Thu, 14 Nov 2024 09:35:30 +0000 (10:35 +0100)
Constify the i2c_device_id structure in the doc to give a cleaner starting
point.

Also remove an empty line which is usually not added.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Documentation/i2c/writing-clients.rst

index 0b8439ea954ccdbd8fbf1f8c6564617298cc540c..121e618e72ec52cbbba546030f2bdeb20d50af86 100644 (file)
@@ -31,12 +31,11 @@ driver model device node, and its I2C address.
 
 ::
 
-  static struct i2c_device_id foo_idtable[] = {
+  static const struct i2c_device_id foo_idtable[] = {
        { "foo", my_id_for_foo },
        { "bar", my_id_for_bar },
        { }
   };
-
   MODULE_DEVICE_TABLE(i2c, foo_idtable);
 
   static struct i2c_driver foo_driver = {