From a66f971a7cdea4bf1d9f6390e12f950f41ee5595 Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Wed, 12 Sep 2012 13:06:40 +0200 Subject: libmm-common: added common utils from core Moved the utils to play with binary to hex strings into libmm-common. --- src/mm-device.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src/mm-device.c') 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 #include -#include +#include #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; -- cgit v1.2.3-70-g09d2