From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751512AbcKGTWm (ORCPT ); Mon, 7 Nov 2016 14:22:42 -0500 Received: from ec2-52-27-115-49.us-west-2.compute.amazonaws.com ([52.27.115.49]:60901 "EHLO osg.samsung.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750862AbcKGTWk (ORCPT ); Mon, 7 Nov 2016 14:22:40 -0500 Subject: Re: [PATCHv7 08/11] i2c: match vendorless strings on the internal string length To: Kieran Bingham , Wolfram Sang , Lee Jones References: <1478522866-29620-1-git-send-email-kieran@bingham.xyz> <1478522866-29620-9-git-send-email-kieran@bingham.xyz> Cc: linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, sameo@linux.intel.com From: Javier Martinez Canillas Message-ID: <5d2b30a0-78fa-7232-8fd2-dab6ec24e504@osg.samsung.com> Date: Mon, 7 Nov 2016 16:12:09 -0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: <1478522866-29620-9-git-send-email-kieran@bingham.xyz> 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 Hello Kieran, On 11/07/2016 09:47 AM, Kieran Bingham wrote: > If a user provides a shortened string to match a device to the sysfs i2c > interface it will match on the first string that contains that string > prefix. > > for example: > echo a 0x68 > /sys/bus/i2c/devices/i2c-2/new_device > will match as3711, as3722, and ak8975 incorrectly. > > Correct this by using sysfs_streq to match the string exactly > > Signed-off-by: Kieran Bingham > Reviewed-by: Javier Martinez Canillas Best regards, -- Javier Martinez Canillas Open Source Group Samsung Research America