aboutsummaryrefslogtreecommitdiffstats
path: root/net/rfkill/core.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2009-12-15 04:29:06 -0500
committerTakashi Iwai <tiwai@suse.de>2009-12-15 04:29:06 -0500
commit709334c87dbdb44150ce436b3d13c814db0dcae9 (patch)
tree5861a45f70c1f283720337abd864498f5afb3dbe /net/rfkill/core.c
parent0d64b568fcd48b133721c1d322e7c51d85eb12df (diff)
parentf74890277a196949e4004fe2955e1d4fb3930f98 (diff)
Merge branch 'fixes' of git://git.alsa-project.org/alsa-kernel into for-linus
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 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
580static const char *rfkill_get_type_str(enum rfkill_type type) 580static 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
602static ssize_t rfkill_type_show(struct device *dev, 604static 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
1191static const struct file_operations rfkill_fops = { 1193static 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,