Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp1005118ybv; Thu, 20 Feb 2020 11:15:59 -0800 (PST) X-Google-Smtp-Source: APXvYqwvectmnFpKz+w2IDZ2B0uiSM2H6zAzW+ZrLACJfKzzWSQsFXbHdp8yUTtK+rWz/zcHd+BH X-Received: by 2002:a9d:6288:: with SMTP id x8mr24108126otk.2.1582226159570; Thu, 20 Feb 2020 11:15:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582226159; cv=none; d=google.com; s=arc-20160816; b=Q+AfHzD67tdBqLjyQwRaLJkToUfvgR1zIjrJqKChe2d6Nm6DKOdLD1P1geJng/eb1s n8UNYfE0wdlKGf3mV+Rjp3PkgoI7IeqB/7c90LbXTbk8aFSQ3q1xthUsAKD2gG+XBMNF 39w1kP3XQ68jMXsya9GUMNjIRL7Zl6Uy/7zFJZPNbFwqsoVNlASvdHfgDEG6p5p0uZxb OfkVde3g8I1nTmrfQEWzMi6hlsJ7KfIhMEiRzqfhVAbscIizYPAc8DMmO87WkM+jIwcv NJxqFAUkYgApWaFtA/61TK22tP1C3mRYwczGdAUbraK3Pb5IJz6UIaAo8zX55PG2RSzF klXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=94l4ZzRi28CYphjWUZAzJ0jHZMsOtQ6q2QAqDPXPURU=; b=Ekd/e8eRY7TunUkNcVmX13r4z3Rbs/ib3dLivgH74dNAWgEza7/vIVYTz35c9IyTPW RA0lVJGdReUOKGsxswXBd4sL7CITo9Itc5gjH7DIl8YPmjW27gPlA6/Nqyodd7p549Xi 3bBJK/My4RLh/AAJoiAWtwXUnjF7xpdj/ZAW725S7l43Fu338Xgv8LozTwHU/NFda8CR T/T1B60zY7BwBi/0xqdsnI++GYE2bK3mjy/0/GBQ7084rTVv45g3/NvXBqSVTFB4/UYb PiH8Eb4uh3mKAaVqMli9lHpEzbrk8GeKJ6KYaIbtfDa4bIk0khGjoBHPXxsN4ZQmWu+7 oL7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=vamKU3a5; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i15si190006otk.120.2020.02.20.11.15.44; Thu, 20 Feb 2020 11:15:59 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=vamKU3a5; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728941AbgBTTPR (ORCPT + 99 others); Thu, 20 Feb 2020 14:15:17 -0500 Received: from mail.kernel.org ([198.145.29.99]:55488 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728111AbgBTTPQ (ORCPT ); Thu, 20 Feb 2020 14:15:16 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A82A6206E2; Thu, 20 Feb 2020 19:15:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1582226116; bh=wuYgJdYmKiQd4r+UyQmCOa68AWBzeQV+TJZRUaxsiHc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=vamKU3a5baew9BfJzvbhFHb8QbsMKNRkpgWRf7kyQ3tUHggXWr7moIvwnPJDDNIdG mQtRAN6lBR8NNjgnZ/h18FTHAEsZWh26AEH7su4F4HrK13Qf2Rt+/3dzuRQl7oTS4f GM5YLQ5ezaSdf4JarVAEGbNUi5DQq0kj0xd/c+Kg= Date: Thu, 20 Feb 2020 20:15:13 +0100 From: Greg Kroah-Hartman To: Orson Zhai Cc: MyungJoo Ham , Kyungmin Park , Chanwoo Choi , John Stultz , mingmin.ling@unisoc.com, orsonzhai@gmail.com, jingchao.ye@unisoc.com, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH] Revert "PM / devfreq: Modify the device name as devfreq(X) for sysfs" Message-ID: <20200220191513.GA3450796@kroah.com> References: <1582220224-1904-1-git-send-email-orson.unisoc@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1582220224-1904-1-git-send-email-orson.unisoc@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 21, 2020 at 01:37:04AM +0800, Orson Zhai wrote: > This reverts commit 4585fbcb5331fc910b7e553ad3efd0dd7b320d14. > > The name changing as devfreq(X) breaks some user space applications, > such as Android HAL from Unisoc and Hikey [1]. > The device name will be changed unexpectly after every boot depending > on module init sequence. It will make trouble to setup some system > configuration like selinux for Android. > > So we'd like to revert it back to old naming rule before any better > way being found. > > [1] https://lkml.org/lkml/2018/5/8/1042 > > Cc: John Stultz > Cc: Greg Kroah-Hartman > Cc: stable@vger.kernel.org > Signed-off-by: Orson Zhai > > --- > drivers/devfreq/devfreq.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c > index cceee8b..7dcf209 100644 > --- a/drivers/devfreq/devfreq.c > +++ b/drivers/devfreq/devfreq.c > @@ -738,7 +738,6 @@ struct devfreq *devfreq_add_device(struct device *dev, > { > struct devfreq *devfreq; > struct devfreq_governor *governor; > - static atomic_t devfreq_no = ATOMIC_INIT(-1); > int err = 0; > > if (!dev || !profile || !governor_name) { > @@ -800,8 +799,7 @@ struct devfreq *devfreq_add_device(struct device *dev, > devfreq->suspend_freq = dev_pm_opp_get_suspend_opp_freq(dev); > atomic_set(&devfreq->suspend_count, 0); > > - dev_set_name(&devfreq->dev, "devfreq%d", > - atomic_inc_return(&devfreq_no)); > + dev_set_name(&devfreq->dev, "%s", dev_name(dev)); > err = device_register(&devfreq->dev); > if (err) { > mutex_unlock(&devfreq->lock); > -- > 2.7.4 > Thanks for this, I agree, this needs to get back to the way things were as it seems to break too many existing systems as-is. I'll queue this up in my tree now, thanks. greg k-h