Skip to content

Commit

Permalink
rfkill: Add constant for RFKILL_TYPE_FM radio devices
Browse files Browse the repository at this point in the history
Signed-off-by: Marcel Holtmann <[email protected]>
Signed-off-by: Janakiram Sistla <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
  • Loading branch information
holtmann authored and linvjw committed Nov 18, 2009
1 parent 0878c35 commit 875405a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions include/linux/rfkill.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
* @RFKILL_TYPE_WIMAX: switch is on a WiMAX device.
* @RFKILL_TYPE_WWAN: switch is on a wireless WAN device.
* @RFKILL_TYPE_GPS: switch is on a GPS device.
* @RFKILL_TYPE_FM: switch is on a FM radio device.
* @NUM_RFKILL_TYPES: number of defined rfkill types
*/
enum rfkill_type {
Expand All @@ -46,6 +47,7 @@ enum rfkill_type {
RFKILL_TYPE_WIMAX,
RFKILL_TYPE_WWAN,
RFKILL_TYPE_GPS,
RFKILL_TYPE_FM,
NUM_RFKILL_TYPES,
};

Expand Down
4 changes: 3 additions & 1 deletion net/rfkill/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -592,11 +592,13 @@ static const char *rfkill_get_type_str(enum rfkill_type type)
return "wwan";
case RFKILL_TYPE_GPS:
return "gps";
case RFKILL_TYPE_FM:
return "fm";
default:
BUG();
}

BUILD_BUG_ON(NUM_RFKILL_TYPES != RFKILL_TYPE_GPS + 1);
BUILD_BUG_ON(NUM_RFKILL_TYPES != RFKILL_TYPE_FM + 1);
}

static ssize_t rfkill_type_show(struct device *dev,
Expand Down

0 comments on commit 875405a

Please sign in to comment.