• Alexandru Ardelean's avatar
    iio: light: tsl2563: pass iio device as i2c_client private data · 70804e56
    Alexandru Ardelean authored
    We may want to get rid of the iio_priv_to_dev() helper. That's a bit
    uncertain at this point. The reason is that we will hide some of the
    members of the iio_dev structure (to prevent drivers from accessing them
    directly), and that will also mean hiding the implementation of the
    iio_priv_to_dev() helper inside the IIO core.
    
    Hiding the implementation of iio_priv_to_dev() implies that some fast-paths
    may not be fast anymore, so a general idea is to try to get rid of the
    iio_priv_to_dev() altogether.
    
    For this driver, it implies passing the IIO device on the i2c client
    private data. The implementation of iio_priv() will not be affected by the
    rework/hiding of iio_priv_to_dev().
    Signed-off-by: default avatarAlexandru Ardelean <alexandru.ardelean@analog.com>
    Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
    70804e56
tsl2563.c 20.9 KB