[cpia] Unified patch for recent kernels

Claudio Matsuoka claudio@helllabs.org
Tue, 25 Jan 2000 20:35:47 -0200 (EDT)


On Tue, 25 Jan 2000 sbertin@mindspring.com wrote:

> You're probably the first to apply that patch to one of the recent
> development kernels.  I'm not suprised that there are problems.  If you
> don't need it compiled into the kernel, the patch is unnecessary, just
> type make in the cpia/modules directory and the modules will be built
> there.  I'll have a look later tonight and try to put together a patch
> for 2.3.40.

I tried to just build and install the modules, but here's what happened:

Linux dexter 2.3.39 #2 Mon Jan 17 17:55:25 EDT 2000 i686 unknown

Jan 24 20:02:40 dexter kernel: parport0: PC-style at 0x378 (0x778), irq 7, dma 3 [PCSPP,TRISTATE,ECP,DMA] 
Jan 24 20:02:40 dexter kernel: parport0: cpp_daisy: aa5500ff(10) 
Jan 24 20:02:40 dexter kernel: parport0: assign_addrs: aa5500ff(10) 
Jan 24 20:03:46 dexter kernel: Linux video capture interface: v1.00 
Jan 24 20:03:50 dexter kernel: V4L-Driver for Vision CPiA based cameras v0.6.0 
Jan 24 20:03:58 dexter kernel: Parallel port driver for Vision CPiA based cameras v0.6.0 

open("/dev/video", O_RDWR)              = -1 ENOSYS (Function not implemented)
open("/dev/video", O_RDWR)              = -1 ENOSYS (Function not implemented)
open("/dev/video", O_RDWR)              = -1 ENODEV (Operation not supported by device)
write(2, "/dev/video: Operation not suppor"..., 46/dev/video: Operation not supported by device

# lsmod
Module                  Size  Used by
cpia_pp                 4556   0  (autoclean) (unused)
cpia                   50684   0  [cpia_pp]
videodev                2880   0  [cpia]
parport_pc             15004   0 
parport                29632   0  [cpia_pp parport_pc]
serial                 40484   1  (autoclean)
ne                      7868   1 
8390                    6916   0  [ne]
isa-pnp                28404   0  [ne]


I quickly browsed through videodev.c yesterday and probably missed the
hook to the CPiA driver,

        if(vfl==NULL) {  
                char modname[20];

                sprintf (modname, "char-major-%d-%d", VIDEO_MAJOR, minor);
                request_module(modname);
                vfl=video_device[minor];
                if (vfl==NULL)
                        return -ENODEV;
        }


I tried the kernel patch as a last resort since the module itself didn't
seem to work. I'm compiling 2.3.40 now and I can provide a patch (if nobody
else needs it with real urgency), as soon as I get the modules working.
Anyway, that ENOSYS when opening /dev/video0 is strange. 

claudio