From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752677AbcEKTAf (ORCPT ); Wed, 11 May 2016 15:00:35 -0400 Received: from mail-pa0-f65.google.com ([209.85.220.65]:33697 "EHLO mail-pa0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752412AbcEKTAd (ORCPT ); Wed, 11 May 2016 15:00:33 -0400 Date: Wed, 11 May 2016 11:04:50 -0700 From: Olof Johansson To: Clinton Sprain Cc: gwendal@chromium.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] platform/chrome: cros_ec_lightbar - use name instead of ID to hide lightbar attributes Message-ID: <20160511180450.GD21847@localhost> References: <1457498184-4170-1-git-send-email-clintonsprain@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1457498184-4170-1-git-send-email-clintonsprain@gmail.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 08, 2016 at 10:36:24PM -0600, Clinton Sprain wrote: > Lightbar attributes are hidden if the ID of the device is not 0 > (the assumption being that 0 = cros_ec = might have a lightbar, > 1 = cros_pd = hide); however, sometimes these devices get IDs 1 > and 2 (or something else) instead of IDs 0 and 1. This prevents > the lightbar attributes from appearing when they should. > > Proposed change is to instead check whether the name assigned to > the device is CROS_EC_DEV_NAME (true for cros_ec, false for cros_pd). > > Signed-off-by: Clinton Sprain Hm. I wonder why we need to check at all, given that the lightbar version check is just going to fail later anyway. Either way, applied with some manual fixups due to surrounding changes. Apologies for the long delay here. -Olof