rfkill: add the GPS radio type
authorTomas Winkler <tomas.winkler@intel.com>
Sat, 1 Aug 2009 23:36:49 +0000 (02:36 +0300)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 4 Aug 2009 20:44:23 +0000 (16:44 -0400)
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>
include/linux/rfkill.h
net/rfkill/core.c

index 10202903141adf2ac55060885349f1d60849376a..21ca51bf4dd270fd4a99bbfdfd6d8ab5678d31f7 100644 (file)
@@ -47,6 +47,7 @@ enum rfkill_type {
        RFKILL_TYPE_UWB,
        RFKILL_TYPE_WIMAX,
        RFKILL_TYPE_WWAN,
+       RFKILL_TYPE_GPS,
        NUM_RFKILL_TYPES,
 };
 
index 044de1c6af3da196797e3de112cf1fd3083153c7..dbeaf2983822e99a36377017b16e33e1fae32a03 100644 (file)
@@ -589,11 +589,13 @@ static const char *rfkill_get_type_str(enum rfkill_type type)
                return "wimax";
        case RFKILL_TYPE_WWAN:
                return "wwan";
+       case RFKILL_TYPE_GPS:
+               return "gps";
        default:
                BUG();
        }
 
-       BUILD_BUG_ON(NUM_RFKILL_TYPES != RFKILL_TYPE_WWAN + 1);
+       BUILD_BUG_ON(NUM_RFKILL_TYPES != RFKILL_TYPE_GPS + 1);
 }
 
 static ssize_t rfkill_type_show(struct device *dev,