distance sensors delete unused IOCTL SENSORIOCSQUEUEDEPTH

This commit is contained in:
Daniel Agar 2018-11-03 16:01:57 -04:00 committed by Lorenz Meier
parent ac04db6084
commit 9cd3e3d1cf
9 changed files with 0 additions and 149 deletions

View File

@ -339,11 +339,6 @@ BMP280::ioctl(struct file *filp, int cmd, unsigned long arg)
switch (arg) {
case SENSOR_POLLRATE_MANUAL:
stop_cycle();
_report_ticks = 0;
return OK;
case 0:
return -EINVAL;

View File

@ -409,24 +409,6 @@ HC_SR04::ioctl(device::file_t *filp, int cmd, unsigned long arg)
return (1000 / _measure_ticks);
case SENSORIOCSQUEUEDEPTH: {
/* lower bound is mandatory, upper bound is a sanity check */
if ((arg < 1) || (arg > 100)) {
return -EINVAL;
}
ATOMIC_ENTER;
if (!_reports->resize(arg)) {
ATOMIC_LEAVE;
return -ENOMEM;
}
ATOMIC_LEAVE;
return OK;
}
case SENSORIOCRESET:
/* XXX implement this */
return -EINVAL;

View File

@ -230,24 +230,6 @@ ok:
int LidarLiteI2C::ioctl(device::file_t *filp, int cmd, unsigned long arg)
{
switch (cmd) {
case SENSORIOCSQUEUEDEPTH: {
/* lower bound is mandatory, upper bound is a sanity check */
if ((arg < 1) || (arg > 100)) {
return -EINVAL;
}
ATOMIC_ENTER;
if (!_reports->resize(arg)) {
ATOMIC_LEAVE;
return -ENOMEM;
}
ATOMIC_LEAVE;
return OK;
}
default: {
int result = LidarLite::ioctl(filp, cmd, arg);

View File

@ -405,24 +405,6 @@ MB12XX::ioctl(device::file_t *filp, int cmd, unsigned long arg)
return (1000 / _measure_ticks);
case SENSORIOCSQUEUEDEPTH: {
/* lower bound is mandatory, upper bound is a sanity check */
if ((arg < 1) || (arg > 100)) {
return -EINVAL;
}
ATOMIC_ENTER;
if (!_reports->resize(arg)) {
ATOMIC_LEAVE;
return -ENOMEM;
}
ATOMIC_LEAVE;
return OK;
}
case SENSORIOCRESET:
/* XXX implement this */
return -EINVAL;

View File

@ -386,24 +386,6 @@ SF0X::ioctl(device::file_t *filp, int cmd, unsigned long arg)
return (1000 / _measure_ticks);
case SENSORIOCSQUEUEDEPTH: {
/* lower bound is mandatory, upper bound is a sanity check */
if ((arg < 1) || (arg > 100)) {
return -EINVAL;
}
ATOMIC_ENTER;
if (!_reports->resize(arg)) {
ATOMIC_LEAVE;
return -ENOMEM;
}
ATOMIC_LEAVE;
return OK;
}
case SENSORIOCRESET:
/* XXX implement this */
return -EINVAL;

View File

@ -405,24 +405,6 @@ SF1XX::ioctl(device::file_t *filp, int cmd, unsigned long arg)
return (1000 / _measure_ticks);
case SENSORIOCSQUEUEDEPTH: {
/* lower bound is mandatory, upper bound is a sanity check */
if ((arg < 1) || (arg > 100)) {
return -EINVAL;
}
ATOMIC_ENTER;
if (!_reports->resize(arg)) {
ATOMIC_LEAVE;
return -ENOMEM;
}
ATOMIC_LEAVE;
return OK;
}
case SENSORIOCRESET:
/* XXX implement this */
return -EINVAL;

View File

@ -405,24 +405,6 @@ SRF02::ioctl(device::file_t *filp, int cmd, unsigned long arg)
return (1000 / _measure_ticks);
case SENSORIOCSQUEUEDEPTH: {
/* lower bound is mandatory, upper bound is a sanity check */
if ((arg < 1) || (arg > 100)) {
return -EINVAL;
}
ATOMIC_ENTER;
if (!_reports->resize(arg)) {
ATOMIC_LEAVE;
return -ENOMEM;
}
ATOMIC_LEAVE;
return OK;
}
case SENSORIOCRESET:
/* XXX implement this */
return -EINVAL;

View File

@ -483,24 +483,6 @@ TERARANGER::ioctl(device::file_t *filp, int cmd, unsigned long arg)
return (1000 / _measure_ticks);
case SENSORIOCSQUEUEDEPTH: {
/* lower bound is mandatory, upper bound is a sanity check */
if ((arg < 1) || (arg > 100)) {
return -EINVAL;
}
ATOMIC_ENTER;
if (!_reports->resize(arg)) {
ATOMIC_LEAVE;
return -ENOMEM;
}
ATOMIC_LEAVE;
return OK;
}
case SENSORIOCRESET:
/* XXX implement this */
return -EINVAL;

View File

@ -423,24 +423,6 @@ TFMINI::ioctl(device::file_t *filp, int cmd, unsigned long arg)
return (1000 / _measure_ticks);
case SENSORIOCSQUEUEDEPTH: {
/* lower bound is mandatory, upper bound is a sanity check */
if ((arg < 1) || (arg > 100)) {
return -EINVAL;
}
ATOMIC_ENTER;
if (!_reports->resize(arg)) {
ATOMIC_LEAVE;
return -ENOMEM;
}
ATOMIC_LEAVE;
return OK;
}
case SENSORIOCRESET:
/* XXX implement this */
return -EINVAL;