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

« back to all changes in this revision

Viewing changes to drivers/staging/iio/resolver/ad2s90.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:
75
75
        .attrs = ad2s90_attributes,
76
76
};
77
77
 
 
78
static const struct iio_info ad2s90_info = {
 
79
        .attrs = &ad2s90_attribute_group,
 
80
        .driver_module = THIS_MODULE,
 
81
};
 
82
 
78
83
static int __devinit ad2s90_probe(struct spi_device *spi)
79
84
{
80
85
        struct ad2s90_state *st;
90
95
        mutex_init(&st->lock);
91
96
        st->sdev = spi;
92
97
 
93
 
        st->idev = iio_allocate_device();
 
98
        st->idev = iio_allocate_device(0);
94
99
        if (st->idev == NULL) {
95
100
                ret = -ENOMEM;
96
101
                goto error_free_st;
97
102
        }
98
103
        st->idev->dev.parent = &spi->dev;
99
 
        st->idev->num_interrupt_lines = 0;
100
 
        st->idev->event_attrs = NULL;
101
104
 
102
 
        st->idev->attrs = &ad2s90_attribute_group;
 
105
        st->idev->info = &ad2s90_info;
103
106
        st->idev->dev_data = (void *)(st);
104
 
        st->idev->driver_module = THIS_MODULE;
105
107
        st->idev->modes = INDIO_DIRECT_MODE;
106
108
 
107
109
        ret = iio_device_register(st->idev);