summaryrefslogtreecommitdiff
path: root/drivers/iio/accel/mma9553.c
diff options
context:
space:
mode:
authorIrina Tirdea <irina.tirdea@intel.com>2015-04-13 18:41:03 +0300
committerJonathan Cameron <jic23@kernel.org>2015-06-14 18:01:37 +0300
commit23f93cde93efed59ca82d2687a2fab6a93eaafcc (patch)
tree63dd7a85f5f4ce189b9f11ee157415284d3fb889 /drivers/iio/accel/mma9553.c
parentb37c19903a64951f12ae213ce0be7ca3bd26cc12 (diff)
downloadlinux-23f93cde93efed59ca82d2687a2fab6a93eaafcc.tar.xz
iio: accel: mma9553: document use of mutex
Fix checkpatch.pl --strict check: CHECK: struct mutex definition without comment + struct mutex mutex; Signed-off-by: Irina Tirdea <irina.tirdea@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio/accel/mma9553.c')
-rw-r--r--drivers/iio/accel/mma9553.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/iio/accel/mma9553.c b/drivers/iio/accel/mma9553.c
index 08f28c3eb6cc..a605280637e9 100644
--- a/drivers/iio/accel/mma9553.c
+++ b/drivers/iio/accel/mma9553.c
@@ -182,6 +182,10 @@ struct mma9553_conf_regs {
struct mma9553_data {
struct i2c_client *client;
+ /*
+ * 1. Serialize access to HW (requested by mma9551_core API).
+ * 2. Serialize sequences that power on/off the device and access HW.
+ */
struct mutex mutex;
struct mma9553_conf_regs conf;
struct mma9553_event events[MMA9553_EVENTS_INFO_SIZE];