Re: usb serial driver: private data already deallocated when release function is called

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

 



On Sun, Jan 13, 2013 at 10:23:59PM +0000, Tilman wrote:
> Hello Greg
> 
>   
> > Do you have a pointer to your code anywhere?  That would be the easiest
> > way to help you out here.  Otherwise we are just guessing as to the
> > issues involved.
> 
> Not really -- I hence pasted it into this posting. I hope that is OK and does
> violate some etiquette of this list.
> Btw. are there repositories that would be suitable to make highly experimental
> code available ? 

Yes, that is what drivers/staging/ is for, why not submit your driver
for inclusion there?

> Tilman
> /* File: usbrsatest.c
>  * Driver for IO-Data's USB RSA serial dongle (test driver)
>  *      Copyright (C) 2012
>  *         Tilman Glotzner
>  *
>  *
>  *      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
>  *      the Free Software Foundation; either version 2 of the License, or
>  *      (at your option) any later version.
>  *
>  *
>  *
>  */
> 
> 
> #include <linux/kernel.h>
> #include <linux/errno.h>
> #include <linux/init.h>
> #include <linux/slab.h>
> #include <linux/tty.h>
> #include <linux/tty_driver.h>
> #include <linux/tty_flip.h>
> #include <linux/module.h>
> #include <linux/spinlock.h>
> #include <linux/mutex.h>
> #include <linux/uaccess.h>
> #include <asm/termbits.h>
> #include <linux/usb.h>
> #include <linux/serial_reg.h>
> #include <linux/serial.h>
> #include <linux/usb/serial.h>
> //#include <linux/firmware.h>
> #include <linux/device.h>
> #include <linux/usb/ezusb.h>
> //#include <linux/ihex.h>
> #include "usbrsa.h"
> 
> #define CONFIG_DYNAMIC_PRINTK_DEBUG 1
> #define CONFIG_USB_SERIAL_DEBUG 1
> #ifdef CONFIG_USB_SERIAL_DEBUG
>         static int debug = 1;
> #else
>         static int debug = 0;
> #endif
> 
> char buffer_tx[65];
> char buffer_rx[65];
> 
> /*
>  * Version Information
>  */
> #define DRIVER_VERSION "v0.1"
> #define DRIVER_AUTHOR "Tilman Gloetzner <tilmanglotzner@xxxxxxxxx>"
> #define DRIVER_DESC "IO-Data USB-RSA test driver"
> 
> 
> #define IODATA_VENDOR_ID                        0x4bb
> #define IODATA_USBRSA_PREENUM_ID        0xa01
> #define IODATA_USBRSA_ID                        0xa03
> #define IODATA_USBRSA_FW_STRING         "USB-RSA Test-FW"
> 
> #define COMMAND_TIMEOUT         (2*HZ)  /* 2 second timeout for a command */
> 
> /*
>    Taken whiteheat driver as role model:

Ugh, the whitehead driver was not a good role model.  You should look at
the changes that have gone into that driver over the past few releases,
and make the same kind of changes to your driver.  That would be an easy
way to bring it up to modern standards, and fix the tty port issue at
the same time.

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux