]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
rfkill: Add NFC to the list of supported radios
authorSamuel Ortiz <sameo@linux.intel.com>
Thu, 11 Apr 2013 09:51:36 +0000 (11:51 +0200)
committerSamuel Ortiz <sameo@linux.intel.com>
Fri, 12 Apr 2013 14:54:38 +0000 (16:54 +0200)
And return the proper string for it.

Acked-by: Johannes Berg <johannes@sipsolutions.net>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
include/uapi/linux/rfkill.h
net/rfkill/core.c

index 2753c6cc97405fe44965501e4d050c5272d1db67..058757f7a7339b104f9f44ebd77569cf20f35ef6 100644 (file)
@@ -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 {
@@ -48,6 +49,7 @@ enum rfkill_type {
        RFKILL_TYPE_WWAN,
        RFKILL_TYPE_GPS,
        RFKILL_TYPE_FM,
+       RFKILL_TYPE_NFC,
        NUM_RFKILL_TYPES,
 };
 
index 9b9be5279f5dac83f53b1027f10144fe91d6bf98..1cec5e4f3a5e62ff4503d937d78d435c1761cd52 100644 (file)
@@ -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:
@@ -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();
        }