summaryrefslogtreecommitdiff
path: root/drivers/misc/m4sensorhub_pedometer.c
diff options
context:
space:
mode:
authorViditha Hanumanthareddy <ngjq36@motorola.com>2014-07-04 15:26:22 -0500
committerViditha Hanumanthareddy <ngjq36@motorola.com>2014-07-04 15:26:22 -0500
commit9f9b9e5733fbb9a22feaf2c6cc2cfad67d48d6cc (patch)
treeb183c88c2af2d2fbe07ba128016f78fe4a06e7f7 /drivers/misc/m4sensorhub_pedometer.c
parent4cff72482606822fd4e2cbe7ea16672879c711b0 (diff)
downloadolio-linux-3.10-9f9b9e5733fbb9a22feaf2c6cc2cfad67d48d6cc.tar.xz
olio-linux-3.10-9f9b9e5733fbb9a22feaf2c6cc2cfad67d48d6cc.zip
IKXCLOCK-2752: Send a pedo event for re-registration
Change-Id: Ic1c98373a4af6d85d13ec44a2afaa60fc171f559
Diffstat (limited to 'drivers/misc/m4sensorhub_pedometer.c')
-rw-r--r--drivers/misc/m4sensorhub_pedometer.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/drivers/misc/m4sensorhub_pedometer.c b/drivers/misc/m4sensorhub_pedometer.c
index 85c1c2f9c9e..e53d62dee15 100644
--- a/drivers/misc/m4sensorhub_pedometer.c
+++ b/drivers/misc/m4sensorhub_pedometer.c
@@ -204,16 +204,15 @@ static int m4ped_set_samplerate(struct iio_dev *iio, int16_t rate)
}
dd->status = dd->status | (1 << M4PED_IRQ_ENABLED_BIT);
- /* When an app registers, there is no data reported
- unless the user starts walking. But the application
- would like to have atleast one set of data sent
- immediately following the register */
- err = m4ped_read_report_data(iio, dd);
- if (err < 0) {
- m4ped_err("%s: Failed to report pedo data\n",
- __func__);
- goto m4ped_set_samplerate_fail;
- }
+ }
+ /* When an app registers, there is no data reported
+ unless the user starts walking. But the application
+ would like to have atleast one set of data sent
+ immediately following the register */
+ err = m4ped_read_report_data(iio, dd);
+ if (err < 0) {
+ m4ped_err("%s:Failed to report pedo data\n", __func__);
+ goto m4ped_set_samplerate_fail;
}
} else {
/* Disable the IRQ if necessary */