From 5a2692cf3af2d2b05e29c6f5530abf8cbe0801c8 Mon Sep 17 00:00:00 2001 From: Lorenz Meier Date: Tue, 3 Feb 2015 13:50:01 +0100 Subject: [PATCH] MB12xx: move to 0 based index --- src/drivers/mb12xx/mb12xx.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/drivers/mb12xx/mb12xx.cpp b/src/drivers/mb12xx/mb12xx.cpp index a4fb7bcc20..d5ce5d0feb 100644 --- a/src/drivers/mb12xx/mb12xx.cpp +++ b/src/drivers/mb12xx/mb12xx.cpp @@ -235,7 +235,7 @@ MB12XX::~MB12XX() } if (_class_instance != -1) { - unregister_class_devname(RANGE_FINDER_DEVICE_PATH, _class_instance); + unregister_class_devname(RANGE_FINDER_BASE_DEVICE_PATH, _class_instance); } /* free perf counters */ @@ -264,7 +264,7 @@ MB12XX::init() goto out; } - _class_instance = register_class_devname(RANGE_FINDER_DEVICE_PATH); + _class_instance = register_class_devname(RANGE_FINDER_BASE_DEVICE_PATH); if (_class_instance == CLASS_DEVICE_PRIMARY) { /* get a publish handle on the range finder topic */