Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp104395ybx; Thu, 31 Oct 2019 23:58:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqxfYQOnASQaotxGPtm9XTuo+EftSwNhygp7OafOKjzCJKwtYDaW+Or+A0oniB5ghn8t3X66 X-Received: by 2002:a17:906:f1c5:: with SMTP id gx5mr7955142ejb.314.1572591486099; Thu, 31 Oct 2019 23:58:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572591486; cv=none; d=google.com; s=arc-20160816; b=XlDZAeXBXbtdoMsn8twDXX19YSjI5dEC28wAIfffiV7HGTfSKnoDp4qZ5p29C/MyUA BAvDR/sFX/x3aSq3LoYsH2YB/o7KBM6DQxzSTVUK/iqbucK1BtanVR5A/yxeA9whvnd3 X40reUlSXsUbJwA8Bg6GoLKGfb1W7sWXE61E6Fjb2DUsc/LS1COTAAA2RHJfKW39i+nL lwpz0qqI2g4bEM+IKPZPylECmyzRYqkTnB45isYTy7qcn5QAQXu8sa9IKVxh79sqIt92 RyWeF0MUz/SZeznhHBa7Ye7xYi7TktrFyWTNjVBNu89uu+deX4p4kTgmVxML6DHynX+s p+JQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:content-transfer-encoding:mime-version :message-id:date:subject:cc:from:dkim-signature; bh=hcGqjrsVYd4m1KPrxn+0lQoybxEDVr6kOaUDeRE6zmI=; b=p6PMhKKpeZqBlYYjxK4qobCrxgYGcUu0W1YGovTZWjIH7UVZhiUnZDAGMrmoy7YH33 mEOGLnpW8MOsONG581S2D7yU2e4/SlUP394//I+jJqCKXFh2i97R5Zv4DP1+pTUWsrRT hCCES947JquHrBv2I9P893ZMSRm6gJIV8vGwJoC+OBWO6ZU1ryzctgrzZnQi7o/4gN8a k1V2iYo/RKRi0+3jtT8P+wbkgZPHs7gOjEjzOLm9Gpq+XZRdP5WX+5szUwF89zFJy6Xr ihLpGrtTsrQS38HRYNaH64ntTE9mc5QxudsK3NAmgro2Rj5u7Rd41ut81q8JKxgNaQTI Tq5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=YeVxXAqV; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k7si5807687edb.265.2019.10.31.23.57.19; Thu, 31 Oct 2019 23:58:06 -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=fail header.i=@gmail.com header.s=20161025 header.b=YeVxXAqV; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729968AbfKAGyj (ORCPT + 99 others); Fri, 1 Nov 2019 02:54:39 -0400 Received: from mail-qt1-f194.google.com ([209.85.160.194]:41738 "EHLO mail-qt1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725798AbfKAGyj (ORCPT ); Fri, 1 Nov 2019 02:54:39 -0400 Received: by mail-qt1-f194.google.com with SMTP id o3so11785224qtj.8; Thu, 31 Oct 2019 23:54:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=hcGqjrsVYd4m1KPrxn+0lQoybxEDVr6kOaUDeRE6zmI=; b=YeVxXAqVWVDIPdLaehRkoXfjySSQfTzBU/ZBCLkDK28tHxsHSRsfrINkW3yjNGBmun hG9hZ1Znj3jgqaoZJ2bep3bT4/jiin/tFz5WtYzdyEjtqOBdJN0Xe/bKRNKHv6VH7/7x RgM8qqPz9l2xbeayjvxsmu2ugv9F2QbBFOv0W79xJ4NimVanGI8SrdpEXHDTlXBD9QjZ Z5/L5HuopLPx+LH4Ipubnn2fXsIsCk8vijciSI9Z6nDuXMa4cx5Lo13aynE423+zuqQP Q8e1nOv5mqq4T1L+q7XVK3sm8VSJUUSh68UYnK+iO3YRoCdjTIFQ1Q23j7vjRs0dloKS qpXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=hcGqjrsVYd4m1KPrxn+0lQoybxEDVr6kOaUDeRE6zmI=; b=d1+hAzapErpCNSVdGnjoj2SrBa7k/OJnLDUUpb9sUi7ZoDq/S5awuAS+Qbu+5S9X0W 2cJSI+kupOC/N0X4bN7TUeXbDsBWHwGh7Jkp9rFDtYvlvcy6NSihTkcFwDanSo63+I3M LDhwes+RbRo4nsp02hxcDMZrwmGO5mF7Otahhv0xkHT19avcoe9Z3vuPZdrzXHr63P/4 Ninp+Z36w/LR445+oH6AB0Xj/g7gQ3xMGVXElw/RsVaPVl7SvdBJiHObwd52GaFxCwT4 ZiWBtxLwfXaTNj7KD/imWsvDOq5WCElI27dgnnFcOXZfqrtT+IT8d8pfoOxKwG1Okxps mmkQ== X-Gm-Message-State: APjAAAX+H8cox9/XQgR8Ob+eeZE+/hHRRTvwFqRORqsdgTtLFO1NZSrd 6yllTeLl3SXnVO6z9C2BQrQ= X-Received: by 2002:ac8:67c1:: with SMTP id r1mr8955296qtp.83.1572591278529; Thu, 31 Oct 2019 23:54:38 -0700 (PDT) Received: from suzukaze.ipads-lab.se.sjtu.edu.cn ([202.120.40.82]) by smtp.gmail.com with ESMTPSA id l93sm3203382qtd.86.2019.10.31.23.54.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 31 Oct 2019 23:54:37 -0700 (PDT) From: Chuhong Yuan Cc: Milo Kim , Lee Jones , Daniel Thompson , Jingoo Han , Bartlomiej Zolnierkiewicz , dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org, Chuhong Yuan Subject: [PATCH] backlight: lp855x: disable enable regulator when remove Date: Fri, 1 Nov 2019 14:53:33 +0800 Message-Id: <20191101065333.7004-1-hslester96@gmail.com> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit To: unlisted-recipients:; (no To-header on input) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org lp855x forgets to disable enable regulator when remove. Add a call to regulator_disable in remove just like what is done to supply regulator. Signed-off-by: Chuhong Yuan --- drivers/video/backlight/lp855x_bl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/video/backlight/lp855x_bl.c b/drivers/video/backlight/lp855x_bl.c index f68920131a4a..4fcf9ec18868 100644 --- a/drivers/video/backlight/lp855x_bl.c +++ b/drivers/video/backlight/lp855x_bl.c @@ -499,6 +499,8 @@ static int lp855x_remove(struct i2c_client *cl) backlight_update_status(lp->bl); if (lp->supply) regulator_disable(lp->supply); + if (lp->enable) + regulator_disable(lp->enable); sysfs_remove_group(&lp->dev->kobj, &lp855x_attr_group); return 0; -- 2.23.0