From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752126AbdASFA2 (ORCPT ); Thu, 19 Jan 2017 00:00:28 -0500 Received: from smtprelay0243.hostedemail.com ([216.40.44.243]:58497 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750926AbdASFA0 (ORCPT ); Thu, 19 Jan 2017 00:00:26 -0500 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::,RULES_HIT:41:355:379:541:599:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1515:1516:1518:1534:1539:1593:1594:1711:1714:1730:1747:1777:1792:2393:2553:2559:2562:2828:3138:3139:3140:3141:3142:3351:3622:3876:3877:4321:5007:6114:6642:10004:10400:10848:11026:11232:11658:11914:12043:12296:12740:12760:12895:13069:13255:13311:13357:13439:14659:14721:21080:30054:30069:30090: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: cake88_880a4b2d72f58 X-Filterd-Recvd-Size: 1654 Message-ID: <1484801932.18392.1.camel@perches.com> Subject: Re: [PATCH 13/33] Input: bfin_rotary - Use 'dev' instead of dereferencing it and other changes From: Joe Perches To: Guenter Roeck , Dmitry Torokhov Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Date: Wed, 18 Jan 2017 20:58:52 -0800 In-Reply-To: <20170118203517.GB6807@roeck-us.net> References: <1484761614-12225-1-git-send-email-linux@roeck-us.net> <1484761614-12225-14-git-send-email-linux@roeck-us.net> <20170118193952.GG33920@dtor-ws> <20170118203517.GB6807@roeck-us.net> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.22.3-0ubuntu0.1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2017-01-18 at 12:35 -0800, Guenter Roeck wrote: > On Wed, Jan 18, 2017 at 11:39:52AM -0800, Dmitry Torokhov wrote: > > On Wed, Jan 18, 2017 at 09:46:34AM -0800, Guenter Roeck wrote: [] > > > diff --git a/drivers/input/misc/bfin_rotary.c b/drivers/input/misc/bfin_rotary.c [] > > > @@ -141,25 +141,23 @@ static int bfin_rotary_probe(struct platform_device *pdev) > > > > > > /* Basic validation */ > > > if ((pdata->rotary_up_key && !pdata->rotary_down_key) || > > > - (!pdata->rotary_up_key && pdata->rotary_down_key)) { > > > + (!pdata->rotary_up_key && pdata->rotary_down_key)) maybe just use ^ if (!pdata->rotary_up_key ^ !pdata->rotary_down_key)