From patchwork Wed Dec 12 17:02:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Slawomir Stepien X-Patchwork-Id: 10726793 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 7F16F6C5 for ; Wed, 12 Dec 2018 17:01:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6D5812B8C6 for ; Wed, 12 Dec 2018 17:01:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6B75F2B890; Wed, 12 Dec 2018 17:01:51 +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=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,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 31C9B2B8C8 for ; Wed, 12 Dec 2018 17:01:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727756AbeLLRBt (ORCPT ); Wed, 12 Dec 2018 12:01:49 -0500 Received: from smtpo.poczta.interia.pl ([217.74.65.155]:58934 "EHLO smtpo.poczta.interia.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726879AbeLLRBt (ORCPT ); Wed, 12 Dec 2018 12:01:49 -0500 X-Interia-R: Interia X-Interia-R-IP: 188.121.17.172 X-Interia-R-Helo: Received: from localhost (unknown [188.121.17.172]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by www.poczta.fm (INTERIA.PL) with ESMTPSA; Wed, 12 Dec 2018 18:01:42 +0100 (CET) From: Slawomir Stepien To: lars@metafoo.de, Michael.Hennerich@analog.com, jic23@kernel.org, knaack.h@gmx.de, pmeerw@pmeerw.net Cc: linux-iio@vger.kernel.org, gregkh@linuxfoundation.org Subject: [PATCH v2 0/2] staging: iio: adc: ad7280a: channel and attr init refactor Date: Wed, 12 Dec 2018 18:02:26 +0100 Message-Id: <20181212170228.28498-1-sst@poczta.fm> X-Mailer: git-send-email 2.19.2 MIME-Version: 1.0 X-Interia-Antivirus: OK DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=interia.pl; s=biztos; t=1544634104; bh=zU9L/syhsmocuSGWkrDkrIhDpFyMiQck4HIXDvx3TII=; h=X-Interia-R:X-Interia-R-IP:X-Interia-R-Helo:From:To:Cc:Subject: Date:Message-Id:X-Mailer:MIME-Version:Content-Transfer-Encoding: X-Interia-Antivirus; b=R3vDK1XW6kb52ocSu4SUTc/C3CB6tbrQ6HVtlEDboORjUV0YIsqqONH52dTj0NqwP UxTwOLlq/xhUdIEW3tpn/a4obOOaCebIBCf79wllzRcWQ13MgBMgBPYPJ/PytppWXq n/j66PmWSP4M+2gHRustvdeJM6y8xDqOkM2Wlao8= 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 small series enhances the readability of the code by refactoring the ad7280_channel_init and ad7280_attr_init functions. The readability is enhanced by splitting the functions into more functions that do more specific operations. Since v1: * The patch "staging: iio: adc: ad7280a: add braces to complex for loops" has been removed. It's not needed anymore. Slawomir Stepien (2): staging: iio: adc: ad7280a: split ad7280_channel_init() to more functions staging: iio: adc: ad7280a: split ad7280_attr_init() to more functions drivers/staging/iio/adc/ad7280a.c | 243 +++++++++++++++++++----------- 1 file changed, 158 insertions(+), 85 deletions(-)