Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752591AbdLCPRs (ORCPT ); Sun, 3 Dec 2017 10:17:48 -0500 Received: from mail-lf0-f67.google.com ([209.85.215.67]:34729 "EHLO mail-lf0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752472AbdLCPRh (ORCPT ); Sun, 3 Dec 2017 10:17:37 -0500 X-Google-Smtp-Source: AGs4zMbB1umfrKBEf5/+aY2JnRl+4+zaywtRZNP5Qs5d/oNeh4jrPd7ADQOTus65SJb26SLKNfJDRQ== From: =?UTF-8?q?Simon=20Sandstr=C3=B6m?= To: gregkh@linuxfoundation.org Cc: linux@Wolf-Entwicklungen.de, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCH 5/6] staging: pi433: Rename enum dataMode in rf69_enum.h Date: Sun, 3 Dec 2017 16:17:25 +0100 Message-Id: <20171203151726.16639-6-simon@nikanor.nu> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20171203151726.16639-1-simon@nikanor.nu> References: <20171203151726.16639-1-simon@nikanor.nu> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3620 Lines: 85 Renames enum dataMode and its values packet, continuous, continuousNoSync to enum data_mode and PACKET, CONTINUOUS, CONTINUOUS_NO_SYNC. Fixes checkpatch.pl warnings: "Avoid CamelCase: , ". Signed-off-by: Simon Sandström --- drivers/staging/pi433/pi433_if.c | 2 +- drivers/staging/pi433/rf69.c | 10 +++++----- drivers/staging/pi433/rf69.h | 2 +- drivers/staging/pi433/rf69_enum.h | 8 ++++---- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/staging/pi433/pi433_if.c b/drivers/staging/pi433/pi433_if.c index 4f6830f369e9..e7a730d312c5 100644 --- a/drivers/staging/pi433/pi433_if.c +++ b/drivers/staging/pi433/pi433_if.c @@ -1090,7 +1090,7 @@ static int pi433_probe(struct spi_device *spi) /* setup the radio module */ SET_CHECKED(rf69_set_mode (spi, standby)); - SET_CHECKED(rf69_set_data_mode (spi, packet)); + SET_CHECKED(rf69_set_data_mode (spi, PACKET)); SET_CHECKED(rf69_set_amplifier_0 (spi, OPTION_ON)); SET_CHECKED(rf69_set_amplifier_1 (spi, OPTION_OFF)); SET_CHECKED(rf69_set_amplifier_2 (spi, OPTION_OFF)); diff --git a/drivers/staging/pi433/rf69.c b/drivers/staging/pi433/rf69.c index ebb3ddd1a957..cf833ac23c06 100644 --- a/drivers/staging/pi433/rf69.c +++ b/drivers/staging/pi433/rf69.c @@ -61,16 +61,16 @@ int rf69_set_mode(struct spi_device *spi, enum mode mode) } -int rf69_set_data_mode(struct spi_device *spi, enum dataMode dataMode) +int rf69_set_data_mode(struct spi_device *spi, enum data_mode data_mode) { #ifdef DEBUG dev_dbg(&spi->dev, "set: data mode"); #endif - switch (dataMode) { - case packet: return WRITE_REG(REG_DATAMODUL, (READ_REG(REG_DATAMODUL) & ~MASK_DATAMODUL_MODE) | DATAMODUL_MODE_PACKET); - case continuous: return WRITE_REG(REG_DATAMODUL, (READ_REG(REG_DATAMODUL) & ~MASK_DATAMODUL_MODE) | DATAMODUL_MODE_CONTINUOUS); - case continuousNoSync: return WRITE_REG(REG_DATAMODUL, (READ_REG(REG_DATAMODUL) & ~MASK_DATAMODUL_MODE) | DATAMODUL_MODE_CONTINUOUS_NOSYNC); + switch (data_mode) { + case PACKET: return WRITE_REG(REG_DATAMODUL, (READ_REG(REG_DATAMODUL) & ~MASK_DATAMODUL_MODE) | DATAMODUL_MODE_PACKET); + case CONTINUOUS: return WRITE_REG(REG_DATAMODUL, (READ_REG(REG_DATAMODUL) & ~MASK_DATAMODUL_MODE) | DATAMODUL_MODE_CONTINUOUS); + case CONTINUOUS_NO_SYNC: return WRITE_REG(REG_DATAMODUL, (READ_REG(REG_DATAMODUL) & ~MASK_DATAMODUL_MODE) | DATAMODUL_MODE_CONTINUOUS_NOSYNC); default: dev_dbg(&spi->dev, "set: illegal input param"); return -EINVAL; diff --git a/drivers/staging/pi433/rf69.h b/drivers/staging/pi433/rf69.h index 12c2e106785e..090743716326 100644 --- a/drivers/staging/pi433/rf69.h +++ b/drivers/staging/pi433/rf69.h @@ -26,7 +26,7 @@ #define FIFO_THRESHOLD 15 /* in byte */ int rf69_set_mode(struct spi_device *spi, enum mode mode); -int rf69_set_data_mode(struct spi_device *spi, enum dataMode dataMode); +int rf69_set_data_mode(struct spi_device *spi, enum data_mode data_mode); int rf69_set_modulation(struct spi_device *spi, enum modulation modulation); enum modulation rf69_get_modulation(struct spi_device *spi); int rf69_set_modulation_shaping(struct spi_device *spi, enum modShaping modShaping); diff --git a/drivers/staging/pi433/rf69_enum.h b/drivers/staging/pi433/rf69_enum.h index 5247e9269de9..a55528a72f47 100644 --- a/drivers/staging/pi433/rf69_enum.h +++ b/drivers/staging/pi433/rf69_enum.h @@ -31,10 +31,10 @@ enum mode { receive }; -enum dataMode { - packet, - continuous, - continuousNoSync +enum data_mode { + PACKET, + CONTINUOUS, + CONTINUOUS_NO_SYNC, }; enum modulation { -- 2.11.0