From patchwork Tue Dec 22 18:03:27 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Sperl X-Patchwork-Id: 7906251 Return-Path: X-Original-To: patchwork-linux-spi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 4F0859F349 for ; Tue, 22 Dec 2015 18:03:51 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7B5752054D for ; Tue, 22 Dec 2015 18:03:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9C8292053D for ; Tue, 22 Dec 2015 18:03:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755009AbbLVSDp (ORCPT ); Tue, 22 Dec 2015 13:03:45 -0500 Received: from 212-186-180-163.dynamic.surfer.at ([212.186.180.163]:40208 "EHLO cgate.sperl.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754622AbbLVSDo (ORCPT ); Tue, 22 Dec 2015 13:03:44 -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 6390441; Tue, 22 Dec 2015 18:03:35 +0000 From: kernel@martin.sperl.org To: Mark Brown , linux-spi@vger.kernel.org Cc: Martin Sperl Subject: [PATCH v3 7/8] spi: loopback-test: change module parameter name to have_external_loopback Date: Tue, 22 Dec 2015 18:03:27 +0000 Message-Id: <1450807408-2422-8-git-send-email-kernel@martin.sperl.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1450807408-2422-1-git-send-email-kernel@martin.sperl.org> References: <1450807408-2422-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". 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 312754f..001f463 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 */