From patchwork Mon Dec 21 11:52:50 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Sperl X-Patchwork-Id: 7895531 Return-Path: X-Original-To: patchwork-linux-spi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id E843EBEEE5 for ; Mon, 21 Dec 2015 11:53:18 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2C9B22045B for ; Mon, 21 Dec 2015 11:53:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3A31120457 for ; Mon, 21 Dec 2015 11:53:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752044AbbLULxJ (ORCPT ); Mon, 21 Dec 2015 06:53:09 -0500 Received: from 212-186-180-163.dynamic.surfer.at ([212.186.180.163]:40071 "EHLO cgate.sperl.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751696AbbLULxI (ORCPT ); Mon, 21 Dec 2015 06:53:08 -0500 Received: from raspcm.intern.sperl.org (account martin@sperl.org [10.10.10.41] verified) by sperl.org (CommuniGate Pro SMTP 6.1.2) with ESMTPSA id 6390331; Mon, 21 Dec 2015 11:52:58 +0000 From: kernel@martin.sperl.org To: Mark Brown , linux-spi@vger.kernel.org Cc: Martin Sperl Subject: [PATCH v2 7/8] spi: loopback-test: change module parameter name to have_external_loopback Date: Mon, 21 Dec 2015 11:52:50 +0000 Message-Id: <1450698772-2379-8-git-send-email-kernel@martin.sperl.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1450698772-2379-1-git-send-email-kernel@martin.sperl.org> References: <1450698772-2379-1-git-send-email-kernel@martin.sperl.org> Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Martin Sperl Change the "loopback" module parameter to "have_external_loopback". Also change variable name "loopback" to "check_rx_buf", which better describes the meaning of the variable - have_external_loopback maps to that, as when we have an external_loopback situation, then we can check the rx_buf if it contains valid data. Signed-off-by: Martin Sperl --- drivers/spi/spi-loopback-test.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-spi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/spi/spi-loopback-test.c b/drivers/spi/spi-loopback-test.c index 930e7c2..b42d1a8 100644 --- a/drivers/spi/spi-loopback-test.c +++ b/drivers/spi/spi-loopback-test.c @@ -47,12 +47,12 @@ MODULE_PARM_DESC(dump_messages, "BIT(2) - also dump the spi_message data after processing, " "BIT(3) - also dump the spi_message data before processing"); -/* the device is jumpered for loopback - enabling some rx_buf tests */ -int loopback; -module_param(loopback, int, 0); -MODULE_PARM_DESC(loopback, - "if set enable loopback mode, where the rx_buf " \ - "is checked to match tx_buf after the spi_message " \ +/* the device is jumpered for external loopback - enabling some rx_buf tests */ +int check_rx_buf; +module_param_named(have_external_loopback, check_rx_buf, int, 0); +MODULE_PARM_DESC(have_external_loopback, + "if set enable external loopback mode, where the rx_buf " + "is checked to match tx_buf after the spi_message " "is executed"); /* run only a specific test */ @@ -455,7 +455,7 @@ static int spi_test_check_loopback_result(struct spi_device *spi, return ret; /* if we run without loopback, then return now */ - if (!loopback) + if (!check_rx_buf) return 0; /* if applicable to transfer check that rx_buf is equal to tx_buf */