Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp645092img; Fri, 22 Mar 2019 05:49:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqwpEMgSUPqwluYVq/h4xc2/R0rGXX0sPodod3rrBoF4vtAAfYc/W4ZFz2Nzc/VJCEXt9cZQ X-Received: by 2002:a63:181a:: with SMTP id y26mr8889458pgl.268.1553258988255; Fri, 22 Mar 2019 05:49:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553258988; cv=none; d=google.com; s=arc-20160816; b=JzjoiRcEGVn48t99xOjV0bE9UdG6DDpiawhEMAAbXfCPqKpiH7xBM/CPcXz1vp5UCR gRUTi4NyznNJo3tmez98PlaWs1iHY82KnQl9gJA2zPURRqLlH7zeKfAp6nayH7Cl4z7l pCgQvGoZHIki1CWYQ05IeF5rJLcqwupfCmc5cGwGfPhD1zIHPUNmM2fcA9IGRpTV4XDu /tYmeYVDmIhU3B62n+nbpTsV4bIkH6vKzj3mUJah2VPS4jIB4bDnC2GZ7AlAO0PHfm+5 Zb1Bi+x1o0ZOps4GROeW4qfSGUtM161kxD59UwLDnlCLOuruSsb3d0FbR2HTbRS1gO21 9vzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=s/Dl2A8q5pNuqnZZtxLDfiDBD6nXYEb+7y/VyRZO7wA=; b=YFRE5ztrEUjfwbcIoCTE1Az8JnWo8V+Ho0BXUhYu+FGSyCejbbqOqCDYQVRtpJDMb2 T0gbWBdMl3pbhd+8pS7q4Q9GGyT8Rm6LsQZ4uvOkOb9fP1rJXOfYXIkGOM+pvu1aXuOb 6wv1exbZYcd6vuAyqJfDMOZaCBFQncKbfpWaWo5lS9zE+DqpjxlVBSZttHmgbrSSFhnJ be6LShdWk/hVg3BxcWjkfCLgOxrgsN04xN2vwbjvDt0ifyHzqkwHZllwe2BmE4tGW8co 79v1GzVRgLMwC+Kfw10ERS3BOHKlBpIQR1a4lljn8BBinTVE9rcLOoKge9rA++gXxVJW 26Jw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=uR6PHrMa; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d26si6377063pgv.163.2019.03.22.05.49.33; Fri, 22 Mar 2019 05:49:48 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=uR6PHrMa; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387407AbfCVMtA (ORCPT + 99 others); Fri, 22 Mar 2019 08:49:00 -0400 Received: from mail.kernel.org ([198.145.29.99]:33972 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387659AbfCVL53 (ORCPT ); Fri, 22 Mar 2019 07:57:29 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 226632192B; Fri, 22 Mar 2019 11:57:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1553255848; bh=BNnE4xAeJ25K+aBQ93rtyT7ZRGZFJvtMPgt6mGwtGuo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uR6PHrMa4POFL0PdpMClDxoFlagVXOWWdJQ476lWpP2K3uWhAngIoS2ivgduFWd8s uWY8HJT+7HcqEGs5OSUTLSpT0pTZc+GUAmZbnz+fA+3QRCTvo2TuUhkbM7wrF4iAxm BIJ82tcvx4pHHuntPVDB78rXYrHhKkWB/AcEC3Rw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, =?UTF-8?q?Pawe=C5=82=20Chmiel?= , Dmitry Torokhov , Sasha Levin Subject: [PATCH 4.19 033/280] Input: pwm-vibra - stop regulator after disabling pwm, not before Date: Fri, 22 Mar 2019 12:13:06 +0100 Message-Id: <20190322111308.173157472@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190322111306.356185024@linuxfoundation.org> References: <20190322111306.356185024@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.19-stable review patch. If anyone has any objections, please let me know. ------------------ [ Upstream commit 94803aef3533676194c772383472636c453e3147 ] This patch fixes order of disable calls in pwm_vibrator_stop. Currently when starting device, we first enable vcc regulator and then setup and enable pwm. When stopping, we should do this in oposite order, so first disable pwm and then disable regulator. Previously order was the same as in start. Signed-off-by: Paweł Chmiel Signed-off-by: Dmitry Torokhov Signed-off-by: Sasha Levin --- drivers/input/misc/pwm-vibra.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/input/misc/pwm-vibra.c b/drivers/input/misc/pwm-vibra.c index 9df87431d7d4..dbb6d9e1b947 100644 --- a/drivers/input/misc/pwm-vibra.c +++ b/drivers/input/misc/pwm-vibra.c @@ -80,14 +80,14 @@ static int pwm_vibrator_start(struct pwm_vibrator *vibrator) static void pwm_vibrator_stop(struct pwm_vibrator *vibrator) { + if (vibrator->pwm_dir) + pwm_disable(vibrator->pwm_dir); + pwm_disable(vibrator->pwm); + if (vibrator->vcc_on) { regulator_disable(vibrator->vcc); vibrator->vcc_on = false; } - - if (vibrator->pwm_dir) - pwm_disable(vibrator->pwm_dir); - pwm_disable(vibrator->pwm); } static void pwm_vibrator_play_work(struct work_struct *work) -- 2.19.1