lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75VeYFY1CW4AH+D4HAgzppMZ5J8dL8kKPYmcwsXNVGNSYjQ@mail.gmail.com>
Date:   Mon, 13 Apr 2020 23:10:54 +0300
From:   Andy Shevchenko <andy.shevchenko@...il.com>
To:     Saravanan Sekar <sravanhome@...il.com>
Cc:     Lee Jones <lee.jones@...aro.org>, Rob Herring <robh+dt@...nel.org>,
        Jonathan Cameron <jic23@...nel.org>,
        Hartmut Knaack <knaack.h@....de>,
        Lars-Peter Clausen <lars@...afoo.de>,
        Peter Meerwald <pmeerw@...erw.net>,
        Sebastian Reichel <sre@...nel.org>,
        devicetree <devicetree@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        linux-iio <linux-iio@...r.kernel.org>,
        Linux PM <linux-pm@...r.kernel.org>
Subject: Re: [PATCH v8 4/6] power: supply: Add support for mps mp2629 battery charger

On Mon, Apr 13, 2020 at 8:37 PM Saravanan Sekar <sravanhome@...il.com> wrote:
>
> The mp2629 provides switching-mode battery charge management for
> single-cell Li-ion or Li-polymer battery. Driver supports the
> access/control input source and battery charging parameters.

...

> +static int mp2629_charger_probe(struct platform_device *pdev)
> +{

> +       irq = platform_get_irq(to_platform_device(pdev->dev.parent), 0);

Why not to use temporary variable dev?

This should be platform_get_irq_optional().

> +       if (irq) {
> +               ret = devm_request_irq(dev, irq, mp2629_irq_handler,
> +                                IRQF_TRIGGER_RISING, "mp2629-charger",
> +                                charger);
> +               if (ret) {
> +                       dev_err(dev, "failed to request gpio IRQ\n");
> +                       goto iio_fail;
> +               }
> +       }

> +}

-- 
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ