Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753518AbcD0Q6d (ORCPT ); Wed, 27 Apr 2016 12:58:33 -0400 Received: from mga04.intel.com ([192.55.52.120]:29281 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753479AbcD0Q63 (ORCPT ); Wed, 27 Apr 2016 12:58:29 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,542,1455004800"; d="scan'208";a="967764329" Subject: Re: [PATCH] iio: tmp006: Set correct iio name To: Daniel Baluta , Yong Li , Lars-Peter Clausen References: <1461296584-11918-1-git-send-email-sdliyong@gmail.com> <43150fbd-37ac-2d51-dd87-f41670417b96@kernel.org> <571E854A.90404@gmail.com> <7621197a-95ed-239e-8baa-83014bc27a26@kernel.org> <571F49B0.4060407@metafoo.de> <571F588D.3010800@metafoo.de> Cc: Jonathan Cameron , Hartmut Knaack , Peter Meerwald-Stadler , =?UTF-8?Q?Krzysztof_Koz=c5=82owski?= , Matt Ranostaj , "linux-iio@vger.kernel.org" , Linux Kernel Mailing List From: Crestez Dan Leonard Message-ID: <5720EFAA.3040407@intel.com> Date: Wed, 27 Apr 2016 19:58:18 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 799 Lines: 21 On 04/26/2016 06:21 PM, Daniel Baluta wrote: > On Tue, Apr 26, 2016 at 4:14 PM, Yong Li wrote: >> I am thinking if there is any application is using this incorrect >> name, the application should be fix too > > The rule is: "Don't break the userspace ABI". So, if we got this wrong > from the beginning we are stuck with this name. > > The only thing that can save the situation is to know that there is no > application relying on the name :). > But if iio_dev->name is supposed to be the "model name" then setting it to the i2c dev_name is just plain wrong, right? Correcting this could be considered a bugfix. There are also other ways to deal with this in userspace. Perhaps you could look at $(basename $(readlink /sys/bus/i2c/devices/*/driver))? -- Regards, Leonard