kopia lustrzana https://gitlab.com/sane-project/backends
genesys: Remove unused fallback sensor profile code
rodzic
a7fd1d6ae1
commit
1f33bafe5d
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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();
|
||||
|
|
Ładowanie…
Reference in New Issue