aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomas Winkler <tomas.winkler@intel.com>2009-08-01 19:36:49 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-08-04 16:44:23 -0400
commit3ad201496badddd8e1cda87ee6d29e8b3b8e1279 (patch)
tree2dae92ff7b85a46939ecb7d9effd2d5f36d5e8bb
parent87cdb9894b9367237f25e5a4c381eb8e594e782b (diff)
rfkill: add the GPS radio type
Althoug GPS is a technology w/o transmitting radio and thus not a primary candidate for rfkill switch, rfkill gives unified interface point for devices with wireless technology. The input key is not supplied as it is too be deprecated. Cc: johannes@sipsolutions.net Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Acked-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--include/linux/rfkill.h1
-rw-r--r--net/rfkill/core.c4
2 files changed, 4 insertions, 1 deletions
diff --git a/include/linux/rfkill.h b/include/linux/rfkill.h
index 10202903141a..21ca51bf4dd2 100644
--- a/include/linux/rfkill.h
+++ b/include/linux/rfkill.h
@@ -47,6 +47,7 @@ enum rfkill_type {
47 RFKILL_TYPE_UWB, 47 RFKILL_TYPE_UWB,
48 RFKILL_TYPE_WIMAX, 48 RFKILL_TYPE_WIMAX,
49 RFKILL_TYPE_WWAN, 49 RFKILL_TYPE_WWAN,
50 RFKILL_TYPE_GPS,
50 NUM_RFKILL_TYPES, 51 NUM_RFKILL_TYPES,
51}; 52};
52 53
diff --git a/net/rfkill/core.c b/net/rfkill/core.c
index 044de1c6af3d..dbeaf2983822 100644
--- a/net/rfkill/core.c
+++ b/net/rfkill/core.c
@@ -589,11 +589,13 @@ static const char *rfkill_get_type_str(enum rfkill_type type)
589 return "wimax"; 589 return "wimax";
590 case RFKILL_TYPE_WWAN: 590 case RFKILL_TYPE_WWAN:
591 return "wwan"; 591 return "wwan";
592 case RFKILL_TYPE_GPS:
593 return "gps";
592 default: 594 default:
593 BUG(); 595 BUG();
594 } 596 }
595 597
596 BUILD_BUG_ON(NUM_RFKILL_TYPES != RFKILL_TYPE_WWAN + 1); 598 BUILD_BUG_ON(NUM_RFKILL_TYPES != RFKILL_TYPE_GPS + 1);
597} 599}
598 600
599static ssize_t rfkill_type_show(struct device *dev, 601static ssize_t rfkill_type_show(struct device *dev,