lkml.org 
[lkml]   [2020]   [Jun]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 2/2] i2c: fsi: Prevent adding adapters for ports without dts nodes
From
Date

On 6/8/20 11:31 AM, Andy Shevchenko wrote:
> On Mon, Jun 8, 2020 at 7:05 PM Eddie James <eajames@linux.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.


Good point, thanks, I'll update that.


>
>> + /* Do not add port if it is described as disabled */
>> + if (!of_device_is_available(np))
>> continue;

\
 
 \ /
  Last update: 2020-06-08 20:12    [W:0.184 / U:0.212 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site