]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/isdn/gigaset/usb-gigaset.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland...
[linux-2.6-omap-h63xx.git] / drivers / isdn / gigaset / usb-gigaset.c
index 04f2ad7ba8b04590ae927591096d95e0fc783a1b..a1263019df5edec8543d25220b1e416b45a46b9e 100644 (file)
@@ -50,7 +50,7 @@ MODULE_PARM_DESC(cidmode, "Call-ID mode");
 #define USB_M105_PRODUCT_ID    0x0009
 
 /* table of devices that work with this driver */
-static struct usb_device_id gigaset_table [] = {
+static const struct usb_device_id gigaset_table [] = {
        { USB_DEVICE(USB_M105_VENDOR_ID, USB_M105_PRODUCT_ID) },
        { }                                     /* Terminating entry */
 };
@@ -138,8 +138,6 @@ struct usb_cardstate {
        char                    bchars[6];              /* for request 0x19 */
 };
 
-struct usb_bc_state {};
-
 static inline unsigned tiocm_to_gigaset(unsigned state)
 {
        return ((state & TIOCM_DTR) ? 1 : 0) | ((state & TIOCM_RTS) ? 2 : 0);
@@ -579,25 +577,21 @@ static int gigaset_brkchars(struct cardstate *cs, const unsigned char buf[6])
 
 static int gigaset_freebcshw(struct bc_state *bcs)
 {
-       if (!bcs->hw.usb)
-               return 0;
-       //FIXME
-       kfree(bcs->hw.usb);
+       /* unused */
        return 1;
 }
 
 /* Initialize the b-channel structure */
 static int gigaset_initbcshw(struct bc_state *bcs)
 {
-       bcs->hw.usb = kmalloc(sizeof(struct usb_bc_state), GFP_KERNEL);
-       if (!bcs->hw.usb)
-               return 0;
-
+       /* unused */
+       bcs->hw.usb = NULL;
        return 1;
 }
 
 static void gigaset_reinitbcshw(struct bc_state *bcs)
 {
+       /* nothing to do for M10x */
 }
 
 static void gigaset_freecshw(struct cardstate *cs)
@@ -652,7 +646,7 @@ static int write_modem(struct cardstate *cs)
         * transmit data
         */
        count = min(bcs->tx_skb->len, (unsigned) ucs->bulk_out_size);
-       memcpy(ucs->bulk_out_buffer, bcs->tx_skb->data, count);
+       skb_copy_from_linear_data(bcs->tx_skb, ucs->bulk_out_buffer, count);
        skb_pull(bcs->tx_skb, count);
        atomic_set(&ucs->busy, 1);
        gig_dbg(DEBUG_OUTPUT, "write_modem: send %d bytes", count);
@@ -860,7 +854,7 @@ static void gigaset_disconnect(struct usb_interface *interface)
        gigaset_unassign(cs);
 }
 
-static struct gigaset_ops ops = {
+static const struct gigaset_ops ops = {
        gigaset_write_cmd,
        gigaset_write_room,
        gigaset_chars_in_buffer,