diff options
author | Rob Herring <robh@kernel.org> | 2023-03-10 08:47:07 -0600 |
---|---|---|
committer | Wolfram Sang <wsa@kernel.org> | 2023-03-16 20:20:00 +0100 |
commit | 89151f6b007915fca95c5225cd1c37a419ba8cb9 (patch) | |
tree | 1d9b7fd12008315d7d6a65de592c4fa2c64986a6 /drivers/i2c/i2c-core-of.c | |
parent | 819c73455458e8f19e3cae88e47c63d8fca01ae3 (diff) |
i2c: Use of_property_read_bool() for boolean properties
It is preferred to use typed property access functions (i.e.
of_property_read_<type> functions) rather than low-level
of_get_property/of_find_property functions for reading properties.
Convert reading boolean properties to to of_property_read_bool().
Signed-off-by: Rob Herring <robh@kernel.org>
Reviewed-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
Diffstat (limited to 'drivers/i2c/i2c-core-of.c')
-rw-r--r-- | drivers/i2c/i2c-core-of.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/i2c/i2c-core-of.c b/drivers/i2c/i2c-core-of.c index bce6b796e04c..aa93467784c2 100644 --- a/drivers/i2c/i2c-core-of.c +++ b/drivers/i2c/i2c-core-of.c @@ -55,7 +55,7 @@ int of_i2c_get_board_info(struct device *dev, struct device_node *node, if (of_property_read_bool(node, "host-notify")) info->flags |= I2C_CLIENT_HOST_NOTIFY; - if (of_get_property(node, "wakeup-source", NULL)) + if (of_property_read_bool(node, "wakeup-source")) info->flags |= I2C_CLIENT_WAKE; return 0; |