diff --git a/backend/genesys/command_set_common.cpp b/backend/genesys/command_set_common.cpp index 9396353f8..2d46e9b9d 100644 --- a/backend/genesys/command_set_common.cpp +++ b/backend/genesys/command_set_common.cpp @@ -143,17 +143,7 @@ void CommandSetCommon::set_xpa_lamp_power(Genesys_Device& dev, bool set) const } } - // BUG: we're currently calling the function in shut down path of regular lamp - if (set) { - throw SaneException("Unexpected code path entered"); - } - - GenesysRegisterSettingSet regs = { - { 0xa6, 0x40, 0x70 }, - }; - apply_reg_settings_to_device(dev, regs); - // TODO: throw exception when we're only calling this function in error return path - // throw SaneException("Could not find XPA lamp settings"); + throw SaneException("Could not find XPA lamp settings"); } diff --git a/backend/genesys/gl843.cpp b/backend/genesys/gl843.cpp index 06380f51b..46139f4b0 100644 --- a/backend/genesys/gl843.cpp +++ b/backend/genesys/gl843.cpp @@ -1550,9 +1550,7 @@ void CommandSetGl843::end_scan(Genesys_Device* dev, Genesys_Register_Set* reg, // post scan gpio dev->interface->write_register(0x7e, 0x00); - // turn off XPA lamp if needed - // BUG: the if condition below probably shouldn't be enabled when XPA is off - if (reg->state.is_xpa_on || reg->state.is_lamp_on) { + if (reg->state.is_xpa_on) { dev->cmd_set->set_xpa_lamp_power(*dev, false); }