Skip to content
Commit f4d7f883 authored by Miquel Raynal's avatar Miquel Raynal Committed by Jonathan Cameron
Browse files

iio: magnetometer: rm3100: Stop abusing the ->currentmode



This is an internal variable for the core, here it is set to a "default"
value by the driver in order to later be able to perform checks against
it. None of this is needed because this check actually cares about the
buffers being enabled or not. So it is an unproper side-channel access
to the information "are the buffers enabled?", returned officially by
the iio_buffer_enabled() helper. Use this helper instead.

Cc: Song Qiang <songqiang1304521@gmail.com>
Signed-off-by: default avatarMiquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/r/20220207143840.707510-3-miquel.raynal@bootlin.com
Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent a8b6d670
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment