]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/usb/misc/emi62.c
Convert files to UTF-8 and some cleanups
[karo-tx-linux.git] / drivers / usb / misc / emi62.c
index fe351371f274e11e6b576dcce1a671cd2b8ef0f8..4758cc5ccebcd37acdc7330718079941f77b332c 100644 (file)
@@ -1,7 +1,7 @@
 /* 
  * Emagic EMI 2|6 usb audio interface firmware loader.
  * Copyright (C) 2002
- *     Tapio Laxström (tapio.laxstrom@iptime.fi)
+ *     Tapio Laxström (tapio.laxstrom@iptime.fi)
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License, as published by
@@ -61,13 +61,12 @@ static void __exit emi62_exit (void);
 static int emi62_writememory (struct usb_device *dev, int address, unsigned char *data, int length, __u8 request)
 {
        int result;
-       unsigned char *buffer =  kmalloc (length, GFP_KERNEL);
+       unsigned char *buffer =  kmemdup(data, length, GFP_KERNEL);
 
        if (!buffer) {
                err("emi62: kmalloc(%d) failed.", length);
                return -ENOMEM;
        }
-       memcpy (buffer, data, length);
        /* Note: usb_control_msg returns negative value on error or length of the
         *               data that was written! */
        result = usb_control_msg (dev, usb_sndctrlpipe(dev, 0), request, 0x40, address, 0, buffer, length, 300);
@@ -293,7 +292,7 @@ static void __exit emi62_exit (void)
 module_init(emi62_init);
 module_exit(emi62_exit);
 
-MODULE_AUTHOR("tapio laxström");
+MODULE_AUTHOR("Tapio Laxström");
 MODULE_DESCRIPTION("Emagic EMI 6|2m firmware loader.");
 MODULE_LICENSE("GPL");