• Pantelis Antoniou's avatar
    i2c/of: Factor out Devicetree registration code · a430a345
    Pantelis Antoniou authored
    Dynamically inserting i2c client device nodes requires the use
    of a single device registration method. Factor out the loop body of
    of_i2c_register_devices() so that it can be called for individual
    device_nodes instead of for all the children of a node.
    
    Note: The diff of this commit looks far more complicated than it
    actually is due the indentation being changed for a large block of code.
    When viewed using the diff -w flag to ignore whitespace changes it can
    be seen that the change is actually quite simple.
    Signed-off-by: default avatarPantelis Antoniou <pantelis.antoniou@konsulko.com>
    [grant.likely: Made new function static and removed changes to header]
    Signed-off-by: default avatarGrant Likely <grant.likely@linaro.org>
    Reviewed-by: default avatarWolfram Sang <wsa@the-dreams.de>
    Cc: Rob Herring <robh+dt@kernel.org>
    Cc: linux-i2c@vger.kernel.org
    a430a345
i2c-core.c 76.7 KB