[PATCH] pcmcia: unify attach, EVENT_CARD_INSERTION handlers into one probe callback

Unify the EVENT_CARD_INSERTION and "attach" callbacks to one unified
probe() callback. As all in-kernel drivers are changed to this new
callback, there will be no temporary backwards-compatibility. Inside a
probe() function, each driver _must_ set struct pcmcia_device
*p_dev->instance and instance->handle correctly.

With these patches, the basic driver interface for 16-bit PCMCIA drivers
now has the classic four callbacks known also from other buses:

        int (*probe)            (struct pcmcia_device *dev);
        void (*remove)          (struct pcmcia_device *dev);

        int (*suspend)          (struct pcmcia_device *dev);
        int (*resume)           (struct pcmcia_device *dev);

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
This commit is contained in:
Dominik Brodowski
2005-11-14 21:25:51 +01:00
parent b463581154
commit f8cfa618dc
48 changed files with 469 additions and 2230 deletions
-1
View File
@@ -389,7 +389,6 @@ int pcmcia_get_status(struct pcmcia_device *p_dev, cs_status_t *status);
int pcmcia_get_mem_page(window_handle_t win, memreq_t *req);
int pcmcia_map_mem_page(window_handle_t win, memreq_t *req);
int pcmcia_modify_configuration(struct pcmcia_device *p_dev, modconf_t *mod);
int pcmcia_register_client(client_handle_t *handle, client_reg_t *req);
int pcmcia_release_configuration(struct pcmcia_device *p_dev);
int pcmcia_release_io(struct pcmcia_device *p_dev, io_req_t *req);
int pcmcia_release_irq(struct pcmcia_device *p_dev, irq_req_t *req);
+1 -5
View File
@@ -133,10 +133,7 @@ typedef struct dev_link_t {
struct pcmcia_socket;
struct pcmcia_driver {
dev_link_t *(*attach)(void);
int (*event) (event_t event, int priority,
event_callback_args_t *);
int (*probe) (struct pcmcia_device *dev);
void (*remove) (struct pcmcia_device *dev);
int (*suspend) (struct pcmcia_device *dev);
@@ -169,7 +166,6 @@ struct pcmcia_device {
/* deprecated, a cleaned up version will be moved into this
struct soon */
dev_link_t *instance;
event_callback_args_t event_callback_args;
u_int state;
/* information about this device */