Skip to content
  • Linus Walleij's avatar
    iio: light: bh1780: assign a static name · 0dd09ca4
    Linus Walleij authored
    Using the struct i2c_device->id field for naming the light sensor
    is a bad idea: when booting from the pure device tree this is NULL
    and that causes the device not to have the "name" property in
    sysfs and that in turn confuses the "lsiio" command to stop listing
    devices.
    
    So instead of using the device .id, use the hard string "bh1780",
    which works just fine.
    
    Fixes: 1f0477f1
    
     ("iio: light: new driver for the ROHM BH1780")
    Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
    Cc: <Stable@vger.kernel.org>
    Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
    0dd09ca4