From patchwork Mon Jun 14 11:34:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 459845 Delivered-To: patch@linaro.org Received: by 2002:a02:735a:0:0:0:0:0 with SMTP id a26csp3201067jae; Mon, 14 Jun 2021 04:39:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy/34WeXjbA3i2hdI5C07zyQafY/AD1JB6Bii+kAxXflyIZXRn5lYI25+ZTRgf+MZX1qfuT X-Received: by 2002:a50:ec08:: with SMTP id g8mr16794308edr.376.1623670778628; Mon, 14 Jun 2021 04:39:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623670778; cv=none; d=google.com; s=arc-20160816; b=N1FH9VTmVO/xzuJh7YEyBmlmTwNsi9s7+eVK4BMLzfzrS0MNtM3mNatGTGXItkVqEu Z7HpDmAUaEmWcYgWKRDwuFBstRH+hVG/ofhNMjXKAmMYwejNiXsJrUjYgrBwPE9Ffc4E 6qbnY49yEEJtUIDjK4diiIsdcOp5RJEazjoKto8OQwQkGVEyAT2GyBk6O17LABa/oIVw ar+UEFUQddlwSQu2M7uAGanUjUQ9js7ljjkvqn65244aIGF5lGsGQPBBdDmcz2e9uUKw 75UYNuwC4WKubhaQ+fDUvoDuNZJTvyd3SOyV0bmW+1neX5h8k0avxyekSylw3GMXUI5F +CwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=1TkXQUD5le8vpaeoGxk0BMJOex9I8nZshB+DSx0HMl4=; b=QkKecxb5tUTDJbyIKK0SezwCKIxqP1JLowbXuW21gst88OGOKh2v1N9fFmCfePstBV KnR67g+5RhpFngBSsLGN1cjNusOIoW+gSy2FE/t687MjecmkboWtXRpv1hTE3Zc+HFBj uAdxaRKUA2inJ4Cwh2AoIehogXxNohQNihIitqLHgmtYalf0/Na/ODWl1KHgOYFuI8cz v3qI7Zfy5S0tSnfBDXk24CmLKR7rvay24FER1Cimxy5ZwuzvKiT+bacWLrtosEnyL/hL XVzUH1b+srOdJwCOPzHD4uGQzpVIfVX7tOHYLPYg4/fNp3kKGmeY49vCNzKLIUvuwBNc Mr0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=YVX2UPmD; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z13si10875643ejb.275.2021.06.14.04.39.38; Mon, 14 Jun 2021 04:39:38 -0700 (PDT) Received-SPF: pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=YVX2UPmD; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235862AbhFNLlg (ORCPT + 7 others); Mon, 14 Jun 2021 07:41:36 -0400 Received: from mail.kernel.org ([198.145.29.99]:59698 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236056AbhFNLhY (ORCPT ); Mon, 14 Jun 2021 07:37:24 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 469F0611EE; Mon, 14 Jun 2021 11:33:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1623670419; bh=XvUmnBhp741OqeRlc9z7LVCxaoX+lzDfpn4J2bqjm2I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YVX2UPmDGjWYXgXzSxdRrz2d5wJEfUT+jpkm4Qw+upe4nq+bJipN5KyQqDDlSOqrk qqCfFPqRZmR/tOt+ElTnDih88fS+dDkKPN7cfTvKjVPmiMITlJK9IMKH4/b/ZpseYj Gk/f5VnsWlSmnP8nRUS1109LiesK0TvnUXukK10Syj2ebEb0QMpyu2YpLEZlWHBC2n 2c/Uywr/0YcqN4+4jasKRqCGeteUhz6aTaYwjkWhlKEx0LUrisrtja5aZDrHECQe6O ubJQ39TinXzVhmP575N5r4JsLG/dtoiMnPJikfGrNLrH+BjxPHVMsyWf2b2LQi0kwI pHFnMH8YufILA== From: Jonathan Cameron To: linux-iio@vger.kernel.org, Rob Herring Cc: Michael.Hennerich@analog.com, lars@metafoo.de, devicetree@vger.kernel.org, Nuno Sa , Jonathan Cameron Subject: [PATCH 08/17] staging:iio:adc:ad7280a: Drop unused timestamp channel. Date: Mon, 14 Jun 2021 12:34:58 +0100 Message-Id: <20210614113507.897732-9-jic23@kernel.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210614113507.897732-1-jic23@kernel.org> References: <20210614113507.897732-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Jonathan Cameron The driver doesn't support buffered mode, so a timestamp channel that is entirely hidden from userspace without buffer mode is rather pointless. Drop it. Signed-off-by: Jonathan Cameron --- drivers/staging/iio/adc/ad7280a.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) -- 2.32.0 diff --git a/drivers/staging/iio/adc/ad7280a.c b/drivers/staging/iio/adc/ad7280a.c index 032d6430bebf..58bddd07df0c 100644 --- a/drivers/staging/iio/adc/ad7280a.c +++ b/drivers/staging/iio/adc/ad7280a.c @@ -613,16 +613,6 @@ static void ad7280_total_voltage_channel_init(struct iio_chan_spec *chan, chan->scan_type.storagebits = 32; } -static void ad7280_timestamp_channel_init(struct iio_chan_spec *chan, int cnt) -{ - chan->type = IIO_TIMESTAMP; - chan->channel = -1; - chan->scan_index = cnt; - chan->scan_type.sign = 's'; - chan->scan_type.realbits = 64; - chan->scan_type.storagebits = 64; -} - static void ad7280_init_dev_channels(struct ad7280_state *st, int dev, int *cnt) { int addr, ch, i; @@ -650,7 +640,7 @@ static int ad7280_channel_init(struct ad7280_state *st) { int dev, cnt = 0; - st->channels = devm_kcalloc(&st->spi->dev, (st->slave_num + 1) * 12 + 2, + st->channels = devm_kcalloc(&st->spi->dev, (st->slave_num + 1) * 12 + 1, sizeof(*st->channels), GFP_KERNEL); if (!st->channels) return -ENOMEM; @@ -659,8 +649,6 @@ static int ad7280_channel_init(struct ad7280_state *st) ad7280_init_dev_channels(st, dev, &cnt); ad7280_total_voltage_channel_init(&st->channels[cnt], cnt, dev); - cnt++; - ad7280_timestamp_channel_init(&st->channels[cnt], cnt); return cnt + 1; }