[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <25B60CDC2F704E4E9D88FFD52780CB4C05CF05B425@SC-VEXCH1.marvell.com>
Date: Mon, 18 Apr 2011 19:45:06 -0700
From: Haojian Zhuang <hzhuang1@...vell.com>
To: Mark Brown <broonie@...nsource.wolfsonmicro.com>,
Haojian Zhuang <haojian.zhuang@...il.com>
CC: "sameo@...ux.intel.com" <sameo@...ux.intel.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"dmitry.torokhov@...il.com" <dmitry.torokhov@...il.com>,
"a.zummo@...ertech.it" <a.zummo@...ertech.it>,
"johnpol@....mipt.ru" <johnpol@....mipt.ru>,
"cbou@...l.ru" <cbou@...l.ru>,
"dwmw2@...radead.org" <dwmw2@...radead.org>,
"lrg@...mlogic.co.uk" <lrg@...mlogic.co.uk>
Subject: RE: [PATCH 14/14] regulator: 88pm8607: avoid to use constraint name
in driver
>-----Original Message-----
>From: Mark Brown [mailto:broonie@...nsource.wolfsonmicro.com]
>Sent: 2011年4月19日 12:03 AM
>To: Haojian Zhuang
>Cc: Haojian Zhuang; sameo@...ux.intel.com; linux-kernel@...r.kernel.org;
>dmitry.torokhov@...il.com; a.zummo@...ertech.it; johnpol@....mipt.ru;
>cbou@...l.ru; dwmw2@...radead.org; lrg@...mlogic.co.uk
>Subject: Re: [PATCH 14/14] regulator: 88pm8607: avoid to use constraint
>name in driver
>
>On Mon, Apr 18, 2011 at 11:38:00PM +0800, Haojian Zhuang wrote:
>> On Mon, Apr 18, 2011 at 10:30 PM, Mark Brown
>
>> > Why not just use #defines in the header? It'd be less error prone
>if
>> > nothing else.
>
>> I don't understand this. desc.name is assigned in regulator driver.
>> pdata->driver_data is assigned in platform driver. I need to use same
>> name to link them together.
>
>I assume that by "platform driver" you mean the machine driver for the
>system? What I'm saying is that instead of using a string to match it'd
>be more normal to use an enum in the driver header, that way if someone
>typos the string or something then there will be a build failure whereas
>with strings like this there will only be a runtime failure.
>
It's nearly same whatever it's string or index number. In machine driver,
it's more convenient on using string. Otherwise, I still need to create
a new integer array to store index since I transfer them into regulator data
by driver_data parameter in regulator_init_data.
>Part of the problem here is that your changelogs aren't really saying
>why you're making these changes...
Yes, the changelog is too simple.
Powered by blists - more mailing lists