From patchwork Tue Oct 16 03:27:09 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kelly X-Patchwork-Id: 10643071 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 D814E1057 for ; Tue, 16 Oct 2018 03:27:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BDCDA29B97 for ; Tue, 16 Oct 2018 03:27:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B194D29BC2; Tue, 16 Oct 2018 03:27:23 +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,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 30D5729B97 for ; Tue, 16 Oct 2018 03:27:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726955AbeJPLPg (ORCPT ); Tue, 16 Oct 2018 07:15:36 -0400 Received: from mail-pf1-f194.google.com ([209.85.210.194]:39336 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726934AbeJPLPg (ORCPT ); Tue, 16 Oct 2018 07:15:36 -0400 Received: by mail-pf1-f194.google.com with SMTP id c25-v6so10708668pfe.6 for ; Mon, 15 Oct 2018 20:27:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=martingkelly-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=jE8tNA8DOjndptxDBqj+LN71XTCaJPpbUBWcStxwd6I=; b=f+sRcTBG53t9T6dRt8MZyYVFuaYrofxcc5IKpIdUW5iFqvvRZ/YKxSQBcokRqRy1RG xNhs62XaJ7vnvVWd84Vf74RVzN/BeNDNnvDd42BmyvF+z9NkStrAYBw1eswD3erfQDuA n0lBIpkQMOokpkat6JW17XuI1AJifrg8IVr9amMqk/3VEaRi65oIoUfgc5Mi5TFt6NYS b/g1Q1Us8lM0E0JIsx2Cn+g1/acJbywkkK+86rzQQD7ziAvBm8lv7B5MfWWpla9iY2Q1 iIathOSOV7W9sMVYtO+Cppwy7L4PeFOKmpz5ZSGWKTKSGV+bbqln3rLbsyNbur6E7doe PSng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=jE8tNA8DOjndptxDBqj+LN71XTCaJPpbUBWcStxwd6I=; b=hXqOMFnRTzw7s/4r1yIxBe9GlliN8/hzq4LKF6VG6MlwnkaHCccTlc/Mqcc+KGnSgx jPCFo4rXz10QrDB3Hgy7tnIVVBoJ5+LTLZksq5G3aZCBYvMRNfT2bK6wp3ntIxnz1N3N 8/60DJUR4Xsgfft6fAOpQsxCcoTTiKF8pj9F2ydZlRCjnVJGRuMUSnaKTewU0yNo5quv d4wjoCGXmnqLOfRkHKdMFSXpNew9TASM2x9Ip8hPTvUwtR4Ex1NjrDDt7AojdfGA3tQG 5p2F/vbaJX6pxtrmU9XF/Tv9Z/fmIjycAvhpWEpwE9EotiClz7Z8G/VSiBhRo2kEc4K8 zL7Q== X-Gm-Message-State: ABuFfohrm2PpfmUZZ+hV/5N7oBw4iKx9wg+lo0i6r4/e7Geq06bvihHa VfQDuQQnJjlW+p5ssKVDMubwnwmxzk0= X-Google-Smtp-Source: ACcGV61pbxvzi9yOxFhmxIaUCZPu46D+XJ1LJQxLl2/XWSk4pTLzdO+QLfSNdtLEgTnG6jAnRg/9ow== X-Received: by 2002:a63:82c6:: with SMTP id w189-v6mr18399525pgd.211.1539660441414; Mon, 15 Oct 2018 20:27:21 -0700 (PDT) Received: from cascade.Home (71-212-17-184.tukw.qwest.net. [71.212.17.184]) by smtp.gmail.com with ESMTPSA id x186-v6sm8727754pfb.125.2018.10.15.20.27.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 15 Oct 2018 20:27:20 -0700 (PDT) From: Martin Kelly X-Google-Original-From: Martin Kelly , Lars-Peter Clausen , Peter Meerwald-Stadler , Martin Kelly Subject: [PATCH v2] iio: st_sensors: miscellaneous cleanup Date: Mon, 15 Oct 2018 20:27:09 -0700 Message-Id: <20181016032709.3745-1-martin@martingkelly.com> X-Mailer: git-send-email 2.11.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 From: Martin Kelly Miscellaneous cleanup to fix minor consistency, grammar, and spelling issues. Signed-off-by: Martin Kelly --- v2: - Explicit return, eliminating goto st_sensors_match_odr_error. drivers/iio/common/st_sensors/st_sensors_core.c | 3 +-- drivers/iio/common/st_sensors/st_sensors_trigger.c | 4 ++-- drivers/iio/magnetometer/st_magn_core.c | 6 +++--- 3 files changed, 6 insertions(+), 7 deletions(-) -- 2.11.0 diff --git a/drivers/iio/common/st_sensors/st_sensors_core.c b/drivers/iio/common/st_sensors/st_sensors_core.c index 26fbd1bd9413..e50c975250e9 100644 --- a/drivers/iio/common/st_sensors/st_sensors_core.c +++ b/drivers/iio/common/st_sensors/st_sensors_core.c @@ -133,7 +133,7 @@ static int st_sensors_match_fs(struct st_sensor_settings *sensor_settings, for (i = 0; i < ST_SENSORS_FULLSCALE_AVL_MAX; i++) { if (sensor_settings->fs.fs_avl[i].num == 0) - goto st_sensors_match_odr_error; + return ret; if (sensor_settings->fs.fs_avl[i].num == fs) { *index_fs_avl = i; @@ -142,7 +142,6 @@ static int st_sensors_match_fs(struct st_sensor_settings *sensor_settings, } } -st_sensors_match_odr_error: return ret; } diff --git a/drivers/iio/common/st_sensors/st_sensors_trigger.c b/drivers/iio/common/st_sensors/st_sensors_trigger.c index fdcc5a891958..224596b0e189 100644 --- a/drivers/iio/common/st_sensors/st_sensors_trigger.c +++ b/drivers/iio/common/st_sensors/st_sensors_trigger.c @@ -104,7 +104,7 @@ static irqreturn_t st_sensors_irq_thread(int irq, void *p) return IRQ_HANDLED; /* - * If we are using egde IRQs, new samples arrived while processing + * If we are using edge IRQs, new samples arrived while processing * the IRQ and those may be missed unless we pick them here, so poll * again. If the sensor delivery frequency is very high, this thread * turns into a polled loop handler. @@ -148,7 +148,7 @@ int st_sensors_allocate_trigger(struct iio_dev *indio_dev, if (!sdata->sensor_settings->drdy_irq.addr_ihl) { dev_err(&indio_dev->dev, "falling/low specified for IRQ " - "but hardware only support rising/high: " + "but hardware supports only rising/high: " "will request rising/high\n"); if (irq_trig == IRQF_TRIGGER_FALLING) irq_trig = IRQF_TRIGGER_RISING; diff --git a/drivers/iio/magnetometer/st_magn_core.c b/drivers/iio/magnetometer/st_magn_core.c index 72f6d1335a04..880c11c7f1cb 100644 --- a/drivers/iio/magnetometer/st_magn_core.c +++ b/drivers/iio/magnetometer/st_magn_core.c @@ -29,9 +29,9 @@ #define ST_MAGN_NUMBER_DATA_CHANNELS 3 /* DEFAULT VALUE FOR SENSORS */ -#define ST_MAGN_DEFAULT_OUT_X_H_ADDR 0X03 -#define ST_MAGN_DEFAULT_OUT_Y_H_ADDR 0X07 -#define ST_MAGN_DEFAULT_OUT_Z_H_ADDR 0X05 +#define ST_MAGN_DEFAULT_OUT_X_H_ADDR 0x03 +#define ST_MAGN_DEFAULT_OUT_Y_H_ADDR 0x07 +#define ST_MAGN_DEFAULT_OUT_Z_H_ADDR 0x05 /* FULLSCALE */ #define ST_MAGN_FS_AVL_1300MG 1300