diff options
author | Marcin Ciupak <marcin.s.ciupak@gmail.com> | 2017-12-08 15:31:28 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-12-08 16:36:35 +0100 |
commit | 1c12da3576ce2a37dd59a5648b7c41656d06ae47 (patch) | |
tree | 653eb711393f9456825c1244cc77cc67b6c54223 | |
parent | 8b26315ec780a7e4791222420c31cbc3c1125700 (diff) |
staging: pi433: Fix missing 'undefined' value in enum modulation
It is possible that rf69_get_modulation() function will return
'undefined' value and this value is missing in enum modulation. Fix this
by adding appropriate entry in enum modulation.
Signed-off-by: Marcin Ciupak <marcin.s.ciupak@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/pi433/rf69.c | 2 | ||||
-rw-r--r-- | drivers/staging/pi433/rf69_enum.h | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/drivers/staging/pi433/rf69.c b/drivers/staging/pi433/rf69.c index 70827034f5d0..1ae23764b911 100644 --- a/drivers/staging/pi433/rf69.c +++ b/drivers/staging/pi433/rf69.c @@ -117,7 +117,7 @@ enum modulation rf69_get_modulation(struct spi_device *spi) switch (currentValue & MASK_DATAMODUL_MODULATION_TYPE >> 3) { // TODO improvement: change 3 to define case DATAMODUL_MODULATION_TYPE_OOK: return OOK; case DATAMODUL_MODULATION_TYPE_FSK: return FSK; - default: return undefined; + default: return UNDEF; } } diff --git a/drivers/staging/pi433/rf69_enum.h b/drivers/staging/pi433/rf69_enum.h index 4e64e38ae4ff..ec91f329d871 100644 --- a/drivers/staging/pi433/rf69_enum.h +++ b/drivers/staging/pi433/rf69_enum.h @@ -28,7 +28,8 @@ enum mode { enum modulation { OOK, - FSK + FSK, + UNDEF }; enum mod_shaping { |