From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757436AbdELITZ (ORCPT ); Fri, 12 May 2017 04:19:25 -0400 Received: from mail-wr0-f172.google.com ([209.85.128.172]:34735 "EHLO mail-wr0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750713AbdELITT (ORCPT ); Fri, 12 May 2017 04:19:19 -0400 Subject: Re: [PATCH] pinctrl: when claiming hog, skip maps not served by same device To: Tony Lindgren References: <20170511200211.20985-1-nikita.yoush@cogentembedded.com> <20170511214444.GB3489@atomide.com> Cc: Linus Walleij , Andy Shevchenko , Jon Hunter , Masahiro Yamada , Bjorn Andersson , Mika Westerberg , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, Chris Healy , Jeff.White@zii.aero From: Nikita Yushchenko Message-ID: Date: Fri, 12 May 2017 11:19:16 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <20170511214444.GB3489@atomide.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >> + /* >> + * If pctldev is not null, we are claiming hog for it, >> + * that means, setting that is served by pctldev by itself. >> + * >> + * Thus we must skip map that is for this device but is served >> + * by other device. >> + */ >> + if (pctldev && >> + strcmp(dev_name(pctldev->dev), map->ctrl_dev_name)) >> + continue; >> >> ret = add_setting(p, pctldev, map); >> /* >> -- > > Maybe add a comment saying pctldev is NULL in the regular case > and only exists in the hog case? Isn't comment above saying exactly that?