lkml.org 
[lkml]   [2011]   [Apr]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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.

Part of the problem here is that your changelogs aren't really saying
why you're making these changes...
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2011-04-18 18:05    [W:0.113 / U:0.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site