Skip to content

Commit 397295d

Browse files
tititiou36Wolfram Sang
authored andcommitted
Documentation: i2c: Constify struct i2c_device_id
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>
1 parent 6fc0ce1 commit 397295d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Documentation/i2c/writing-clients.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,11 @@ driver model device node, and its I2C address.
3131

3232
::
3333

34-
static struct i2c_device_id foo_idtable[] = {
34+
static const struct i2c_device_id foo_idtable[] = {
3535
{ "foo", my_id_for_foo },
3636
{ "bar", my_id_for_bar },
3737
{ }
3838
};
39-
4039
MODULE_DEVICE_TABLE(i2c, foo_idtable);
4140

4241
static struct i2c_driver foo_driver = {

0 commit comments

Comments
 (0)