############################################################################
#define MODULE
#define __KERNEL__
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/usb.h>

#define USB_SKEL_VENDOR_ID      0x045e
#define USB_SKEL_PRODUCT_ID     0x0039

MODULE_LICENSE("GPL");


static struct usb_device_id id_table [] = {
  { USB_DEVICE(USB_SKEL_VENDOR_ID, USB_SKEL_PRODUCT_ID) },
  { }                                     /* Terminating entry */
};

void *probe(struct usb_device *dev,unsigned int interface,
    const struct usb_device_id *id_table)
{
    printk(""");
    MOD_INC_USE_COUNT;
    return 0;
}

static void deconnexion(struct usb_device *usbdev,void *drv_context)
{
    printk("function for deconnexion !!!\n");
    MOD_DEC_USE_COUNT;
}

static struct usb_driver test = {
    name: "Usb test",
    probe: probe,
    disconnect: deconnexion
};

int
init_module(void)
{
    printk("Starting test module !!!\n");
    usb_register(&test);
}

void
cleanup_module(void)
{
    printk("End of this module ;)\n");
    usb_deregister(&test);
}
############################

That's my simple code with sould detect plug/deplug usb device but that is
not ok :(
I never see "YEAH !!  driver seem to be [OK] !!!!!!\n"

Can you say me what is not good ?



-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to