[PATCH] pcmcia: socket callbacks now use "struct pcmcia_socket"

Russell King rmk at arm.linux.org.uk
Mon May 19 00:28:08 BST 2003


On Sat, May 17, 2003 at 10:16:03PM +0200, Dominik Brodowski wrote:
> Passing a "socket number" between the core and the socket drivers is
> awful. Change it to "struct pcmcia_socket" (which will be filled with
> more life later).

I have an itch with this set of patches - we seem to be adding more
levels of indirection between the "cs" layer and the socket driver
itself.  I think this is becoming overly complex.

Is the idea to eventually kill socket_info_t in cs.c?  If this is
the case, can't we just rename socket_info_t to struct pcmcia_socket
(and keep the socket_info_t typedef around for a while.)

Also, imo the "thing" we pass to cs.c would be the class_device, and
the "thing" that cs.c passes back would likewise be the same pointer
- ie, the same class_device structure.  cs.c would then use
class_dev->class_data for its private data, and the socket driver
would then do a "pcmcia_class_drv_data(class_dev, parent_struct)"
which would return a pointer to the parent structure.

I think this would remove a fair amount of the triple/quadruple
indirection.

Comments?

-- 
Russell King (rmk at arm.linux.org.uk)                The developer of ARM Linux
             http://www.arm.linux.org.uk/personal/aboutme.html




More information about the linux-pcmcia mailing list