Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp6374739ybe; Wed, 18 Sep 2019 02:22:42 -0700 (PDT) X-Google-Smtp-Source: APXvYqwwuT7WPOWEkWlH+ASx6Q+tmb75zcHDPwXqH8r3YQPXOtajxZVEzm5E1QClT/G/+r/lu5km X-Received: by 2002:aa7:dd8e:: with SMTP id g14mr6406798edv.233.1568798562498; Wed, 18 Sep 2019 02:22:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568798562; cv=none; d=google.com; s=arc-20160816; b=rU4MglXJpw5BTOLaxzixjBjPzvhFukyuOXtRpG2nd9DKkICQOPcsydnVIBRMWKBENl MIGgrKcpAemnu2EFAQtUl30nLCNSOyn7fZyLqo4txsCJ7gQvvxG6Wb5bFz0LqIUQUG9d jvngDZWyFnuHqf1SeR6JRDeU7uz/TpSBGZecr1bg4rhGy3bR6kluthyFsjU+y2goEybG 5IUBEhm1gJyhL4zjcb7XvgRufSJFnfjUIMaoCfy/+MHHxsP0iVKgOvNqrUPpBEOep/50 FmlsFY07NsdNqFZsHNGPj8Wk/Qc9xDdoT9ipWNQYGlJIeC8ou5TZuVFvIhzxxol21gZU vRzQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=jztD0q/pSM8JUi6mwAcEWzxcgZfTnzpK2xWBV2x6KlU=; b=piG4IdHEhvqAoHTblwk4x22Hpywm6V0Ko4CV58n1MPhJ1Ahz0ajlQZ1Rg0w8i73BJH 3LjIq+hVvd4u1rTQ1U4bQ6fXSCjuMWYBKun/Pk5FVkyt8+rlaX186/5qBvrXHUN5wRno hEqCNLWGc+MJ2c+McViV3EX3RKNtnHcXj53jfhnYfxzh+FhAv9Ifh3X73qb/EILLbibD Ea/WYFnrz9aVDyB/xijMoE20a5MXdSyedsJDPUMTEJcC0KKBDbzokS6wyMYyAgrQ854M W0etmPY1BaHajszT4RJM3bPR1wuEvdc4HUBjaHMnak35r8m0pJy6JSpxxeulSdl/fPlT LYtg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Um9D2iCr; 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=pass (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 t7si2581574ejo.302.2019.09.18.02.22.18; Wed, 18 Sep 2019 02:22:42 -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=@gmail.com header.s=20161025 header.b=Um9D2iCr; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728987AbfIRHxj (ORCPT + 99 others); Wed, 18 Sep 2019 03:53:39 -0400 Received: from mail-pf1-f194.google.com ([209.85.210.194]:38733 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725989AbfIRHxi (ORCPT ); Wed, 18 Sep 2019 03:53:38 -0400 Received: by mail-pf1-f194.google.com with SMTP id h195so3829572pfe.5; Wed, 18 Sep 2019 00:53:37 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=jztD0q/pSM8JUi6mwAcEWzxcgZfTnzpK2xWBV2x6KlU=; b=Um9D2iCr8IeMcdqzFKJCNkI4+H9iquS7B6UFk6cgl4jXkAirxwIuJ95qkKTrUhPsfT gTJcQMEthS4bzi0GfhSAd52gBR5BnadIzveTBTJe5gXEKvFl/zkrZBG1JQAG3wwASiDa INEDf4012fWYH/QZwcG3VHMmcNQaX2TVdkk3ncLyDT9fs5uPELiztes5FG8XMNlvN0fi YM0fnrpbCFQ0TSpfLVRR3SyTJKZH5qDBhLa0bfCyr2euLMqndD+EYffJSPfQ3LI5rTg4 VbrNEubms5qPtsWb331YMEQTqHr4o0GWM0hcAlBaJwAVOpVN8q53IHXZBOA7Z1F9Hfxs DeqQ== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=jztD0q/pSM8JUi6mwAcEWzxcgZfTnzpK2xWBV2x6KlU=; b=ZtCzrhVHnFd2IKs7QWEhx/R7k5ImqY47+rM6Wu6GqCtpr1ZwF3y/scYX/eXsHrSZqk dUDBtcQLdF+SMhTMRcKo88Jk2b1nUc0t+qxyeNGS5kR32d2lrvBFYO0jOaa0iB7ghfXc +SLHLAz0RPn6cbfkNjPItToMmLbAf+F+c7kAXnMnDZCRztwSniia3pisKwQYqj45Hvzu e+GD4a00fsPL9xSTg9ue5Oo8OzJO4hQ79OAR2R+z2AfMax42ZxuYVK3ta0YNKB6bN2IY RNkI/AYCdN3Fk88mb808zxG7vk//yBIa5JyR1vZGTUC5iDlRZ6A8O3NpdhHcyOM1akyP i6+Q== X-Gm-Message-State: APjAAAWzcpCmjxs8xueY054i5Q4BWCxRKfUpYRZpY5wXQ6ZTbKvGEwZ9 29N4HrJ8r5AAqJZoK6bZ3ks= X-Received: by 2002:a63:2004:: with SMTP id g4mr2593156pgg.97.1568793217016; Wed, 18 Sep 2019 00:53:37 -0700 (PDT) Received: from localhost.localdomain ([2001:268:c147:d9df:f819:e399:825f:f2dc]) by smtp.gmail.com with ESMTPSA id h8sm5580715pfo.64.2019.09.18.00.53.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Sep 2019 00:53:36 -0700 (PDT) From: William Breathitt Gray To: jic23@jic23.retrosnub.co.uk Cc: linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org, patrick.havelange@essensium.com, fabrice.gasnier@st.com, mcoquelin.stm32@gmail.com, alexandre.torgue@st.com, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, William Breathitt Gray Subject: [PATCH v2 5/7] counter: ftm-quaddec: Update count_read and count_write callbacks Date: Wed, 18 Sep 2019 16:52:46 +0900 Message-Id: <6925fdda26c57ce29d373f8cb01a572cd7b92c0f.1568792697.git.vilhelm.gray@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The count_read and count_write callbacks pass unsigned long now. Cc: Patrick Havelange Signed-off-by: William Breathitt Gray --- drivers/counter/ftm-quaddec.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/drivers/counter/ftm-quaddec.c b/drivers/counter/ftm-quaddec.c index 4046aa9f9234..c2b3fdfd8b77 100644 --- a/drivers/counter/ftm-quaddec.c +++ b/drivers/counter/ftm-quaddec.c @@ -178,31 +178,25 @@ static const enum counter_count_function ftm_quaddec_count_functions[] = { static int ftm_quaddec_count_read(struct counter_device *counter, struct counter_count *count, - struct counter_count_read_value *val) + unsigned long *val) { struct ftm_quaddec *const ftm = counter->priv; uint32_t cntval; ftm_read(ftm, FTM_CNT, &cntval); - counter_count_read_value_set(val, COUNTER_COUNT_POSITION, &cntval); + *val = cntval; return 0; } static int ftm_quaddec_count_write(struct counter_device *counter, struct counter_count *count, - struct counter_count_write_value *val) + const unsigned long val) { struct ftm_quaddec *const ftm = counter->priv; - u32 cnt; - int err; - err = counter_count_write_value_get(&cnt, COUNTER_COUNT_POSITION, val); - if (err) - return err; - - if (cnt != 0) { + if (val != 0) { dev_warn(&ftm->pdev->dev, "Can only accept '0' as new counter value\n"); return -EINVAL; } -- 2.23.0