[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-id: <20170123021924epcms1p86578a78189221928e48ede3e26ecce38@epcms1p8>
Date: Mon, 23 Jan 2017 02:19:24 +0000
From: MyungJoo Ham <myungjoo.ham@...sung.com>
To: Chanwoo Choi <cw00.choi@...sung.com>,
"linux-pm@...r.kernel.org" <linux-pm@...r.kernel.org>
Cc: Kyungmin Park <kyungmin.park@...sung.com>,
"rjw@...ysocki.net" <rjw@...ysocki.net>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH v3 4/4] PM / devfreq: Modify the device name as devfreq[X]
for sysfs
> if (!dev || !profile || !governor_name) {
> @@ -568,7 +569,8 @@ struct devfreq *devfreq_add_device(struct device *dev,
> mutex_lock(&devfreq->lock);
> }
>
> - dev_set_name(&devfreq->dev, "%s", dev_name(dev));
> + dev_set_name(&devfreq->dev, "devfreq%lu",
> + (unsigned long)atomic_inc_return(&devfreq_no));
Do you have any specific reason to use "unsigned long" here?
(atomic_t has 32bit int).
> err = device_register(&devfreq->dev);
> if (err) {
> mutex_unlock(&devfreq->lock);
> --
> 1.9.1
Powered by blists - more mailing lists