lkml.org 
[lkml]   [2022]   [Aug]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    SubjectRe: [PATCH v3 08/14] iio: bmg160_core: Simplify using devm_regulator_*get_enable()
    On Fri, Aug 19, 2022 at 10:21 PM Matti Vaittinen
    <mazziesaccount@gmail.com> wrote:
    >
    > Use devm_regulator_bulk_get_enable() instead of open coded bulk-get,
    > bulk-enable, add-action-to-disable-at-detach - pattern.

    ...

    > int bmg160_core_probe(struct device *dev, struct regmap *regmap, int irq,
    > const char *name)
    > {
    > struct bmg160_data *data;
    > struct iio_dev *indio_dev;
    > int ret;
    > + static const char * const regulators[] = {"vdd", "vddio"};

    Please, keep this following the "longest line first" rule. Note, in
    this case you even can move it out of the function, so we will see
    clearly that this is (not a hidden) global variable.

    P.S. Same applies for the rest of the similar places in your series.

    --
    With Best Regards,
    Andy Shevchenko

    \
     
     \ /
      Last update: 2022-08-20 01:32    [W:4.150 / U:0.096 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site