• Daniel Mack's avatar
    leds: lt3593: merge functions and clean up code · d8be2867
    Daniel Mack authored
    In preparation to DT probe functionality, merge create_lt3593_led() into
    its only call-site. The DT based setup code will be quite different, so this
    internal helper function is of no help.
    
    This also changes the way the driver works by only handling one entry inside
    'struct gpio_led_platform_data'. If multiple devices of the same type are
    found in a design, there should be a platform device for each of them. The
    only mainline user of this driver is not affected by this change.
    
    Last, use devm_led_classdev_register() instead of
    led_classdev_register(), so the driver's remove callback can go away.
    Signed-off-by: default avatarDaniel Mack <daniel@zonque.org>
    Signed-off-by: default avatarJacek Anaszewski <jacek.anaszewski@gmail.com>
    d8be2867
leds-lt3593.c 3.76 KB