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>
This commit is contained in:
Marcin Ciupak 2017-12-08 15:31:28 +00:00 committed by Greg Kroah-Hartman
parent 8b26315ec7
commit 1c12da3576
2 changed files with 3 additions and 2 deletions

View File

@ -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;
}
}

View File

@ -28,7 +28,8 @@ enum mode {
enum modulation {
OOK,
FSK
FSK,
UNDEF
};
enum mod_shaping {