[PATCH] dell-laptop: Enable rfkill on Inspiron 3437

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Create a rfkill whitelist for the specific models.
Add Inspiron 3437 to rfkill whitelist.

Signed-off-by: Edward Lin <yidi.lin@xxxxxxxxxxxxx>
---
 drivers/platform/x86/dell-laptop.c |   13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/drivers/platform/x86/dell-laptop.c b/drivers/platform/x86/dell-laptop.c
index fed4111..4ead97e 100644
--- a/drivers/platform/x86/dell-laptop.c
+++ b/drivers/platform/x86/dell-laptop.c
@@ -271,6 +271,17 @@ static struct dmi_system_id dell_quirks[] = {
 	{ }
 };
 
+static struct dmi_system_id dell_rfkill_whitelist[] = {
+	{
+		.ident = "Dell Inspiron 3437",
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
+			DMI_MATCH(DMI_PRODUCT_NAME, "Inspiron 3437"),
+		},
+	},
+	{}
+};
+
 static struct calling_interface_buffer *buffer;
 static struct page *bufferpage;
 static DEFINE_MUTEX(buffer_mutex);
@@ -597,7 +608,7 @@ static int __init dell_setup_rfkill(void)
 	if (product &&  (strncmp(product, "Latitude", 8) == 0 ||
 			 strncmp(product, "Precision", 9) == 0))
 		whitelisted = 1;
-	if (!force_rfkill && !whitelisted)
+	if (!force_rfkill && !whitelisted && !dmi_check_system(dell_rfkill_whitelist))
 		return 0;
 
 	get_buffer();
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe platform-driver-x86" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux