ALSA: riptide: clean up while loop
[safe/jmp/linux-2.6] / sound / soc / codecs / wm8750.c
index e6422b1..475c67a 100644 (file)
@@ -403,7 +403,6 @@ static int wm8750_add_widgets(struct snd_soc_codec *codec)
 
        snd_soc_dapm_add_routes(codec, audio_map, ARRAY_SIZE(audio_map));
 
-       snd_soc_dapm_new_widgets(codec);
        return 0;
 }
 
@@ -772,16 +771,8 @@ static int wm8750_init(struct snd_soc_device *socdev,
        snd_soc_add_controls(codec, wm8750_snd_controls,
                                ARRAY_SIZE(wm8750_snd_controls));
        wm8750_add_widgets(codec);
-       ret = snd_soc_init_card(socdev);
-       if (ret < 0) {
-               printk(KERN_ERR "wm8750: failed to register card\n");
-               goto card_err;
-       }
        return ret;
 
-card_err:
-       snd_soc_free_pcms(socdev);
-       snd_soc_dapm_free(socdev);
 err:
        kfree(codec->reg_cache);
        return ret;
@@ -911,30 +902,6 @@ static struct spi_driver wm8750_spi_driver = {
        .probe          = wm8750_spi_probe,
        .remove         = __devexit_p(wm8750_spi_remove),
 };
-
-static int wm8750_spi_write(struct spi_device *spi, const char *data, int len)
-{
-       struct spi_transfer t;
-       struct spi_message m;
-       u8 msg[2];
-
-       if (len <= 0)
-               return 0;
-
-       msg[0] = data[0];
-       msg[1] = data[1];
-
-       spi_message_init(&m);
-       memset(&t, 0, (sizeof t));
-
-       t.tx_buf = &msg[0];
-       t.len = len;
-
-       spi_message_add_tail(&t, &m);
-       spi_sync(spi, &m);
-
-       return len;
-}
 #endif
 
 static int wm8750_probe(struct platform_device *pdev)
@@ -973,7 +940,6 @@ static int wm8750_probe(struct platform_device *pdev)
 #endif
 #if defined(CONFIG_SPI_MASTER)
        if (setup->spi) {
-               codec->hw_write = (hw_write_t)wm8750_spi_write;
                ret = spi_register_driver(&wm8750_spi_driver);
                if (ret != 0)
                        printk(KERN_ERR "can't add spi driver");