Upgrading a Driver

2005-02-05
2013-04-08
  • Aric Blumer
    Aric Blumer
    2005-02-05

    I have a driver I used for 2.4.x kernels.  I need to upgrade it to the 2.6.x kernels, and I noticed that the CardServices() function is gone.  I just want to verify if this is that case.  Has the single CardServices() function been replaced with individual function calls?

    Thanks.

    (Sorry if this has been asked a million times, but I didn't find it in the archives with a search.)

     
    • David Hinds
      David Hinds
      2005-02-09

      Yes, the PCMCIA driver API has changed for 2.6; unfortunately there is no documentation for the changes.

      -- Dave

       
      • Aric Blumer
        Aric Blumer
        2005-08-10

        I finally had to get this done, and here's what I did in case others find it useful.

        First, the registering of the driver changed from a function call that supplies the {at,de}tach routines, to a structure that references these functions passed to pcmcia_register_driver(). This is how other layers work in 2.6.x, so no surprises there.

        Then, all the old CardServices(XXX,...) calls were changed to something like pcmcia_xxx(...) calls.  Figuring out what xxx should be based on XXX is not hard.  Just look at the cs.h file for the prototypes.

        And that pretty much sums up the changes.  I think the only other change was that the CS_EVENT_RESET_COMPLETE has gone away, but I wasn't using it anyway.