aboutsummaryrefslogtreecommitdiffstats
path: root/net/rfkill/core.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/rfkill/core.c')
-rw-r--r--net/rfkill/core.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/net/rfkill/core.c b/net/rfkill/core.c
index a001f7c1f711..a9fa86f65983 100644
--- a/net/rfkill/core.c
+++ b/net/rfkill/core.c
@@ -33,6 +33,7 @@
33#include <linux/wait.h> 33#include <linux/wait.h>
34#include <linux/poll.h> 34#include <linux/poll.h>
35#include <linux/fs.h> 35#include <linux/fs.h>
36#include <linux/slab.h>
36 37
37#include "rfkill.h" 38#include "rfkill.h"
38 39
@@ -579,6 +580,8 @@ static ssize_t rfkill_name_show(struct device *dev,
579 580
580static const char *rfkill_get_type_str(enum rfkill_type type) 581static const char *rfkill_get_type_str(enum rfkill_type type)
581{ 582{
583 BUILD_BUG_ON(NUM_RFKILL_TYPES != RFKILL_TYPE_FM + 1);
584
582 switch (type) { 585 switch (type) {
583 case RFKILL_TYPE_WLAN: 586 case RFKILL_TYPE_WLAN:
584 return "wlan"; 587 return "wlan";
@@ -592,11 +595,11 @@ static const char *rfkill_get_type_str(enum rfkill_type type)
592 return "wwan"; 595 return "wwan";
593 case RFKILL_TYPE_GPS: 596 case RFKILL_TYPE_GPS:
594 return "gps"; 597 return "gps";
598 case RFKILL_TYPE_FM:
599 return "fm";
595 default: 600 default:
596 BUG(); 601 BUG();
597 } 602 }
598
599 BUILD_BUG_ON(NUM_RFKILL_TYPES != RFKILL_TYPE_GPS + 1);
600} 603}
601 604
602static ssize_t rfkill_type_show(struct device *dev, 605static ssize_t rfkill_type_show(struct device *dev,