]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - sound/pcmcia/vx/vxpocket.c
Merge branch 'next' into for-linus
[linux-2.6-omap-h63xx.git] / sound / pcmcia / vx / vxpocket.c
index 3089fcca800ecfa872b47f28fd5c7f50baa93d80..706602a40600718666c3a5e5fb7e957dc901e622 100644 (file)
@@ -19,7 +19,6 @@
  */
 
 
-#include <sound/driver.h>
 #include <linux/init.h>
 #include <linux/moduleparam.h>
 #include <sound/core.h>
@@ -91,7 +90,7 @@ static int snd_vxpocket_dev_free(struct snd_device *device)
  * Only output levels can be modified
  */
 
-static DECLARE_TLV_DB_SCALE(db_scale_old_vol, -11350, 50, 0);
+static const DECLARE_TLV_DB_SCALE(db_scale_old_vol, -11350, 50, 0);
 
 static struct snd_vx_hardware vxpocket_hw = {
        .name = "VXPocket",
@@ -217,34 +216,12 @@ static int vxpocket_config(struct pcmcia_device *link)
 {
        struct vx_core *chip = link->priv;
        struct snd_vxpocket *vxp = (struct snd_vxpocket *)chip;
-       tuple_t tuple;
-       cisparse_t *parse;
-       u_short buf[32];
        int last_fn, last_ret;
 
        snd_printdd(KERN_DEBUG "vxpocket_config called\n");
-       parse = kmalloc(sizeof(*parse), GFP_KERNEL);
-       if (! parse) {
-               snd_printk(KERN_ERR "vx: cannot allocate\n");
-               return -ENOMEM;
-       }
-       tuple.Attributes = 0;
-       tuple.TupleData = (cisdata_t *)buf;
-       tuple.TupleDataMax = sizeof(buf);
-       tuple.TupleOffset = 0;
-       tuple.DesiredTuple = CISTPL_CONFIG;
-       CS_CHECK(GetFirstTuple, pcmcia_get_first_tuple(link, &tuple));
-       CS_CHECK(GetTupleData, pcmcia_get_tuple_data(link, &tuple));
-       CS_CHECK(ParseTuple, pcmcia_parse_tuple(link, &tuple, parse));
-       link->conf.ConfigBase = parse->config.base;
-       link->conf.Present = parse->config.rmask[0];
 
        /* redefine hardware record according to the VERSION1 string */
-       tuple.DesiredTuple = CISTPL_VERS_1;
-       CS_CHECK(GetFirstTuple, pcmcia_get_first_tuple(link, &tuple));
-       CS_CHECK(GetTupleData, pcmcia_get_tuple_data(link, &tuple));
-       CS_CHECK(ParseTuple, pcmcia_parse_tuple(link, &tuple, parse));
-       if (! strcmp(parse->version_1.str + parse->version_1.ofs[1], "VX-POCKET")) {
+       if (!strcmp(link->prod_id[1], "VX-POCKET")) {
                snd_printdd("VX-pocket is detected\n");
        } else {
                snd_printdd("VX-pocket 440 is detected\n");
@@ -265,14 +242,12 @@ static int vxpocket_config(struct pcmcia_device *link)
                goto failed;
 
        link->dev_node = &vxp->node;
-       kfree(parse);
        return 0;
 
 cs_failed:
        cs_error(link, last_fn, last_ret);
 failed:
        pcmcia_disable_device(link);
-       kfree(parse);
        return -ENODEV;
 }
 
@@ -321,7 +296,7 @@ static int vxpocket_probe(struct pcmcia_device *p_dev)
 
        /* find an empty slot from the card list */
        for (i = 0; i < SNDRV_CARDS; i++) {
-               if (! card_alloc & (1 << i))
+               if (!(card_alloc & (1 << i)))
                        break;
        }
        if (i >= SNDRV_CARDS) {