Skip to content
  • Alexandru Ardelean's avatar
    d3be8324
    iio: remove explicit IIO device parent assignment · d3be8324
    Alexandru Ardelean authored
    
    
    This patch applies the semantic patch:
    @@
    expression I, P, SP;
    @@
       I = devm_iio_device_alloc(P, SP);
       ...
    -  I->dev.parent = P;
    
    It updates 302 files and does 307 deletions.
    This semantic patch also removes some comments like
    '/* Establish that the iio_dev is a child of the i2c device */'
    
    But this is is only done in case where the block is left empty.
    
    The patch does not seem to cover all cases. It looks like in some cases a
    different variable is used in some cases to assign the parent, but it
    points to the same reference.
    In other cases, the block covered by ... may be just too big to be covered
    by the semantic patch.
    
    However, this looks pretty good as well, as it does cover a big bulk of the
    drivers that should remove the parent assignment.
    
    Signed-off-by: default avatarAlexandru Ardelean <alexandru.ardelean@analog.com>
    Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
    d3be8324
    iio: remove explicit IIO device parent assignment
    Alexandru Ardelean authored
    
    
    This patch applies the semantic patch:
    @@
    expression I, P, SP;
    @@
       I = devm_iio_device_alloc(P, SP);
       ...
    -  I->dev.parent = P;
    
    It updates 302 files and does 307 deletions.
    This semantic patch also removes some comments like
    '/* Establish that the iio_dev is a child of the i2c device */'
    
    But this is is only done in case where the block is left empty.
    
    The patch does not seem to cover all cases. It looks like in some cases a
    different variable is used in some cases to assign the parent, but it
    points to the same reference.
    In other cases, the block covered by ... may be just too big to be covered
    by the semantic patch.
    
    However, this looks pretty good as well, as it does cover a big bulk of the
    drivers that should remove the parent assignment.
    
    Signed-off-by: default avatarAlexandru Ardelean <alexandru.ardelean@analog.com>
    Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
Loading