Hello,
This is regarding an earlier mailing to this list
regarding a problem with my driver's probe not being
able to detect the device even though the device's
characteristics show up during kernel boot. This is
the smallest code that I could come up with
-----------------------------------------------------
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/usb.h>
static void * my_usb_probe
(
struct usb_device *dev,
unsigned int ifnum,
const struct usb_device_id *table
);
static struct usb_driver my_usb_driver =
{
name : "driver_my",
probe : my_usb_probe
};
static void * my_usb_probe
(
struct usb_device *dev,
unsigned int ifnum,
const struct usb_device_id *table
)
{
dbg("%d %d",dev->descriptor.idVendor,
dev->descriptor.idProduct);
return NULL;
}
int my_init()
{
dbg("in init");
usb_register(&my_usb_driver);
return 0;
}
void my_exit()
{
dbg("in exit");
}
module_init (my_init);
module_exit (my_exit);
-----------------------------------------------------
The module load and I see "in init" in dmesg but the
idVendor and idProduct values are wrong. I then
included all the header files included in
usb_skeleton.c but i got a segmentation fault when
loading. I compile the above using
gcc -c -I/usr/src/linux/include -DDEBUG -DMODULE
-D__KERNEL__ my_driver.c
Thanks in advance
Naveen
__________________________________________________
Do You Yahoo!?
Send your FREE holiday greetings online!
http://greetings.yahoo.com
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel