Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S937212AbdLSO5a (ORCPT ); Tue, 19 Dec 2017 09:57:30 -0500 Received: from mail.CARNet.hr ([161.53.123.6]:53946 "EHLO mail.carnet.hr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S936706AbdLSO4g (ORCPT ); Tue, 19 Dec 2017 09:56:36 -0500 From: Valentin Vidic To: Greg Kroah-Hartman Cc: Dan Carpenter , devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, Marcin Ciupak , Marcus Wolf , =?UTF-8?q?Simon=20Sandstr=C3=B6m?= , Marcus Wolf , Valentin Vidic Date: Tue, 19 Dec 2017 15:56:23 +0100 Message-Id: <20171219145623.24023-6-Valentin.Vidic@CARNet.hr> X-Mailer: git-send-email 2.15.0 In-Reply-To: <20171219145623.24023-1-Valentin.Vidic@CARNet.hr> References: <20171219145623.24023-1-Valentin.Vidic@CARNet.hr> X-SA-Exim-Connect-IP: 161.53.12.131 Subject: [PATCH 6/6 v5] staging: pi433: remove unused function X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2151 Lines: 53 As it turns out rf69_get_lna_gain is not used at all. Signed-off-by: Valentin Vidic --- v5: resend patchset based on comments drivers/staging/pi433/rf69.c | 18 ------------------ drivers/staging/pi433/rf69.h | 1 - 2 files changed, 19 deletions(-) diff --git a/drivers/staging/pi433/rf69.c b/drivers/staging/pi433/rf69.c index d777e31688ad..f58b925bb1da 100644 --- a/drivers/staging/pi433/rf69.c +++ b/drivers/staging/pi433/rf69.c @@ -334,24 +334,6 @@ int rf69_set_lna_gain(struct spi_device *spi, enum lnaGain lnaGain) } } -enum lnaGain rf69_get_lna_gain(struct spi_device *spi) -{ - u8 currentValue; - - currentValue = rf69_read_reg(spi, REG_LNA); - - switch (currentValue & MASK_LNA_CURRENT_GAIN >> 3) { // improvement: change 3 to define - case LNA_GAIN_AUTO: return automatic; - case LNA_GAIN_MAX: return max; - case LNA_GAIN_MAX_MINUS_6: return maxMinus6; - case LNA_GAIN_MAX_MINUS_12: return maxMinus12; - case LNA_GAIN_MAX_MINUS_24: return maxMinus24; - case LNA_GAIN_MAX_MINUS_36: return maxMinus36; - case LNA_GAIN_MAX_MINUS_48: return maxMinus48; - default: return undefined; - } -} - int rf69_set_dc_cut_off_frequency_intern(struct spi_device *spi, u8 reg, enum dcc_percent dcc_percent) { switch (dcc_percent) { diff --git a/drivers/staging/pi433/rf69.h b/drivers/staging/pi433/rf69.h index 079acbd8a366..e90228a0ca29 100644 --- a/drivers/staging/pi433/rf69.h +++ b/drivers/staging/pi433/rf69.h @@ -39,7 +39,6 @@ int rf69_set_output_power_level(struct spi_device *spi, u8 powerLevel); int rf69_set_pa_ramp(struct spi_device *spi, enum paRamp paRamp); int rf69_set_antenna_impedance(struct spi_device *spi, enum antennaImpedance antennaImpedance); int rf69_set_lna_gain(struct spi_device *spi, enum lnaGain lnaGain); -enum lnaGain rf69_get_lna_gain(struct spi_device *spi); int rf69_set_dc_cut_off_frequency_intern(struct spi_device *spi, u8 reg, enum dcc_percent dcc_percent); int rf69_set_dc_cut_off_frequency(struct spi_device *spi, enum dcc_percent dcc_percent); int rf69_set_dc_cut_off_frequency_during_afc(struct spi_device *spi, enum dcc_percent dcc_percent); -- 2.15.0