- From: Ian Abbott <abbotti_at_mev.co.uk>
- Date: Thu, 13 Jul 2006 14:27:36 +0100
On 10/07/06 12:56, Torben Mikael Hansen wrote: > Further I patched ni_mio_cs.c to compile with kernel 2.6.17. I have tested it > with comedi_test and a simple AO -> AI loopback (in labview) and it seems to > work. > > Of couse you'll need to change the kbuild file since other pcmcia > drivers still doesn't work. Thanks for making a start on this fairly grim task! At the moment PCMCIA is only supported on 2.6.16, but it looks like the kernel PCMCIA interface has settled down to a nice clean interface in 2.6.17, so it makes sense to base the Comedi PCMCIA drivers on that interface. The grim part is restoring PCMCIA support to the other kernel versions of course! I plan to take a look at this at the weekend. I think it will involve some combination of compatibility header hacking, combined with some sort of "shim" driver to convert the 2.6.17 API into whatever the desired kernel supports. > Since dev_init_t no longer exist in 2.6.17 and pcmcia_device has no next > member, a device list is no longer maintained. If cs_attach is called twice > dev_list is writen over and the first call to cs_detact sets dev_list to > NULL. I'm not sure if this is the right thing to do? Maybe make cs_attach do nothing if dev_list is already non-NULL, and make cs_detach check that the pointers match before setting it to NULL. And maybe rename the 'dev_list' variable as the name no longer makes sense. > I'm not sure about all the corrections I have done, but I seems to work and I > get no error messages from the kernel. I think the the dev_list should not be > used at all anymore, but I couldn't find a good way of avoiding it. For the 2.6.16 changes, the dev_list variable was just kept around for convenience. There was no need to maintain a list, but the Comedi PCMCIA drivers needed a variable to refer to the devices. If any of the Comedi PCMCIA drivers need to support more than one device (which none of them choose to do at the moment), they will a slightly better method of mapping struct pcmcia_device pointers to Comedi devices! > I hope it is usefull, and please let me know it I should do some specific > testing or if you have other comments. It looks useful, thanks! -- -=( Ian Abbott _at_ MEV Ltd. E-mail: <abbotti_at_mev.co.uk> )=- -=( Tel: +44 (0)161 477 1898 FAX: +44 (0)161 718 3587 )=-
Received on 2006-07-13Z12:27:36