[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1477bf0e-5723-8781-05bd-0f30c0b9c3a7@gmail.com>
Date: Mon, 7 Sep 2020 17:33:28 +0300
From: Dmitry Osipenko <digetx@...il.com>
To: Andy Shevchenko <andy.shevchenko@...il.com>
Cc: Thierry Reding <thierry.reding@...il.com>,
Jonathan Hunter <jonathanh@...dia.com>,
Laxman Dewangan <ldewangan@...dia.com>,
Wolfram Sang <wsa@...-dreams.de>,
Michał Mirosław <mirq-linux@...e.qmqm.pl>,
linux-i2c <linux-i2c@...r.kernel.org>,
linux-tegra@...r.kernel.org,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v5 13/36] i2c: tegra: Clean up probe function
07.09.2020 11:20, Andy Shevchenko пишет:
> On Sun, Sep 6, 2020 at 9:51 PM Dmitry Osipenko <digetx@...il.com> wrote:
>>
>> The driver's probe function code is a bit difficult to read. This patch
>> reorders code of the probe function, forming groups of code that are easy
>> to work with. The reset_control_get() now may return -EPROBE_DEFER on
>> newer Tegra SoCs because they use BPMP driver that provides reset controls
>> and BPMP doesn't come up early during boot, previously rst was protected
>> by other checks error checks in the code, hence dev_err_probe() is used
>> now for the rst. The probe tear-down order now matches the driver-removal
>> order.
>
> Seems that partially this can be done in the patches that converted to
> new/better APIs.
Okay, I'll split this patch a bit more.
> Also consider the use of a temporary variable for struct device
> pointer. It might make your life easier.
Whole driver now uses i2c_dev->dev pattern and the "dev" variable
originally was used for improving indentation of the error messages that
are now gone. Hence there is no real need to keep the temporal variable,
IMO.
Powered by blists - more mailing lists