OSDN Git Service

misc: lis3lv02d: Fix reading 'st,default-rate' property
authorRob Herring <robh@kernel.org>
Fri, 10 Mar 2023 14:47:13 +0000 (08:47 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 17 Mar 2023 14:23:32 +0000 (15:23 +0100)
commit6ca8f8bf706d874090b74f811194e94ebbc560df
tree16b62e8af474204bad854c1238ec3238b10bd38b
parent536e2fce8980c84247ee52e737d24bd1ffdb0d7f
misc: lis3lv02d: Fix reading 'st,default-rate' property

The property 'st,default-rate' is tested for presence, but the value is
ignored and the 'default_rate' value is updated with a stale 'val'
value. Fix this by using of_property_read_u32().

Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20230310144713.1543613-1-robh@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/lis3lv02d/lis3lv02d.c