gnokii-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] libgnokii and core programs branch, master, updated. rel_0_6_29-40


From: Daniele Forsi
Subject: [SCM] libgnokii and core programs branch, master, updated. rel_0_6_29-401-g7de873a
Date: Thu, 26 Apr 2012 17:25:50 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "libgnokii and core programs".

The branch, master has been updated
       via  7de873a9e514ea123283562e8293c60c7ea87d59 (commit)
      from  cb139e95181cae1883b25eda5fa6b34837bdf549 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/gnokii.git/commit/?id=7de873a9e514ea123283562e8293c60c7ea87d59


commit 7de873a9e514ea123283562e8293c60c7ea87d59
Author: Daniele Forsi <address@hidden>
Date:   Thu Apr 26 19:09:33 2012 +0200

    Detach any linux kernel module bound to the USB device to be used by 
dku2libusb
    
    This way there is no need to blacklist modules in /etc/modprobe.d/ however
    libusb-0 provides no way to reattach the detached module (libusb-1 does have
    it), so to have it back you can either rmmod cdc_phonet && modprobe 
cdc_phonet
    or unplug the phone and replug it.

diff --git a/ChangeLog b/ChangeLog
index 35ed573..30faa17 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -44,6 +44,9 @@
     o change the value used for VOICE phonebook memory, containing
       the phone number(s) to be used to listen to voicemail, which
       was used for MT which now is unsupported      (Daniele Forsi)
+    o use libusb to detach cdc_phonet or any other linux kernel
+      module; modprobe blacklisting isn't needed anymore
+                                                    (Daniele Forsi)
  * xgnokii updates
     o fix bug that caused to forget subentries after the first one
       when editing the phonebook                    (Daniele Forsi)
diff --git a/common/devices/dku2libusb.c b/common/devices/dku2libusb.c
index 16fa22d..3308391 100644
--- a/common/devices/dku2libusb.c
+++ b/common/devices/dku2libusb.c
@@ -348,6 +348,15 @@ static int usbfbus_connect_request(struct gn_statemachine 
*state)
 
        DEVINSTANCE(state)->interface->dev_data = 
usb_open(DEVINSTANCE(state)->interface->device);
 
+#ifdef __linux__
+       /* Ask to remove any driver bound to this interface (-ENODATA means no 
driver was bound) */
+       ret = 
usb_detach_kernel_driver_np(DEVINSTANCE(state)->interface->dev_data, 
DEVINSTANCE(state)->interface->control_interface);
+       if (ret < 0 && ret != -ENODATA) {
+               dprintf("Can't detach kernel driver: %d\n", ret);
+               goto err1;
+       }
+#endif
+
        ret = usb_set_configuration(DEVINSTANCE(state)->interface->dev_data, 
DEVINSTANCE(state)->interface->configuration);
        if (ret < 0) {
                dprintf("Can't set configuration: %d\n", ret);

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                   |    3 +++
 common/devices/dku2libusb.c |    9 +++++++++
 2 files changed, 12 insertions(+), 0 deletions(-)


hooks/post-receive
-- 
libgnokii and core programs



reply via email to

[Prev in Thread] Current Thread [Next in Thread]