[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75VfRj4kA1yrhkqak9zMJuES8Udk3YuzMKHXyh+hwrB6rSQ@mail.gmail.com>
Date: Mon, 8 Jun 2020 19:31:12 +0300
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Eddie James <eajames@...ux.ibm.com>
Cc: linux-i2c <linux-i2c@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
wsa@...nel.org, Joel Stanley <joel@....id.au>
Subject: Re: [PATCH 2/2] i2c: fsi: Prevent adding adapters for ports without
dts nodes
On Mon, Jun 8, 2020 at 7:05 PM Eddie James <eajames@...ux.ibm.com> wrote:
>
> Ports should be defined in the devicetree if they are to be enabled on
> the system.
...
> for (port_no = 0; port_no < ports; port_no++) {
> np = fsi_i2c_find_port_of_node(dev->of_node, port_no);
> - if (np && !of_device_is_available(np))
> + /* Do not add port if it is not described in the device tree */
> + if (!np)
> + continue;
I believe this is redundant, since below will do the same second time.
> + /* Do not add port if it is described as disabled */
> + if (!of_device_is_available(np))
> continue;
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists