~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise

« back to all changes in this revision

Viewing changes to drivers/staging/iio/dds/ad9910.c

  • Committer: Bazaar Package Importer
  • Author(s): Paolo Pisati
  • Date: 2011-06-29 15:23:51 UTC
  • mfrom: (26.1.1 natty-proposed)
  • Revision ID: james.westby@ubuntu.com-20110629152351-xs96tm303d95rpbk
Tags: 3.0.0-1200.2
* Rebased against 3.0.0-6.7
* BSP from TI based on 3.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
357
357
        .attrs = ad9910_attributes,
358
358
};
359
359
 
 
360
static const struct iio_info ad9910_info = {
 
361
        .attrs = &ad9910_attribute_group,
 
362
        .driver_module = THIS_MODULE,
 
363
};
 
364
 
360
365
static int __devinit ad9910_probe(struct spi_device *spi)
361
366
{
362
367
        struct ad9910_state *st;
372
377
        mutex_init(&st->lock);
373
378
        st->sdev = spi;
374
379
 
375
 
        st->idev = iio_allocate_device();
 
380
        st->idev = iio_allocate_device(0);
376
381
        if (st->idev == NULL) {
377
382
                ret = -ENOMEM;
378
383
                goto error_free_st;
379
384
        }
380
385
        st->idev->dev.parent = &spi->dev;
381
 
        st->idev->num_interrupt_lines = 0;
382
 
        st->idev->event_attrs = NULL;
383
386
 
384
 
        st->idev->attrs = &ad9910_attribute_group;
 
387
        st->idev->info = &ad9910_info;
385
388
        st->idev->dev_data = (void *)(st);
386
 
        st->idev->driver_module = THIS_MODULE;
387
389
        st->idev->modes = INDIO_DIRECT_MODE;
388
390
 
389
391
        ret = iio_device_register(st->idev);