From patchwork Fri Mar 9 23:46:25 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rodrigo Siqueira X-Patchwork-Id: 10272569 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 6F01760594 for ; Fri, 9 Mar 2018 23:46:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 60CC92A027 for ; Fri, 9 Mar 2018 23:46:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 535B72A03C; Fri, 9 Mar 2018 23:46:34 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DD0C729FE0 for ; Fri, 9 Mar 2018 23:46:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932571AbeCIXqd (ORCPT ); Fri, 9 Mar 2018 18:46:33 -0500 Received: from mail-qt0-f193.google.com ([209.85.216.193]:44795 "EHLO mail-qt0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932557AbeCIXqc (ORCPT ); Fri, 9 Mar 2018 18:46:32 -0500 Received: by mail-qt0-f193.google.com with SMTP id g60so12916975qtd.11; Fri, 09 Mar 2018 15:46:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=qHgXIwAuE5JNCnGI1NzpA63ecPIBHHXK6FCvuQIQ/KI=; b=Xkk5O6ooRN7EC3c3zdZCOdGRgMvY5yTkYdzGbvbZbhkfIn8wgAVUd7xOG3teR2ig++ PmmEHLtQREflMO96hbxB7p8wp1DkvgSB/ReDcDm8aFeMIyeY1aOCSDf5CBVyszf/LEJi toa72vXQ9EfhQF2SrCI7aOXHoQzCtMBm1b99aRVcNhJwYz8hV+/0bz8LlXYsVvaFXhVa DC3QVDhxrVlNUjO74OawyLbie4wQGdnh8Dy/H/rdm0VqwhRSVqkJeb3+B0DCWFz5PbHc CGl2Ltw2OieDosg5s2NoiXSNNT2GX+Wbz5+f+D0PfwTqCzbVV2+s9RBVuCEyaGU934+y xMrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=qHgXIwAuE5JNCnGI1NzpA63ecPIBHHXK6FCvuQIQ/KI=; b=PzH4Z7i+LnLVOW5ghvqTvlfpoXiEK13fJGZ2J4BYdd5m4QDgCXmXLZhMgd/WkcVMYl gsknlay1DJNeoDf0yKRNBa2o4+4Cn77XT1JG3oIHL0HcxIV0aWdxeCAmwntesJz9x5/s gYAeyAvCrRDnC6dkiWfTN+BZHtKT74HvkKk+aRbV7eX654F/u5uV8NzLDVCe1pM5VyIo toj159GD5dRbEhFN2yOCiF8S4I+gH7jGkJbbEsAUWVwOyGO2ieeIADoFWorDm8SyN42Y hGVy5yy9sn2HTeYMVbN3RzZ0AyG1+7z2xbjWKsAGw3TT93HPh4H4ByGsikw18Hf4iqnN ArFQ== X-Gm-Message-State: AElRT7H4hZy2HC7UQsf43hdC9+pu6flRQLO0Ba+gzv+6mrq0zvPC/FTM UPqqeaY9tNJ0yJe+p6tPzJham/w+ X-Google-Smtp-Source: AG47ELslSOzxPS3B89/R/3gz1UJZgj7tvOnDJJWV7GbxgFut58ICtBGer948MoCKwTu/jVmLPIFkLw== X-Received: by 10.237.46.69 with SMTP id j63mr360275qtd.257.1520639191366; Fri, 09 Mar 2018 15:46:31 -0800 (PST) Received: from smtp.gmail.com ([143.107.45.1]) by smtp.gmail.com with ESMTPSA id m8sm1587839qkm.26.2018.03.09.15.46.28 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 09 Mar 2018 15:46:30 -0800 (PST) Date: Fri, 9 Mar 2018 20:46:25 -0300 From: Rodrigo Siqueira To: Lars-Peter Clausen , Michael Hennerich , Jonathan Cameron , Hartmut Knaack , Peter Meerwald-Stadler , Greg Kroah-Hartman , Graff Yang Cc: daniel.baluta@nxp.com, linux-iio@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/4] staging:iio:ad2s1210: Remove old_data from ad2s1210_state Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20171215 Sender: linux-iio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The variable old_data is a bool type, which only receives the value 'true' in the function ad2s1210_config_write and ad2s1210_config_read. There is no other use for this variable. This patch removes old_data from the ad2s1210_state and from all the function that use it. Signed-off-by: Rodrigo Siqueira --- drivers/staging/iio/resolver/ad2s1210.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/staging/iio/resolver/ad2s1210.c b/drivers/staging/iio/resolver/ad2s1210.c index 79cb56670fc2..ac13b99bd9cb 100644 --- a/drivers/staging/iio/resolver/ad2s1210.c +++ b/drivers/staging/iio/resolver/ad2s1210.c @@ -76,7 +76,6 @@ struct ad2s1210_state { unsigned int fclkin; unsigned int fexcit; bool hysteresis; - bool old_data; u8 resolution; enum ad2s1210_mode mode; u8 rx[2] ____cacheline_aligned; @@ -107,7 +106,6 @@ static int ad2s1210_config_write(struct ad2s1210_state *st, u8 data) ret = spi_write(st->sdev, st->tx, 1); if (ret < 0) return ret; - st->old_data = true; return 0; } @@ -129,7 +127,6 @@ static int ad2s1210_config_read(struct ad2s1210_state *st, ret = spi_sync_transfer(st->sdev, &xfer, 1); if (ret < 0) return ret; - st->old_data = true; return st->rx[1]; }