aboutsummaryrefslogtreecommitdiff
path: root/src/mm-device.c
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@lanedo.com>2012-09-12 13:06:40 +0200
committerAleksander Morgado <aleksander@lanedo.com>2012-09-14 07:05:26 +0200
commita66f971a7cdea4bf1d9f6390e12f950f41ee5595 (patch)
tree91134bf4d00ffd509a8b7112effe2525342cfb88 /src/mm-device.c
parentfbe01c8d6a22cb95ff74ddefc907e663cdeee710 (diff)
libmm-common: added common utils from core
Moved the utils to play with binary to hex strings into libmm-common.
Diffstat (limited to 'src/mm-device.c')
-rw-r--r--src/mm-device.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/mm-device.c b/src/mm-device.c
index 06755722..83b23867 100644
--- a/src/mm-device.c
+++ b/src/mm-device.c
@@ -20,11 +20,10 @@
#include <string.h>
#include <ModemManager.h>
-#include <mm-errors-types.h>
+#include <libmm-common.h>
#include "mm-device.h"
#include "mm-plugin.h"
-#include "mm-utils.h"
#include "mm-log.h"
G_DEFINE_TYPE (MMDevice, mm_device, G_TYPE_OBJECT);
@@ -166,8 +165,8 @@ get_device_ids (GUdevDevice *device,
goto out;
if (vendor) {
- *vendor = (guint16) (utils_hex2byte (vid + 2) & 0xFF);
- *vendor |= (guint16) ((utils_hex2byte (vid) & 0xFF) << 8);
+ *vendor = (guint16) (mm_utils_hex2byte (vid + 2) & 0xFF);
+ *vendor |= (guint16) ((mm_utils_hex2byte (vid) & 0xFF) << 8);
}
if (!pid)
@@ -185,8 +184,8 @@ get_device_ids (GUdevDevice *device,
}
if (product) {
- *product = (guint16) (utils_hex2byte (pid + 2) & 0xFF);
- *product |= (guint16) ((utils_hex2byte (pid) & 0xFF) << 8);
+ *product = (guint16) (mm_utils_hex2byte (pid + 2) & 0xFF);
+ *product |= (guint16) ((mm_utils_hex2byte (pid) & 0xFF) << 8);
}
success = TRUE;