diff mbox

[0/1] Adding radio type FM

Message ID 4fb5db50911121925t1a6770ddtbd5f01477470046d@mail.gmail.com (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Janakiram Sistla Nov. 13, 2009, 3:25 a.m. UTC
None
diff mbox

Patch

diff --git a/include/linux/input.h b/include/linux/input.h
index 0ccfc30..f03ae90 100644
--- a/include/linux/input.h
+++ b/include/linux/input.h
@@ -376,6 +376,7 @@  struct input_absinfo {
 #define KEY_DISPLAY_OFF		245	/* display device to off state */

 #define KEY_WIMAX		246
+#define KEY_FM			247

 /* Range 248 - 255 is reserved for special needs of AT keyboard driver */

diff --git a/include/linux/rfkill.h b/include/linux/rfkill.h
index 3392c59..03f5598 100644
--- a/include/linux/rfkill.h
+++ b/include/linux/rfkill.h
@@ -45,6 +45,7 @@  enum rfkill_type {
 	RFKILL_TYPE_WIMAX,
 	RFKILL_TYPE_WWAN,
 	RFKILL_TYPE_GPS,
+	RFKILL_TYPE_FM,
 	NUM_RFKILL_TYPES,
 };

diff --git a/net/rfkill/core.c b/net/rfkill/core.c
index ba2efb9..b8ac206 100644
--- a/net/rfkill/core.c
+++ b/net/rfkill/core.c
@@ -592,6 +592,8 @@  static const char *rfkill_get_type_str(enum
rfkill_type type)
 		return "wwan";
 	case RFKILL_TYPE_GPS:
 		return "gps";
+	case RRFKILL_TYPE_FM:
+		return "fm";
 	default:
 		BUG();
 	}
diff --git a/net/rfkill/input.c b/net/rfkill/input.c
index a7295ad..f51b16d 100644
--- a/net/rfkill/input.c
+++ b/net/rfkill/input.c
@@ -212,6 +212,9 @@  static void rfkill_event(struct input_handle
*handle, unsigned int type,
 		case KEY_WIMAX:
 			rfkill_schedule_toggle(RFKILL_TYPE_WIMAX);
 			break;
+		case KEY_FM:
+			rfkill_schedule_toggle(RFKILL_TYPE_FM);
+			break;
 		}
 	} else if (type == EV_SW && code == SW_RFKILL_ALL)