From patchwork Thu Jul 30 01:36:41 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 6897911 Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 32AACC05AC for ; Thu, 30 Jul 2015 01:38:08 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 54E4B20268 for ; Thu, 30 Jul 2015 01:38:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5C48820172 for ; Thu, 30 Jul 2015 01:38:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754563AbbG3BhD (ORCPT ); Wed, 29 Jul 2015 21:37:03 -0400 Received: from mailout3.w1.samsung.com ([210.118.77.13]:54566 "EHLO mailout3.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754327AbbG3Bg7 (ORCPT ); Wed, 29 Jul 2015 21:36:59 -0400 Received: from eucpsbgm2.samsung.com (unknown [203.254.199.245]) by mailout3.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0NSA00DBX1TLA420@mailout3.w1.samsung.com>; Thu, 30 Jul 2015 02:36:57 +0100 (BST) X-AuditID: cbfec7f5-f794b6d000001495-9f-55b97fb8cc58 Received: from eusync3.samsung.com ( [203.254.199.213]) by eucpsbgm2.samsung.com (EUCPMTA) with SMTP id B8.A1.05269.8BF79B55; Thu, 30 Jul 2015 02:36:56 +0100 (BST) Received: from localhost.localdomain ([10.252.80.64]) by eusync3.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0NSA00C2W1TAJX10@eusync3.samsung.com>; Thu, 30 Jul 2015 02:36:56 +0100 (BST) From: Krzysztof Kozlowski To: Liam Girdwood , Mark Brown , linux-kernel@vger.kernel.org, Dmitry Torokhov , Dan Murphy , Jaewon Kim , linux-input@vger.kernel.org Cc: Krzysztof Kozlowski Subject: [PATCH v2 1/4] Input: max77693: Remove a read-only pwm_divisor field Date: Thu, 30 Jul 2015 10:36:41 +0900 Message-id: <1438220204-377-2-git-send-email-k.kozlowski@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1438220204-377-1-git-send-email-k.kozlowski@samsung.com> References: <1438220204-377-1-git-send-email-k.kozlowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprOLMWRmVeSWpSXmKPExsVy+t/xq7o76neGGlxdbGUx9eETNovDi14w WnSf3sJqsaPhCKvF6xeGFt+udDBZ3Pz0jdXi8q45bA4cHjtn3WX32LSqk82jb8sqRo/jN7Yz eXzeJBfAGsVlk5Kak1mWWqRvl8CV8ejTZ/aCVzwVe/7cYm9g/MHVxcjJISFgIrFobj8bhC0m ceHeeiCbi0NIYCmjxMsJTSwQzn9GicZDa1lAqtgEjCU2L18CViUi8ItRYuv3CawgCWYBQ4mf 7/6wdzFycAgL+ErcfFEJYrIIqEpM2GAIUsEr4Crx7+g5RohlchInj00G6+QUcJPoPn6aCcQW AqrpWrGfbQIj7wJGhlWMoqmlyQXFSem5RnrFibnFpXnpesn5uZsYIcH1dQfj0mNWhxgFOBiV eHhn6OwIFWJNLCuuzD3EKMHBrCTCa+uzM1SINyWxsiq1KD++qDQntfgQozQHi5I478xd70OE BNITS1KzU1MLUotgskwcnFINjLtcHjh9mliUcEIvMiz91JJ/xYwaOV23guSESn99dOBW7tkp 5HT78LFg94x7264YJPD33Qqyq5o2T6YmbIp1cErxWYOM612uNWnzb3wVkbRaIXPKjHenYX34 4sOaM5ZHavHNNpI5Mmfz0eO/XZ4tf6H45NkGp/5p/dmnr8es3DNnk8+5Hs7e/UosxRmJhlrM RcWJAODULEQqAgAA 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 Acked-by: Dmitry Torokhov --- 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);