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

« back to all changes in this revision

Viewing changes to drivers/staging/iio/dds/ad9852.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:
222
222
        .attrs = ad9852_attributes,
223
223
};
224
224
 
 
225
static const struct iio_info ad9852_info = {
 
226
        .attrs = &ad9852_attribute_group,
 
227
        .driver_module = THIS_MODULE,
 
228
};
 
229
 
225
230
static int __devinit ad9852_probe(struct spi_device *spi)
226
231
{
227
232
        struct ad9852_state *st;
237
242
        mutex_init(&st->lock);
238
243
        st->sdev = spi;
239
244
 
240
 
        st->idev = iio_allocate_device();
 
245
        st->idev = iio_allocate_device(0);
241
246
        if (st->idev == NULL) {
242
247
                ret = -ENOMEM;
243
248
                goto error_free_st;
244
249
        }
245
250
        st->idev->dev.parent = &spi->dev;
246
 
        st->idev->num_interrupt_lines = 0;
247
 
        st->idev->event_attrs = NULL;
248
251
 
249
 
        st->idev->attrs = &ad9852_attribute_group;
 
252
        st->idev->info = &ad9852_info;
250
253
        st->idev->dev_data = (void *)(st);
251
 
        st->idev->driver_module = THIS_MODULE;
252
254
        st->idev->modes = INDIO_DIRECT_MODE;
253
255
 
254
256
        ret = iio_device_register(st->idev);