[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-id: <5885778F.7010004@samsung.com>
Date: Mon, 23 Jan 2017 12:25:03 +0900
From: Chanwoo Choi <cw00.choi@...sung.com>
To: myungjoo.ham@...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
On 2017년 01월 23일 11:19, MyungJoo Ham wrote:
>> 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).
There is no any reason. I'll change to use the integer value as following:
dev_set_name(&devfreq->dev, "devfreq%d", atomic_inc_return(&devfreq_no));
>
>> err = device_register(&devfreq->dev);
>> if (err) {
>> mutex_unlock(&devfreq->lock);
>> --
>> 1.9.1
--
Best Regards,
Chanwoo Choi
S/W R&D Center
Samsung Electronics
Powered by blists - more mailing lists