~ubuntu-branches/ubuntu/precise/alsa-driver/precise

« back to all changes in this revision

Viewing changes to alsa-kernel/sparc/dbri.c

  • Committer: Bazaar Package Importer
  • Author(s): Luke Yelavich
  • Date: 2011-02-21 18:06:40 UTC
  • mfrom: (1.1.15 upstream)
  • Revision ID: james.westby@ubuntu.com-20110221180640-a8p2yxtvgf7xbxub
Tags: 1.0.24+dfsg-0ubuntu1
* New upstream release
* Refreshed patches:
  - distinguish_kernel_makefile_and_source_dirs.patch
  - debian_dfsg_configure.patch
* debian/control: Update Vcs-bzr field to point to new branch location

Show diffs side-by-side

added added

removed removed

Lines of Context:
299
299
/* This structure holds the information for both chips (DBRI & CS4215) */
300
300
struct snd_dbri {
301
301
        int regs_size, irq;     /* Needed for unload */
302
 
        struct of_device *op;   /* OF device info */
 
302
        struct platform_device *op;     /* OF device info */
303
303
        spinlock_t lock;
304
304
 
305
305
        struct dbri_dma *dma;   /* Pointer to our DMA block */
2523
2523
static void snd_dbri_free(struct snd_dbri *dbri);
2524
2524
 
2525
2525
static int __devinit snd_dbri_create(struct snd_card *card,
2526
 
                                     struct of_device *op,
 
2526
                                     struct platform_device *op,
2527
2527
                                     int irq, int dev)
2528
2528
{
2529
2529
        struct snd_dbri *dbri = card->private_data;
2592
2592
                                  (void *)dbri->dma, dbri->dma_dvma);
2593
2593
}
2594
2594
 
2595
 
static int __devinit dbri_probe(struct of_device *op, const struct of_device_id *match)
 
2595
static int __devinit dbri_probe(struct platform_device *op, const struct of_device_id *match)
2596
2596
{
2597
2597
        struct snd_dbri *dbri;
2598
2598
        struct resource *rp;
2608
2608
                return -ENOENT;
2609
2609
        }
2610
2610
 
2611
 
        irq = op->irqs[0];
 
2611
        irq = op->archdata.irqs[0];
2612
2612
        if (irq <= 0) {
2613
2613
                printk(KERN_ERR "DBRI-%d: No IRQ.\n", dev);
2614
2614
                return -ENODEV;
2651
2651
 
2652
2652
        printk(KERN_INFO "audio%d at %p (irq %d) is DBRI(%c)+CS4215(%d)\n",
2653
2653
               dev, dbri->regs,
2654
 
               dbri->irq, op->node->name[9], dbri->mm.version);
 
2654
               dbri->irq, op->dev.of_node->name[9], dbri->mm.version);
2655
2655
        dev++;
2656
2656
 
2657
2657
        return 0;
2662
2662
        return err;
2663
2663
}
2664
2664
 
2665
 
static int __devexit dbri_remove(struct of_device *op)
 
2665
static int __devexit dbri_remove(struct platform_device *op)
2666
2666
{
2667
2667
        struct snd_card *card = dev_get_drvdata(&op->dev);
2668
2668
 
2687
2687
MODULE_DEVICE_TABLE(of, dbri_match);
2688
2688
 
2689
2689
static struct of_platform_driver dbri_sbus_driver = {
2690
 
        .name           = "dbri",
2691
 
        .match_table    = dbri_match,
 
2690
        .driver = {
 
2691
                .name = "dbri",
 
2692
                .owner = THIS_MODULE,
 
2693
                .of_match_table = dbri_match,
 
2694
        },
2692
2695
        .probe          = dbri_probe,
2693
2696
        .remove         = __devexit_p(dbri_remove),
2694
2697
};
2696
2699
/* Probe for the dbri chip and then attach the driver. */
2697
2700
static int __init dbri_init(void)
2698
2701
{
2699
 
        return of_register_driver(&dbri_sbus_driver, &of_bus_type);
 
2702
        return of_register_platform_driver(&dbri_sbus_driver);
2700
2703
}
2701
2704
 
2702
2705
static void __exit dbri_exit(void)
2703
2706
{
2704
 
        of_unregister_driver(&dbri_sbus_driver);
 
2707
        of_unregister_platform_driver(&dbri_sbus_driver);
2705
2708
}
2706
2709
 
2707
2710
module_init(dbri_init);