genesys: Remove unused fallback sensor profile code

merge-requests/257/head
Povilas Kanapickas 2019-12-08 11:42:27 +02:00
rodzic a7fd1d6ae1
commit 1f33bafe5d
3 zmienionych plików z 2 dodań i 22 usunięć

Wyświetl plik

@ -1471,16 +1471,8 @@ const SensorProfile& get_sensor_profile(AsicType asic_type, const Genesys_Sensor
return sensor.sensor_profiles[i];
}
}
DBG(DBG_warn, "%s: using default sensor profile\n", __func__);
if (asic_type == AsicType::GL124)
return *s_fallback_sensor_profile_gl124;
if (asic_type == AsicType::GL845 || asic_type == AsicType::GL846)
return *s_fallback_sensor_profile_gl846;
if (asic_type == AsicType::GL847)
return *s_fallback_sensor_profile_gl847;
throw SaneException("Unknown asic type for default profile %d",
static_cast<unsigned>(asic_type));
throw SaneException("Unsupported profile for asic %d, resolution %d",
static_cast<unsigned>(asic_type), resolution);
}

Wyświetl plik

@ -512,9 +512,6 @@ inline T clamp(const T& value, const T& lo, const T& hi)
/*---------------------------------------------------------------------------*/
extern StaticInit<std::vector<Genesys_Sensor>> s_sensors;
extern StaticInit<SensorProfile> s_fallback_sensor_profile_gl124;
extern StaticInit<SensorProfile> s_fallback_sensor_profile_gl846;
extern StaticInit<SensorProfile> s_fallback_sensor_profile_gl847;
extern StaticInit<std::vector<Genesys_Frontend>> s_frontends;
extern StaticInit<std::vector<Genesys_Gpo>> s_gpo;
extern StaticInit<std::vector<Genesys_Motor>> s_motors;

Wyświetl plik

@ -110,17 +110,10 @@ inline unsigned default_get_hwdpi_divisor_for_dpi(const Genesys_Sensor& sensor,
}
StaticInit<std::vector<Genesys_Sensor>> s_sensors;
StaticInit<SensorProfile> s_fallback_sensor_profile_gl124;
StaticInit<SensorProfile> s_fallback_sensor_profile_gl846;
StaticInit<SensorProfile> s_fallback_sensor_profile_gl847;
void genesys_init_sensor_tables()
{
s_sensors.init();
s_fallback_sensor_profile_gl124.init();
s_fallback_sensor_profile_gl846.init();
s_fallback_sensor_profile_gl847.init();
Genesys_Sensor sensor;
SensorProfile profile;
@ -1898,7 +1891,6 @@ void genesys_init_sensor_tables()
{ 0x7a, 0x00 }, { 0x7b, 0x00 }, { 0x7c, 0x55 },
};
sensor.sensor_profiles.push_back(profile);
*s_fallback_sensor_profile_gl847 = profile;
profile = SensorProfile();
profile.resolutions = { 300 };
@ -3680,7 +3672,6 @@ void genesys_init_sensor_tables()
sensor.sensor_profiles.push_back(profile);
s_sensors->push_back(sensor);
*s_fallback_sensor_profile_gl846 = profile;
sensor = Genesys_Sensor();