diff options
author | Thierry Reding <treding@nvidia.com> | 2014-11-26 11:41:09 +0300 |
---|---|---|
committer | Thierry Reding <treding@nvidia.com> | 2014-11-26 11:42:11 +0300 |
commit | 7f06dd61248a75668bbb39b6fcca6ff407745df8 (patch) | |
tree | 30cefbd6f503d20557e24a1765a027687170a7da /drivers/input/misc/max77693-haptic.c | |
parent | f114040e3ea6e07372334ade75d1ee0775c355e1 (diff) | |
parent | 0690cbd2e55a72a8eae557c389d1a136ed9fa142 (diff) | |
download | linux-7f06dd61248a75668bbb39b6fcca6ff407745df8.tar.xz |
Merge branch 'core' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu
This branch contains a couple of changes that will conflict with the
Tegra SMMU driver rewrite. Since the driver is largely rewritten the
conflict resolution is non-trivial.
Diffstat (limited to 'drivers/input/misc/max77693-haptic.c')
-rw-r--r-- | drivers/input/misc/max77693-haptic.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/input/misc/max77693-haptic.c b/drivers/input/misc/max77693-haptic.c index 7b1fde93799e..ef6a9d650d69 100644 --- a/drivers/input/misc/max77693-haptic.c +++ b/drivers/input/misc/max77693-haptic.c @@ -194,7 +194,7 @@ static int max77693_haptic_play_effect(struct input_dev *dev, void *data, struct ff_effect *effect) { struct max77693_haptic *haptic = input_get_drvdata(dev); - uint64_t period_mag_multi; + u64 period_mag_multi; haptic->magnitude = effect->u.rumble.strong_magnitude; if (!haptic->magnitude) @@ -205,8 +205,7 @@ static int max77693_haptic_play_effect(struct input_dev *dev, void *data, * The formula to convert magnitude to pwm_duty as follows: * - pwm_duty = (magnitude * pwm_period) / MAX_MAGNITUDE(0xFFFF) */ - period_mag_multi = (int64_t)(haptic->pwm_dev->period * - haptic->magnitude); + period_mag_multi = (u64)haptic->pwm_dev->period * haptic->magnitude; haptic->pwm_duty = (unsigned int)(period_mag_multi >> MAX_MAGNITUDE_SHIFT); |