[RFC][0/5] move 16-bit code from ds.c to cs.c
Dominik Brodowski
linux at brodo.de
Sat Nov 22 11:33:51 GMT 2003
The following patches are not meant for inclusion _now_ due to the
stabilization phase the 2.6. kernel is in at the moment. However,
they are considered as a "request for comment", and -maybe- for inclusion
on the pcmcia.arm.linux.org.uk site as "pending/future patches".
As discussed previously, 16-bit PCMCIA-related code and data should be
moved out of cs.c/pcmcia_core and into ds.c.
Also, the registration of ds as a "handle" for each PCMCIA card should be
removed. So, wherever the handle argument isn't necessary for pcmcia function,
it should be removed.
These five patches are a first step to achieve both these aims, more will
follow. Wherever code is moved, I've adapted it to the coding style common
in the Linux kernel.
pcmcia-2.6.0-test9-ds_includes_cs_internal
In order to move PCMCIA-related code from cs.c to ds.c, it is necessary
to include cs_internal.h in ds.c.
This causes two problems:
a) SOCKET_PRESENT would be redefined. So rename all uses of SOCKET_PRESENT
in ds.c to DS_SOCKET_PRESENT
b) pc_debug would be defined as "external int" instead of "static int". So,
rename this optional debugging parameter to ds_debug.
pcmcia-2.6.0-test9-move_pcmcia_bind_device
pcmcia_bind_device was only used by ds.c, and it is only used for 16-bit
PCMCIA devices. So, move it to ds.c.
pcmcia-2.6.0-test9-move_pcmcia_bind_mtd
pcmcia_bind_mtd was only used by ds.c, and it is only used for 16-bit
PCMCIA devices. So, move it to ds.c.
pcmcia-2.6.0-test9-move_cardservices
CardServices and ReportError were only used by 16-bit PCMCIA devices.
So, move them to ds.c.
pcmcia-2.6.0-test9-insert_resume_by_socket
The pcmcia_{suspend,resume,eject,insert}_card calls are only issued
by the userspace cardctl tool via ds.c. There's no need to verify the
caller (ds) has a valid "handle", as long as it knows the proper
struct pcmcia_socket.
Dominik
More information about the linux-pcmcia
mailing list