From 28181a66ef9eba10da9c8c47d46f4b9ba0ba0a22 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Mon, 25 Jul 2011 03:34:58 +0200 Subject: udev: Replace bInterfaceNumber with ID_USB_INTERFACE_NUM --- plugins/udev.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'plugins/udev.c') diff --git a/plugins/udev.c b/plugins/udev.c index 0d512185..0b7d0472 100644 --- a/plugins/udev.c +++ b/plugins/udev.c @@ -394,7 +394,6 @@ static void add_novatel(struct ofono_modem *modem, struct udev_device *udev_device) { const char *devnode, *intfnum; - struct udev_device *parent; int registered; DBG("modem %p", modem); @@ -403,9 +402,7 @@ static void add_novatel(struct ofono_modem *modem, if (registered != 0) return; - parent = udev_device_get_parent(udev_device); - parent = udev_device_get_parent(parent); - intfnum = udev_device_get_sysattr_value(parent, "bInterfaceNumber"); + intfnum = get_property(udev_device, "ID_USB_INTERFACE_NUM"); DBG("intfnum %s", intfnum); @@ -425,7 +422,6 @@ static void add_nokia(struct ofono_modem *modem, struct udev_device *udev_device) { const char *devnode, *intfnum; - struct udev_device *parent; int registered; DBG("modem %p", modem); @@ -434,8 +430,7 @@ static void add_nokia(struct ofono_modem *modem, if (registered != 0) return; - parent = udev_device_get_parent(udev_device); - intfnum = udev_device_get_sysattr_value(parent, "bInterfaceNumber"); + intfnum = get_property(udev_device, "ID_USB_INTERFACE_NUM"); DBG("intfnum %s", intfnum); @@ -555,7 +550,6 @@ static void add_linktop(struct ofono_modem *modem, struct udev_device *udev_device) { const char *devnode, *intfnum; - struct udev_device *parent; int registered; DBG("modem %p", modem); @@ -564,8 +558,7 @@ static void add_linktop(struct ofono_modem *modem, if (registered != 0) return; - parent = udev_device_get_parent(udev_device); - intfnum = udev_device_get_sysattr_value(parent, "bInterfaceNumber"); + intfnum = get_property(udev_device, "ID_USB_INTERFACE_NUM"); DBG("intfnum %s", intfnum); -- cgit v1.2.3