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

« back to all changes in this revision

Viewing changes to drivers/staging/iio/meter/ade7753.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:
463
463
 
464
464
static IIO_CONST_ATTR_SAMP_FREQ_AVAIL("27900 14000 7000 3500");
465
465
 
466
 
static IIO_CONST_ATTR(name, "ade7753");
467
 
 
468
466
static struct attribute *ade7753_attributes[] = {
469
467
        &iio_dev_attr_temp_raw.dev_attr.attr,
470
468
        &iio_const_attr_temp_offset.dev_attr.attr,
472
470
        &iio_dev_attr_sampling_frequency.dev_attr.attr,
473
471
        &iio_const_attr_sampling_frequency_available.dev_attr.attr,
474
472
        &iio_dev_attr_reset.dev_attr.attr,
475
 
        &iio_const_attr_name.dev_attr.attr,
476
473
        &iio_dev_attr_phcal.dev_attr.attr,
477
474
        &iio_dev_attr_cfden.dev_attr.attr,
478
475
        &iio_dev_attr_aenergy.dev_attr.attr,
507
504
        .attrs = ade7753_attributes,
508
505
};
509
506
 
 
507
static const struct iio_info ade7753_info = {
 
508
        .attrs = &ade7753_attribute_group,
 
509
        .driver_module = THIS_MODULE,
 
510
};
 
511
 
510
512
static int __devinit ade7753_probe(struct spi_device *spi)
511
513
{
512
514
        int ret, regdone = 0;
532
534
        st->us = spi;
533
535
        mutex_init(&st->buf_lock);
534
536
        /* setup the industrialio driver allocated elements */
535
 
        st->indio_dev = iio_allocate_device();
 
537
        st->indio_dev = iio_allocate_device(0);
536
538
        if (st->indio_dev == NULL) {
537
539
                ret = -ENOMEM;
538
540
                goto error_free_tx;
539
541
        }
540
542
 
 
543
        st->indio_dev->name = spi->dev.driver->name;
541
544
        st->indio_dev->dev.parent = &spi->dev;
542
 
        st->indio_dev->attrs = &ade7753_attribute_group;
 
545
        st->indio_dev->info = &ade7753_info;
543
546
        st->indio_dev->dev_data = (void *)(st);
544
 
        st->indio_dev->driver_module = THIS_MODULE;
545
547
        st->indio_dev->modes = INDIO_DIRECT_MODE;
546
548
 
547
549
        ret = iio_device_register(st->indio_dev);