From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753381AbdAZW6r (ORCPT ); Thu, 26 Jan 2017 17:58:47 -0500 Received: from smtprelay0148.hostedemail.com ([216.40.44.148]:39319 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753188AbdAZW6o (ORCPT ); Thu, 26 Jan 2017 17:58:44 -0500 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::::::,RULES_HIT:41:355:379:541:599:973:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1539:1593:1594:1711:1730:1747:1777:1792:2393:2559:2562:2828:3138:3139:3140:3141:3142:3352:3622:3865:3866:3868:3870:3874:4321:5007:10004:10400:10848:11026:11232:11658:11914:12043:12296:12740:12895:13069:13161:13229:13255:13311:13357:13439:13894:14659:14721:21060:21080:30051:30054:30080:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:1,LUA_SUMMARY:none X-HE-Tag: crow19_6c121165e484c X-Filterd-Recvd-Size: 1741 Message-ID: <1485470741.12563.104.camel@perches.com> Subject: Re: [PATCH 8/8] asus-wmi: Don't register rfkill if ASHS and user bit are present From: Joe Perches To: =?ISO-8859-1?Q?Jo=E3o?= Paulo Rechi Vita , Corentin Chary , Darren Hart Cc: platform-driver-x86@vger.kernel.org, acpi4asus-user@lists.sourceforge.net, linux-kernel@vger.kernel.org, linux@endlessm.com, =?ISO-8859-1?Q?Jo=E3o?= Paulo Rechi Vita Date: Thu, 26 Jan 2017 14:45:41 -0800 In-Reply-To: <20170126153013.12753-9-jprvita@endlessm.com> References: <20170126153013.12753-1-jprvita@endlessm.com> <20170126153013.12753-9-jprvita@endlessm.com> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.22.3-0ubuntu0.1 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2017-01-26 at 10:30 -0500, Joćo Paulo Rechi Vita wrote: > Some Asus laptops that have an airplane-mode indicator LED, also have > the WMI WLAN user bit set, and the following bits in their DSDT: style trivia: > diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c [] > @@ -2051,6 +2052,16 @@ static int asus_wmi_fan_init(struct asus_wmi *asus) > return 0; > } > > +static bool ashs_present(void) > +{ > + int i; > + > + for (i = 0; strcmp(asus_wireless_ids[i].id, ""); i++) > + if (acpi_dev_found(asus_wireless_ids[i].id)) > + return true; The for loop would commonly have braces because of the internal if.