~ubuntu-branches/ubuntu/quantal/linux-linaro-mx51/quantal

« back to all changes in this revision

Viewing changes to sound/soc/omap/sdp4430.c

  • Committer: Package Import Robot
  • Author(s): John Rigby, John Rigby
  • Date: 2011-09-26 10:44:23 UTC
  • Revision ID: package-import@ubuntu.com-20110926104423-3o58a3c1bj7x00rs
Tags: 3.0.0-1007.9
[ John Rigby ]

Enable crypto modules and remove crypto-modules from
exclude-module files
LP: #826021

Show diffs side-by-side

added added

removed removed

Lines of Context:
215
215
        .num_links = 1,
216
216
};
217
217
 
218
 
static struct platform_device *sdp4430_snd_device;
219
 
 
220
 
static int __init sdp4430_soc_init(void)
 
218
static int __devinit sdp4430_soc_probe(struct platform_device *pdev)
221
219
{
 
220
        struct snd_soc_card *card = &snd_soc_sdp4430;
222
221
        int ret;
223
222
 
224
 
        if (!machine_is_omap_4430sdp())
225
 
                return -ENODEV;
226
 
        printk(KERN_INFO "SDP4430 SoC init\n");
227
 
 
228
 
        sdp4430_snd_device = platform_device_alloc("soc-audio", -1);
229
 
        if (!sdp4430_snd_device) {
230
 
                printk(KERN_ERR "Platform device allocation failed\n");
231
 
                return -ENOMEM;
 
223
        pr_info("SDP4430 SoC init\n");
 
224
 
 
225
        card->dev = &pdev->dev;
 
226
 
 
227
        ret = snd_soc_register_card(card);
 
228
        if (ret) {
 
229
                dev_err(&pdev->dev, "snd_soc_register_card() failed: %d\n",
 
230
                        ret);
 
231
                return ret;
232
232
        }
233
233
 
234
 
        platform_set_drvdata(sdp4430_snd_device, &snd_soc_sdp4430);
235
 
 
236
 
        ret = platform_device_add(sdp4430_snd_device);
237
 
        if (ret)
238
 
                goto err;
239
 
 
240
234
        /* Codec starts in HP mode */
241
235
        twl6040_power_mode = 1;
242
236
 
243
237
        return 0;
244
 
 
245
 
err:
246
 
        printk(KERN_ERR "Unable to add platform device\n");
247
 
        platform_device_put(sdp4430_snd_device);
248
 
        return ret;
 
238
}
 
239
 
 
240
static int __devexit sdp4430_soc_remove(struct platform_device *pdev)
 
241
{
 
242
        struct snd_soc_card *card = platform_get_drvdata(pdev);
 
243
 
 
244
        snd_soc_unregister_card(card);
 
245
 
 
246
        return 0;
 
247
}
 
248
 
 
249
static struct platform_driver sdp4430_driver = {
 
250
        .driver = {
 
251
                .name = "sdp4430-soc-audio",
 
252
                .owner = THIS_MODULE,
 
253
        },
 
254
 
 
255
        .probe = sdp4430_soc_probe,
 
256
        .remove = __devexit_p(sdp4430_soc_remove),
 
257
};
 
258
 
 
259
static int __init sdp4430_soc_init(void)
 
260
{
 
261
        return platform_driver_register(&sdp4430_driver);
249
262
}
250
263
module_init(sdp4430_soc_init);
251
264
 
252
265
static void __exit sdp4430_soc_exit(void)
253
266
{
254
 
        platform_device_unregister(sdp4430_snd_device);
 
267
        platform_driver_unregister(&sdp4430_driver);
255
268
}
256
269
module_exit(sdp4430_soc_exit);
257
270
 
258
271
MODULE_AUTHOR("Misael Lopez Cruz <x0052729@ti.com>");
259
272
MODULE_DESCRIPTION("ALSA SoC SDP4430");
260
273
MODULE_LICENSE("GPL");
261
 
 
 
274
MODULE_ALIAS("platform:sdp4430-soc-audio");