From patchwork Thu Apr 9 12:12:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 11481693 X-Patchwork-Delegate: kieran@bingham.xyz Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 31B6C81 for ; Thu, 9 Apr 2020 12:12:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0770E2078E for ; Thu, 9 Apr 2020 12:12:19 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="DuQxfqE1" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725971AbgDIMMS (ORCPT ); Thu, 9 Apr 2020 08:12:18 -0400 Received: from perceval.ideasonboard.com ([213.167.242.64]:48748 "EHLO perceval.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725987AbgDIMMS (ORCPT ); Thu, 9 Apr 2020 08:12:18 -0400 Received: from localhost.localdomain (cpc89242-aztw30-2-0-cust488.18-1.cable.virginm.net [86.31.129.233]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 5E407B76; Thu, 9 Apr 2020 14:12:14 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1586434334; bh=pdHCUgdVl8LkYL5fW7b0d6FhnYAruiXmUZz019Mzh/E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DuQxfqE1IhHFU6dNQZkPNeTN+ID9fN4/CgwcRm9whbMjqbpDj847w/qy/De6qKjnb H3iP6tfDm9/2rnRIJu3HxA9bCSdwA0EYX4jKRqfB8HuG52DmakpbKRtd+pxpbauQUQ YrjfOb+AbPejcv5cqoKdKbRpUcPXgTk3b6ZZpz34= From: Kieran Bingham To: linux-renesas-soc@vger.kernel.org, Jacopo Mondi , Laurent Pinchart , =?utf-8?q?Niklas_S?= =?utf-8?q?=C3=B6derlund?= , Hyun Kwon , Manivannan Sadhasivam Cc: Kieran Bingham Subject: [PATCH v8 13/13] sqaush! max9286: Remove poc_enabled workaround Date: Thu, 9 Apr 2020 13:12:02 +0100 Message-Id: <20200409121202.11130-14-kieran.bingham+renesas@ideasonboard.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200409121202.11130-1-kieran.bingham+renesas@ideasonboard.com> References: <20200409121202.11130-1-kieran.bingham+renesas@ideasonboard.com> MIME-Version: 1.0 Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org This boolean is a flag used to handle the regulator when our multi-max9286 workaround is in place. It shouldn't be in the upstream driver, and is moved out. Signed-off-by: Kieran Bingham --- drivers/media/i2c/max9286.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/media/i2c/max9286.c b/drivers/media/i2c/max9286.c index 6f114756a1e2..022f4cfaf294 100644 --- a/drivers/media/i2c/max9286.c +++ b/drivers/media/i2c/max9286.c @@ -152,7 +152,6 @@ struct max9286_priv { struct v4l2_subdev sd; struct media_pad pads[MAX9286_N_PADS]; struct regulator *regulator; - bool poc_enabled; struct gpio_chip gpio; u8 gpio_state; @@ -1066,8 +1065,6 @@ static int max9286_init(struct device *dev) return ret; } - priv->poc_enabled = true; - ret = max9286_setup(priv); if (ret) { dev_err(dev, "Unable to setup max9286\n"); @@ -1099,7 +1096,6 @@ static int max9286_init(struct device *dev) max9286_v4l2_unregister(priv); err_regulator: regulator_disable(priv->regulator); - priv->poc_enabled = false; return ret; } @@ -1324,8 +1320,7 @@ static int max9286_remove(struct i2c_client *client) max9286_v4l2_unregister(priv); - if (priv->poc_enabled) - regulator_disable(priv->regulator); + regulator_disable(priv->regulator); regulator_put(priv->regulator); gpiod_set_value_cansleep(priv->gpiod_pwdn, 0);