diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2011-07-25 03:34:58 +0200 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2011-07-25 03:34:58 +0200 |
commit | 28181a66ef9eba10da9c8c47d46f4b9ba0ba0a22 (patch) | |
tree | 2640c0429dfebced6aff360ff28c084d0998198a /plugins/udev.c | |
parent | 49fc5b973d9aaff35e5a532fef3c7336924d621a (diff) | |
download | ofono-28181a66ef9eba10da9c8c47d46f4b9ba0ba0a22.tar.bz2 |
udev: Replace bInterfaceNumber with ID_USB_INTERFACE_NUM
Diffstat (limited to 'plugins/udev.c')
-rw-r--r-- | plugins/udev.c | 13 |
1 files changed, 3 insertions, 10 deletions
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); |