From patchwork Thu Nov 1 14:43:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Renato Lui Geh X-Patchwork-Id: 10664041 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 363BF13A4 for ; Thu, 1 Nov 2018 14:43:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 049F426BE9 for ; Thu, 1 Nov 2018 14:43:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 02B3C2880B; Thu, 1 Nov 2018 14:43:47 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI 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 AEE5628B1C for ; Thu, 1 Nov 2018 14:43:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728494AbeKAXrD (ORCPT ); Thu, 1 Nov 2018 19:47:03 -0400 Received: from mail-qt1-f194.google.com ([209.85.160.194]:45200 "EHLO mail-qt1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728352AbeKAXrC (ORCPT ); Thu, 1 Nov 2018 19:47:02 -0400 Received: by mail-qt1-f194.google.com with SMTP id l9-v6so21292759qtj.12; Thu, 01 Nov 2018 07:43:46 -0700 (PDT) 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=50YKaMUXZTtrepHYaXBxTyw7j/sLoX4pes7YMM1sdIA=; b=Zqu4lf9LEdI0JPVj8jo6iyJKhAc3Vf1Ky5bh/jyecME978KCvUvdi6l4PsE1BNFwrI i+9HOGB31BBMkKmiAamykmx//rwpewgM4H1L99OfohOKOxhaI74dcvaq5tbfY6U+KccH j2wueHie5ZOmiFvws8m4wFIPmauC+amohBSPban3Y4XpvNqOOw8RnecAgqibx/ING8qX XU0TgfSxdEmJvHx49PyCpimd4PVTRXiuPDLsXl6uoFd2/3UN/4uVZyRiwDEO2M/XR6VW 1nuyLoMZPAjSyMHUKmFGXR8ew+jyBQS86zNI73sYoi+GnIHKpj79UeRWfb1JgnPu9tOC jTnw== 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=50YKaMUXZTtrepHYaXBxTyw7j/sLoX4pes7YMM1sdIA=; b=HJvQIwA+yzBaqNDrJR0sLtFmpH4HM60H/x6fsJphqegRHjp0VxOsklhDQpCDTUA6BG gv/rcZIKO0uKpQpbs9erDgQQE/KPmDTgeIGu8aA7aWaFZsvoA6gkK3RN4CaXR/vMkP8D Xf9VDF4MLAI46yH+NMw3iBuJmHIDV24S00o2hvDMe+HNF7ul7h5tSUWJoS1sh+g3efaK 416D/CnL6m5wA0nAYgSFqz8PgbT78rX2KfH4BBsoXK35mfvNeuWFMz+62I/dmCXu4VVd gkdNWYZekFB0P4FqNu0tA4Tj8k9a7H4hn8+lmRIFPqzWadoMzRFvcYatH9lJBcg2UzeZ OGhw== X-Gm-Message-State: AGRZ1gLjtgr3B9u9JvcRr1UVKbZ6UdvV+OfZNzv+OuRNFZY2rb6vl/YW 6LF7IqDaiTsVaImt2ByjRlo= X-Google-Smtp-Source: AJdET5eOnG5jnq5AI+JLmbs8efVFFw9CoUwubLYmzm7ARmwiWtyezKpVw1jfAKBmdODus7eKY6NfVw== X-Received: by 2002:a0c:ae76:: with SMTP id z51-v6mr7098225qvc.108.1541083426113; Thu, 01 Nov 2018 07:43:46 -0700 (PDT) Received: from renatolg ([143.107.45.1]) by smtp.gmail.com with ESMTPSA id l123-v6sm5729208qkd.95.2018.11.01.07.43.43 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 01 Nov 2018 07:43:45 -0700 (PDT) Date: Thu, 1 Nov 2018 11:43:41 -0300 From: Renato Lui Geh To: lars@metafoo.de, Michael.Hennerich@analog.com, jic23@kernel.org, knaack.h@gmx.de, pmeerw@pmeerw.net, gregkh@linuxfoundation.org, giuliano.belinassi@usp.br Cc: linux-iio@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, kernel-usp@googlegroups.com Subject: [PATCH v3 3/3] staging: iio: ad7780: remove unnecessary stashed voltage value Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180716 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 This patch removes the unnecessary field int_vref_mv in ad7780_state referring to the device's voltage. Signed-off-by: Renato Lui Geh --- Changes in v3: - removed unnecessary int_vref_mv from ad7780_state drivers/staging/iio/adc/ad7780.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/staging/iio/adc/ad7780.c b/drivers/staging/iio/adc/ad7780.c index f2a11e9424cd..f250370efcf7 100644 --- a/drivers/staging/iio/adc/ad7780.c +++ b/drivers/staging/iio/adc/ad7780.c @@ -42,7 +42,6 @@ struct ad7780_state { struct regulator *reg; struct gpio_desc *powerdown_gpio; unsigned int gain; - u16 int_vref_mv; struct ad_sigma_delta sd; }; @@ -190,9 +189,7 @@ static int ad7780_probe(struct spi_device *spi) st->chip_info = &ad7780_chip_info_tbl[spi_get_device_id(spi)->driver_data]; - if (voltage_uv) - st->int_vref_mv = voltage_uv / 1000; - else + if (!voltage_uv) dev_warn(&spi->dev, "Reference voltage unspecified\n"); spi_set_drvdata(spi, indio_dev);