lkml.org 
[lkml]   [2014]   [Sep]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH RFC 2/3] ARM: regulator: add Freescale MXS regulator driver
    Hi Mark,

    Am 10.09.2014 17:13, schrieb Mark Brown:
    > On Wed, Sep 10, 2014 at 03:18:53PM +0100, Mark Rutland wrote:
    >> On Tue, Sep 09, 2014 at 08:17:17PM +0100, Stefan Wahren wrote:
    >
    > Ugh, this looks like it might be a regulator driver but since the
    > subject line was "ARM: " I deleted it unread - if your changelog looks
    > different to all the other changelogs in the subsystem it probably needs
    > changing.

    sorry about the confusion, i will remove ARM in the next version.

    Changelog? I didn't send a changelog because it was my first version.

    Should i resend this version only to you?

    >
    >>>>> + sreg = devm_kzalloc(dev, sizeof(*sreg), GFP_KERNEL);
    >>>>> + if (!sreg)
    >>>>> + return -ENOMEM;
    >>>>> + sreg->initdata = initdata;
    >>>>> + sreg->name = of_get_property(np, "regulator-name", NULL);
    >
    >>>> I'm not keen on using of_get_property here. We have no idea if
    >>>> regulator-name is even a string (it should be, but we have no
    >>>> guarantee).
    >
    >>> Better using of_property_read_string?
    >
    >> Yes. That will check the value is NUL-terminated, at least.
    >
    > Or just remove the property entirely... without having seen the
    > bindings if we're specifying the name of the device via the device tree
    > something seems wrong.
    >

    BR Stefan


    \
     
     \ /
      Last update: 2014-09-10 19:41    [W:2.273 / U:1.528 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site