From patchwork Thu Feb 21 17:02:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H. Nikolaus Schaller" X-Patchwork-Id: 10824379 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 2CDE31399 for ; Thu, 21 Feb 2019 17:03:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1886831E65 for ; Thu, 21 Feb 2019 17:03:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0BDC131E2C; Thu, 21 Feb 2019 17:03:39 +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.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,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 B457031E57 for ; Thu, 21 Feb 2019 17:03:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728679AbfBURDc (ORCPT ); Thu, 21 Feb 2019 12:03:32 -0500 Received: from mo4-p04-ob.smtp.rzone.de ([85.215.255.121]:26169 "EHLO mo4-p04-ob.smtp.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728422AbfBURDG (ORCPT ); Thu, 21 Feb 2019 12:03:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1550768583; s=strato-dkim-0002; d=goldelico.com; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: X-RZG-CLASS-ID:X-RZG-AUTH:From:Subject:Sender; bh=/vKjHstlbkF/gn80TIMS2PAHdi7H6t37WZ0u54p80Q0=; b=L8ZmpFe5bw7Fyxi/zqGBSJZiSO8PsyspkPPrlDk/5NGqMHnf9l4K7mGMoz3UqdUujT YyGn6HDSUuZe+KY2WpuHWvPo8R7b+YNuR1kPh5jUhzgeNYHurRQV3Ub0xvXPGJ0vmWPk 5b43NfuJwAm/5PrSJORYgLmT2IXTIG+FGM/SpjmQdDIEsqhtSO7EFaHxHLnLYRAPNOKQ 5GCvyE/FPKEZuZVvgA+52TcfEBexdXrfdvDb7z3cji5WGwYEjglkDM0Smwz0TGgPa30s 20EC8yCASEwuKZIG/N+2+UjwYoBk/LR78mkZW9JfNYih11XYiZxGXknsyvHEp2DOcSJO vvFA== X-RZG-AUTH: ":JGIXVUS7cutRB/49FwqZ7WcJeFKiMhflhwDubTJ9o1OAA2UNf2MzNl43D1ri" X-RZG-CLASS-ID: mo00 Received: from iMac.fritz.box by smtp.strato.de (RZmta 44.9 DYNA|AUTH) with ESMTPSA id 608499v1LH33LXL (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (curve secp521r1 with 521 ECDH bits, eq. 15360 bits RSA)) (Client did not present a certificate); Thu, 21 Feb 2019 18:03:03 +0100 (CET) From: "H. Nikolaus Schaller" To: Linus Walleij , Jonathan Cameron , Rob Herring , Mark Rutland , "H. Nikolaus Schaller" , Andy Shevchenko , Charles Keepax , Song Qiang , Jean-Baptiste Maneyrol , Martin Kelly , Jonathan Marek , Brian Masney , Stephan Gerhold Cc: letux-kernel@openphoenux.org, Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 10/10] iio: ak8975: improve code readability Date: Thu, 21 Feb 2019 18:02:55 +0100 Message-Id: <8a4498a761bf63e38c16f17d437715be0399a957.1550768574.git.hns@goldelico.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: References: MIME-Version: 1.0 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 - use temporary variable in get_mount_matrix() - remove , after { } Signed-off-by: H. Nikolaus Schaller --- drivers/iio/magnetometer/ak8975.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/iio/magnetometer/ak8975.c b/drivers/iio/magnetometer/ak8975.c index db7214ac514c..43d08c089792 100644 --- a/drivers/iio/magnetometer/ak8975.c +++ b/drivers/iio/magnetometer/ak8975.c @@ -746,12 +746,14 @@ static const struct iio_mount_matrix * ak8975_get_mount_matrix(const struct iio_dev *indio_dev, const struct iio_chan_spec *chan) { - return &((struct ak8975_data *)iio_priv(indio_dev))->orientation; + struct ak8975_data *data = iio_priv(indio_dev); + + return &data->orientation; } static const struct iio_chan_spec_ext_info ak8975_ext_info[] = { IIO_MOUNT_MATRIX(IIO_SHARED_BY_DIR, ak8975_get_mount_matrix), - { }, + { } }; #define AK8975_CHANNEL(axis, index) \ @@ -792,7 +794,7 @@ static const struct acpi_device_id ak_acpi_match[] = { {"AK09911", AK09911}, {"AKM9911", AK09911}, {"AK09912", AK09912}, - { }, + { } }; MODULE_DEVICE_TABLE(acpi, ak_acpi_match); #endif