Airspeed: Move to 0-based index

This commit is contained in:
Lorenz Meier
2015-02-09 22:56:21 +01:00
parent 3036ad034d
commit 6e4b95e844
3 changed files with 10 additions and 10 deletions
+2 -2
View File
@@ -106,7 +106,7 @@ Airspeed::~Airspeed()
stop();
if (_class_instance != -1)
unregister_class_devname(AIRSPEED_DEVICE_PATH, _class_instance);
unregister_class_devname(AIRSPEED_BASE_DEVICE_PATH, _class_instance);
/* free any existing reports */
if (_reports != nullptr)
@@ -133,7 +133,7 @@ Airspeed::init()
goto out;
/* register alternate interfaces if we have to */
_class_instance = register_class_devname(AIRSPEED_DEVICE_PATH);
_class_instance = register_class_devname(AIRSPEED_BASE_DEVICE_PATH);
/* publication init */
if (_class_instance == CLASS_DEVICE_PRIMARY) {