Skip to content
  • AceLan Kao's avatar
    Fix the skip disabled backlight device · 86c3548d
    AceLan Kao authored
    Only raw backlight devices have the "enabled" file under device
    directory.
    So the commit
       5c0d35ca
    
     skip the disabled backlight device
    affects all type of backlight device is wrong, it will drop out all
    other type of backlight device except raw backlight interfaces.
    
    To fix this, we just need to check the enabled file for raw backlight
    interfaces.
    
    Changes V2:
       1. Declare isRawBacklightEnabled() as a static function
       2. Using QFile constructor to pass the file path
       3. Declare "QByteArray buffer" when it's really needed below
       4. Remove "bool result", and just return true/false directly
       5. Adding curly brackets to if statement
    
    Signed-off-by: default avatarAceLan Kao <acelan@acelan.idv.tw>
    86c3548d