[lkml]   [2011]   [Apr]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRE: [PATCH 14/14] regulator: 88pm8607: avoid to use constraint name in driver

    >-----Original Message-----
    >From: Mark Brown []
    >Sent: 2011年4月19日 4:13 PM
    >To: Haojian Zhuang
    >Cc: Haojian Zhuang;;;
    >Subject: Re: [PATCH 14/14] regulator: 88pm8607: avoid to use constraint
    >name in driver
    >On Mon, Apr 18, 2011 at 07:45:06PM -0700, Haojian Zhuang wrote:
    >> >I assume that by "platform driver" you mean the machine driver for
    >> >system? What I'm saying is that instead of using a string to match
    >> >be more normal to use an enum in the driver header, that way if
    >> >typos the string or something then there will be a build failure
    >> >with strings like this there will only be a runtime failure.
    >> It's nearly same whatever it's string or index number. In machine
    >> it's more convenient on using string. Otherwise, I still need to
    >You're saying it's more convenient but you're not saying why. I'd say
    >that the lack of build time checking I mentioned is actually unhelpful.
    >> a new integer array to store index since I transfer them into
    >regulator data
    >> by driver_data parameter in regulator_init_data.
    >You already need to add a char * to store the name, adding an enum
    >instead isn't a substantial difference...

    OK. So I just need to switch to ID instead of name on these two patches.
    Is it right?
     \ /
      Last update: 2011-04-19 13:39    [W:0.024 / U:0.304 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site