I wish to create an usb driver for my Ericsson cell phone on my production
machine. As this is a production machine I am loath to start changing kernel,
especiall to a test kernel therefore I wish to stay with 2.4.20

Following on from Greg KH <[EMAIL PROTECTED]> articles in the Feb/April 2003 Linux
Journal I have attempted writing my own driver but as you can well imagine I
have had a problem or two. His environment is Kernel 2.5 or greater and mine is
2.4.20.

When I compile I get

[EMAIL PROTECTED]:/usr/src/linux-2.4.20/drivers/usb/serial# make -C
../../../../linux SUBDIRS=$PWD modules
make: Entering directory `/usr/src/linux-2.4.20'
make -C  /usr/src/linux-2.4.20/drivers/usb/serial CFLAGS="-D__KERNEL__
-I/usr/src/linux-2.4.20/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2
-fno-strict-aliasing -fno-common -fomit-frame-pointer -pipe
-mpreferred-stack-boundary=2 -march=i686 -DMODULE" MAKING_MODULES=1 modules
make[1]: Entering directory `/usr/src/linux-2.4.20/drivers/usb/serial'
gcc -D__KERNEL__ -I/usr/src/linux-2.4.20/include -Wall -Wstrict-prototypes
-Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -pipe
-mpreferred-stack-boundary=2 -march=i686 -DMODULE  -nostdinc -iwithprefix
include -DKBUILD_BASENAME=ericsson_serial  -c -o ericsson-serial.o
ericsson-serial.c
ericsson-serial.c:15:52: ../../../drivers/usb/serial/usb-serial.h: No such file
or directory
ericsson-serial.c:31: `usb_serial_probe' undeclared here (not in a function)
ericsson-serial.c:31: initializer element is not constant
ericsson-serial.c:31: (near initialization for `ericsson_driver.probe')
ericsson-serial.c:32: `usb_serial_disconnect' undeclared here (not in a
function)
ericsson-serial.c:32: initializer element is not constant
ericsson-serial.c:32: (near initialization for `ericsson_driver.disconnect')
ericsson-serial.c:36: variable `ericsson_device' has initializer but incomplete
type
ericsson-serial.c:38: unknown field `owner' specified in initializer
ericsson-serial.c:38: warning: excess elements in struct initializer
ericsson-serial.c:38: warning: (near initialization for `ericsson_device')
ericsson-serial.c:39: unknown field `name' specified in initializer
ericsson-serial.c:39: warning: excess elements in struct initializer
ericsson-serial.c:39: warning: (near initialization for `ericsson_device')
ericsson-serial.c:40: unknown field `short_name' specified in initializer
ericsson-serial.c:40: warning: excess elements in struct initializer
ericsson-serial.c:40: warning: (near initialization for `ericsson_device')
ericsson-serial.c:41: unknown field `id_table' specified in initializer
ericsson-serial.c:41: warning: excess elements in struct initializer
ericsson-serial.c:41: warning: (near initialization for `ericsson_device')
ericsson-serial.c:42: unknown field `num_interrupt_in' specified in initializer
ericsson-serial.c:42: `NUM_DONT_CARE' undeclared here (not in a function)
ericsson-serial.c:42: warning: excess elements in struct initializer
ericsson-serial.c:42: warning: (near initialization for `ericsson_device')
ericsson-serial.c:43: unknown field `num_bulk_in' specified in initializer
ericsson-serial.c:43: `NUM_DONT_CARE' undeclared here (not in a function)
ericsson-serial.c:43: warning: excess elements in struct initializer
ericsson-serial.c:43: warning: (near initialization for `ericsson_device')
ericsson-serial.c:44: unknown field `num_bulk_out' specified in initializer
ericsson-serial.c:44: `NUM_DONT_CARE' undeclared here (not in a function)
ericsson-serial.c:44: warning: excess elements in struct initializer
ericsson-serial.c:44: warning: (near initialization for `ericsson_device')
ericsson-serial.c:45: unknown field `num_ports' specified in initializer
ericsson-serial.c:45: warning: excess elements in struct initializer
ericsson-serial.c:45: warning: (near initialization for `ericsson_device')
ericsson-serial.c: In function `ericsson_init':
ericsson-serial.c:50: warning: implicit declaration of function
`usr_serial_register'
ericsson-serial.c: In function `ericsson_exit':
ericsson-serial.c:57: warning: implicit declaration of function `usr_deregister'
ericsson-serial.c:58: warning: implicit declaration of function
`usb_serial_deregister'
ericsson-serial.c: At top level:
ericsson-serial.c:36: storage size of `ericsson_device' isn't known
ericsson-serial.c:7: warning: `debug' defined but not used
make[1]: *** [ericsson-serial.o] Error 1
make[1]: Leaving directory `/usr/src/linux-2.4.20/drivers/usb/serial'
make: *** [_mod_/usr/src/linux-2.4.20/drivers/usb/serial] Error 2
make: Leaving directory `/usr/src/linux-2.4.20'

Is there any way of my staying with 2.4.20 and still get this program working?

I also attach my version of his tiny tiny usb serial driver in case that makes
a difference.

I have also noticed that in usbserial.c usb_serial_probe and
usb_serial_disconnect are defined as static.
Is this part of my problem? As far as I am aware static functions are only
useable from within the module where they are defined.

Look forward to your reply as I would really like to get this working.

BTW When I plug my device into the USB port I get:-
Aug 19 15:09:11 puppypad /etc/hotplug/usb.agent: ... no modules for USB product
731/528/1

and I have assumed that 731 is the PRODUCT_ID & 528 is the DEVICE_ID?
in hex that would be 0x02db and 0x0210 respectively.


---

Regards,
Alf Stockton    www.stockton.co.za

Mandrell: "You know what I think?"
Doctor:   "Ah, ah that's a catch question. With a brain your size you
          don't think, right?"
                -- Dr. Who


-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines
at the same time. Free trial click here:http://www.vmware.com/wl/offer/358/0
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to