From patchwork Sat Aug 1 23:36:49 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Winkler, Tomas" X-Patchwork-Id: 38697 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n71NarZc018265 for ; Sat, 1 Aug 2009 23:36:54 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751058AbZHAXgv (ORCPT ); Sat, 1 Aug 2009 19:36:51 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751095AbZHAXgv (ORCPT ); Sat, 1 Aug 2009 19:36:51 -0400 Received: from mga01.intel.com ([192.55.52.88]:37087 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750933AbZHAXgv (ORCPT ); Sat, 1 Aug 2009 19:36:51 -0400 Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP; 01 Aug 2009 16:35:25 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.43,307,1246863600"; d="scan'208";a="479923183" Received: from jrlmcp01.jer.intel.com (HELO localhost.localdomain) ([10.12.85.15]) by fmsmga002.fm.intel.com with ESMTP; 01 Aug 2009 16:29:53 -0700 From: Tomas Winkler To: linville@tuxdriver.com, johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Tomas Winkler Subject: [PATCH 1/1] rfkill: add the GPS radio type Date: Sun, 2 Aug 2009 02:36:49 +0300 Message-Id: <1249169809-11853-1-git-send-email-tomas.winkler@intel.com> X-Mailer: git-send-email 1.6.0.6 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org 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 Acked-by: Marcel Holtmann --- include/linux/rfkill.h | 1 + net/rfkill/core.c | 4 +++- 2 files changed, 4 insertions(+), 1 deletions(-) diff --git a/include/linux/rfkill.h b/include/linux/rfkill.h index 1020290..21ca51b 100644 --- a/include/linux/rfkill.h +++ b/include/linux/rfkill.h @@ -47,6 +47,7 @@ enum rfkill_type { RFKILL_TYPE_UWB, RFKILL_TYPE_WIMAX, RFKILL_TYPE_WWAN, + RFKILL_TYPE_GPS, NUM_RFKILL_TYPES, }; diff --git a/net/rfkill/core.c b/net/rfkill/core.c index 044de1c..dbeaf29 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) 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,