From patchwork Wed Jul 29 06:31:27 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 6889501 Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 1CD8B9F39D for ; Wed, 29 Jul 2015 06:33:00 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 559A0201ED for ; Wed, 29 Jul 2015 06:32:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 69FCB201CD for ; Wed, 29 Jul 2015 06:32:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750957AbbG2Gbp (ORCPT ); Wed, 29 Jul 2015 02:31:45 -0400 Received: from mailout3.w1.samsung.com ([210.118.77.13]:13281 "EHLO mailout3.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751683AbbG2Gbm (ORCPT ); Wed, 29 Jul 2015 02:31:42 -0400 Received: from eucpsbgm1.samsung.com (unknown [203.254.199.244]) by mailout3.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0NS8000KUKSSHT70@mailout3.w1.samsung.com>; Wed, 29 Jul 2015 07:31:40 +0100 (BST) X-AuditID: cbfec7f4-f79c56d0000012ee-e0-55b8734b4ae6 Received: from eusync1.samsung.com ( [203.254.199.211]) by eucpsbgm1.samsung.com (EUCPMTA) with SMTP id 51.CC.04846.B4378B55; Wed, 29 Jul 2015 07:31:39 +0100 (BST) Received: from localhost.localdomain ([10.252.80.64]) by eusync1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0NS8008EUKSIMK40@eusync1.samsung.com>; Wed, 29 Jul 2015 07:31:39 +0100 (BST) From: Krzysztof Kozlowski To: Dmitry Torokhov Cc: Mark Brown , linux-kernel@vger.kernel.org, linux-input@vger.kernel.org, Jaewon Kim , Krzysztof Kozlowski Subject: [PATCH 1/4] Input: max77693: Remove a read-only pwm_divisor field Date: Wed, 29 Jul 2015 15:31:27 +0900 Message-id: <1438151490-13751-2-git-send-email-k.kozlowski@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1438151490-13751-1-git-send-email-k.kozlowski@samsung.com> References: <1438151490-13751-1-git-send-email-k.kozlowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupkluLIzCtJLcpLzFFi42I5/e/4ZV3v4h2hBlu3WFpMffiEzeLwoheM FjsajrBavH5haHHz0zdWi8u75rA5sHnsnHWX3WPTqk42j74tqxg9Pm+SC2CJ4rJJSc3JLEst 0rdL4MqYda+XpWAzT8XOqTsZGxiPcXUxcnBICJhIPHup3sXICWSKSVy4t56ti5GLQ0hgKaPE vNMnGSGc/4wSl9ZcZgKpYhMwlti8fAkbiC0ioC+xffYvsCJmgR2MEge2NTCDJIQFvCRuLNjG CGKzCKhKfFt9BqyZV8Bd4sGat+wQ6+QkTh6bzApicwp4SByffJ8FxBYCqnk0fzHLBEbeBYwM qxhFU0uTC4qT0nMN9YoTc4tL89L1kvNzNzFCAujLDsbFx6wOMQpwMCrx8M7Q2REqxJpYVlyZ e4hRgoNZSYQ3wAooxJuSWFmVWpQfX1Sak1p8iFGag0VJnHfurvchQgLpiSWp2ampBalFMFkm Dk6pBsaJKy5I+1yMv7nun2EBz+dDxtmRpvyHSgM5rrGr8SXPjBVnubV8onnEYsaQlRIlvEEC XUfn/6v9sitYJ7hmX12etmva3lm96xRi9515aNzCyWpUXsTs/ki2Y9rjHecFHsbwMr468e6g 3qE3138HO/Vm2Vatuai1UeD03TXRYlM5E5bFSDc1OCuxFGckGmoxFxUnAgDpr/QoHAIAAA== Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- drivers/input/misc/max77693-haptic.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/input/misc/max77693-haptic.c b/drivers/input/misc/max77693-haptic.c index 4524499ea72f..8dc43c1ebf0e 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);