diff options
author | Krzysztof Kozlowski <k.kozlowski@samsung.com> | 2015-07-30 01:36:41 (GMT) |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-08-07 13:57:25 (GMT) |
commit | b3d8ba746b5109dc890e7480db5d014d19ae6a05 (patch) | |
tree | e7961d2e0307ec006fd7f5e62b404299e89ac028 /drivers/input | |
parent | 2a32b401a11fc48193e58b0a5af6ea82de0272de (diff) | |
download | linux-b3d8ba746b5109dc890e7480db5d014d19ae6a05.tar.xz |
Input: max77693: Remove a read-only pwm_divisor field
Storing a predefined PWM divisor in state container structure is
meaningless. The field, after initialization, is only read so this only
obfuscates the code. Remove the field and use directly enum value.
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/input')
-rw-r--r-- | drivers/input/misc/max77693-haptic.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/input/misc/max77693-haptic.c b/drivers/input/misc/max77693-haptic.c index 4524499..8dc43c1 100644 --- a/drivers/input/misc/max77693-haptic.c +++ b/drivers/input/misc/max77693-haptic.c @@ -60,7 +60,6 @@ struct max77693_haptic { unsigned int pwm_duty; enum max77693_haptic_motor_type type; enum max77693_haptic_pulse_mode mode; - enum max77693_haptic_pwm_divisor pwm_divisor; struct work_struct work; }; @@ -88,7 +87,7 @@ static int max77693_haptic_configure(struct max77693_haptic *haptic, value = ((haptic->type << MAX77693_CONFIG2_MODE) | (enable << MAX77693_CONFIG2_MEN) | (haptic->mode << MAX77693_CONFIG2_HTYP) | - (haptic->pwm_divisor)); + MAX77693_HAPTIC_PWM_DIVISOR_128); error = regmap_write(haptic->regmap_haptic, MAX77693_HAPTIC_REG_CONFIG2, value); @@ -259,7 +258,6 @@ static int max77693_haptic_probe(struct platform_device *pdev) haptic->dev = &pdev->dev; haptic->type = MAX77693_HAPTIC_LRA; haptic->mode = MAX77693_HAPTIC_EXTERNAL_MODE; - haptic->pwm_divisor = MAX77693_HAPTIC_PWM_DIVISOR_128; haptic->suspend_state = false; INIT_WORK(&haptic->work, max77693_haptic_play_work); |