diff options
Diffstat (limited to 'net/rfkill/core.c')
| -rw-r--r-- | net/rfkill/core.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/net/rfkill/core.c b/net/rfkill/core.c index ba2efb960c60..c218e07e5caf 100644 --- a/net/rfkill/core.c +++ b/net/rfkill/core.c | |||
| @@ -579,6 +579,8 @@ static ssize_t rfkill_name_show(struct device *dev, | |||
| 579 | 579 | ||
| 580 | static const char *rfkill_get_type_str(enum rfkill_type type) | 580 | static const char *rfkill_get_type_str(enum rfkill_type type) |
| 581 | { | 581 | { |
| 582 | BUILD_BUG_ON(NUM_RFKILL_TYPES != RFKILL_TYPE_FM + 1); | ||
| 583 | |||
| 582 | switch (type) { | 584 | switch (type) { |
| 583 | case RFKILL_TYPE_WLAN: | 585 | case RFKILL_TYPE_WLAN: |
| 584 | return "wlan"; | 586 | return "wlan"; |
| @@ -592,11 +594,11 @@ static const char *rfkill_get_type_str(enum rfkill_type type) | |||
| 592 | return "wwan"; | 594 | return "wwan"; |
| 593 | case RFKILL_TYPE_GPS: | 595 | case RFKILL_TYPE_GPS: |
| 594 | return "gps"; | 596 | return "gps"; |
| 597 | case RFKILL_TYPE_FM: | ||
| 598 | return "fm"; | ||
| 595 | default: | 599 | default: |
| 596 | BUG(); | 600 | BUG(); |
| 597 | } | 601 | } |
| 598 | |||
| 599 | BUILD_BUG_ON(NUM_RFKILL_TYPES != RFKILL_TYPE_GPS + 1); | ||
| 600 | } | 602 | } |
| 601 | 603 | ||
| 602 | static ssize_t rfkill_type_show(struct device *dev, | 604 | static ssize_t rfkill_type_show(struct device *dev, |
| @@ -1189,6 +1191,7 @@ static long rfkill_fop_ioctl(struct file *file, unsigned int cmd, | |||
| 1189 | #endif | 1191 | #endif |
| 1190 | 1192 | ||
| 1191 | static const struct file_operations rfkill_fops = { | 1193 | static const struct file_operations rfkill_fops = { |
| 1194 | .owner = THIS_MODULE, | ||
| 1192 | .open = rfkill_fop_open, | 1195 | .open = rfkill_fop_open, |
| 1193 | .read = rfkill_fop_read, | 1196 | .read = rfkill_fop_read, |
| 1194 | .write = rfkill_fop_write, | 1197 | .write = rfkill_fop_write, |
