From patchwork Mon Dec 27 09:45:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 12699665 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C3CA8C433EF for ; Mon, 27 Dec 2021 09:47:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=HKEFnjCnf50az3BXxRAyHa+c+vfCj6lC50NMvncU7Mk=; b=yf971kJerQecUS xT8tYgZyWoL2MhW3qRknd90j6pkZOjZzHMu+q0kFwba85SqxRYegGdOjVkNa5YKlWTYuVp5zq/5PC KESC0ZxeVsrozgfBsZfdhYDrwOHgMFZ9MUMi9A0q/R7khRcoOhHV9sEA9UFnfk2J4CzEnRAhly17h WHEM6fouXQKmJYg3GvyMiV3aWVS0OPe+gsFhgybrjfrswdCdyOvUoHH9UdIbqKE9tGFZku2uqHtHX F0M4Tsm0fYNJE2xrhGiFuBCb9atF6zD2l+AtLLkrE212ZDrBKHRKedseLw/+hPozdYAGbtrqJBQLq nGrntd5JtDRhLgXRebcw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1n1mZu-00GSMn-Sr; Mon, 27 Dec 2021 09:46:03 +0000 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1n1mZh-00GSHS-NF for linux-arm-kernel@lists.infradead.org; Mon, 27 Dec 2021 09:45:51 +0000 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n1mZU-0006YP-G4; Mon, 27 Dec 2021 10:45:36 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1n1mZT-006u8z-3e; Mon, 27 Dec 2021 10:45:34 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1n1mZR-0005Ue-VE; Mon, 27 Dec 2021 10:45:33 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: William Breathitt Gray Cc: Lars-Peter Clausen , kernel@pengutronix.de, Jonathan Cameron , linux-iio@vger.kernel.org, Greg Kroah-Hartman , linux-kernel@vger.kernel.org, Kamel Bouhara , linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 07/23] counter: microchip-tcb-capture: Convert to counter_priv() wrapper Date: Mon, 27 Dec 2021 10:45:10 +0100 Message-Id: <20211227094526.698714-8-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211227094526.698714-1-u.kleine-koenig@pengutronix.de> References: <20211227094526.698714-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Patch-Hashes: v=1; h=sha256; i=Hp2T2iFLn7CFN8KF5qhl8Yel9BpU8tmTjZCiPEA8/Ww=; m=O/hbHSowifJBTpUmrGb87d4c+26dGvtHSBxVMu37a1o=; p=BYcvZ0zO3MM6N3oWt5xWrZtJqTSlsGv5VeTpFmQXUpI=; g=1eb51e809fab672de15f82de80b728ef59b6bca7 X-Patch-Sig: m=pgp; i=u.kleine-koenig@pengutronix.de; s=0x0D2511F322BFAB1C1580266BE2DCDD9132669BD6; b=iQEzBAABCgAdFiEEfnIqFpAYrP8+dKQLwfwUeK3K7AkFAmHJioAACgkQwfwUeK3K7AlO0Af+Lms UuCkhfj7ZF7u3uwcsqdsceSYMieJdvAnXjoF0TyCg/iKFVy04jRr8QMOdYvB7Fwpg4HjNe82w2QeM ZsxGY83nOKKpk37/IjerKzHRuP45Cy6ZIcgqeAWJkNCrN27uXzbwKgol/pcdYj3ILbY58V+n9Bols Z8nJERv5zRtUv27hoNs5FOEutQs7oamTPSrINgcb5PnXULnanVATOMT4H5WVgN1jNr8eQtUfW3tbR sZ5YBt5125cdz+7FUKcd7vS8NEIxofIOnOMZIjw6C16xvSuK+0r/UIWfkdz+NDxJ45DRB2lm5tjmZ VwC64OwBtQxee54r7e+sdMow045vBbA== X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-arm-kernel@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211227_014549_801069_0E1EBBC0 X-CRM114-Status: GOOD ( 11.32 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This is a straight forward conversion to the new counter_priv() wrapper. Signed-off-by: Uwe Kleine-König Acked-by: Jonathan Cameron Acked-by: William Breathitt Gray --- drivers/counter/microchip-tcb-capture.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/counter/microchip-tcb-capture.c b/drivers/counter/microchip-tcb-capture.c index bb69f2e0ba93..1b56b7444668 100644 --- a/drivers/counter/microchip-tcb-capture.c +++ b/drivers/counter/microchip-tcb-capture.c @@ -72,7 +72,7 @@ static int mchp_tc_count_function_read(struct counter_device *counter, struct counter_count *count, enum counter_function *function) { - struct mchp_tc_data *const priv = counter->priv; + struct mchp_tc_data *const priv = counter_priv(counter); if (priv->qdec_mode) *function = COUNTER_FUNCTION_QUADRATURE_X4; @@ -86,7 +86,7 @@ static int mchp_tc_count_function_write(struct counter_device *counter, struct counter_count *count, enum counter_function function) { - struct mchp_tc_data *const priv = counter->priv; + struct mchp_tc_data *const priv = counter_priv(counter); u32 bmr, cmr; regmap_read(priv->regmap, ATMEL_TC_BMR, &bmr); @@ -148,7 +148,7 @@ static int mchp_tc_count_signal_read(struct counter_device *counter, struct counter_signal *signal, enum counter_signal_level *lvl) { - struct mchp_tc_data *const priv = counter->priv; + struct mchp_tc_data *const priv = counter_priv(counter); bool sigstatus; u32 sr; @@ -169,7 +169,7 @@ static int mchp_tc_count_action_read(struct counter_device *counter, struct counter_synapse *synapse, enum counter_synapse_action *action) { - struct mchp_tc_data *const priv = counter->priv; + struct mchp_tc_data *const priv = counter_priv(counter); u32 cmr; regmap_read(priv->regmap, ATMEL_TC_REG(priv->channel[0], CMR), &cmr); @@ -197,7 +197,7 @@ static int mchp_tc_count_action_write(struct counter_device *counter, struct counter_synapse *synapse, enum counter_synapse_action action) { - struct mchp_tc_data *const priv = counter->priv; + struct mchp_tc_data *const priv = counter_priv(counter); u32 edge = ATMEL_TC_ETRGEDG_NONE; /* QDEC mode is rising edge only */ @@ -230,7 +230,7 @@ static int mchp_tc_count_action_write(struct counter_device *counter, static int mchp_tc_count_read(struct counter_device *counter, struct counter_count *count, u64 *val) { - struct mchp_tc_data *const priv = counter->priv; + struct mchp_tc_data *const priv = counter_priv(counter); u32 cnt; regmap_read(priv->regmap, ATMEL_TC_REG(priv->channel[0], CV), &cnt);