Skip to content

Commit

Permalink
rfkill: Add NFC to the list of supported radios
Browse files Browse the repository at this point in the history
And return the proper string for it.

Acked-by: Johannes Berg <[email protected]>
Acked-by: Marcel Holtmann <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
  • Loading branch information
Samuel Ortiz committed Apr 12, 2013
1 parent 60d9edd commit 44b3dec
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions include/uapi/linux/rfkill.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
* @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.
* @RFKILL_TYPE_NFC: switch is on an NFC device.
* @NUM_RFKILL_TYPES: number of defined rfkill types
*/
enum rfkill_type {
Expand All @@ -48,6 +49,7 @@ enum rfkill_type {
RFKILL_TYPE_WWAN,
RFKILL_TYPE_GPS,
RFKILL_TYPE_FM,
RFKILL_TYPE_NFC,
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 @@ -587,7 +587,7 @@ static ssize_t rfkill_name_show(struct device *dev,

static const char *rfkill_get_type_str(enum rfkill_type type)
{
BUILD_BUG_ON(NUM_RFKILL_TYPES != RFKILL_TYPE_FM + 1);
BUILD_BUG_ON(NUM_RFKILL_TYPES != RFKILL_TYPE_NFC + 1);

switch (type) {
case RFKILL_TYPE_WLAN:
Expand All @@ -604,6 +604,8 @@ static const char *rfkill_get_type_str(enum rfkill_type type)
return "gps";
case RFKILL_TYPE_FM:
return "fm";
case RFKILL_TYPE_NFC:
return "nfc";
default:
BUG();
}
Expand Down

0 comments on commit 44b3dec

Please sign in to comment.