From: Bill Pemberton Date: Tue, 17 Mar 2009 02:06:31 +0000 (-0400) Subject: Staging: comedi: Remove comedi_krange typedef X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1f6325d629ce03501e8927480495685828561f26;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git Staging: comedi: Remove comedi_krange typedef Signed-off-by: Bill Pemberton Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/comedi.h b/drivers/staging/comedi/comedi.h index 82298faac2c3..079cb6e80c7e 100644 --- a/drivers/staging/comedi/comedi.h +++ b/drivers/staging/comedi/comedi.h @@ -310,7 +310,6 @@ enum comedi_support_level { /* structures */ -typedef struct comedi_krange_struct comedi_krange; typedef struct comedi_bufconfig_struct comedi_bufconfig; typedef struct comedi_bufinfo_struct comedi_bufinfo; @@ -382,7 +381,7 @@ struct comedi_rangeinfo { void *range_ptr; }; -struct comedi_krange_struct { +struct comedi_krange { int min; /* fixed point, multiply by 1e-6 */ int max; /* fixed point, multiply by 1e-6 */ unsigned int flags; diff --git a/drivers/staging/comedi/comedidev.h b/drivers/staging/comedi/comedidev.h index 15e457a0cd9e..ea319360ae68 100644 --- a/drivers/staging/comedi/comedidev.h +++ b/drivers/staging/comedi/comedidev.h @@ -409,7 +409,7 @@ extern const struct comedi_lrange range_unknown; struct comedi_lrange { int length; - comedi_krange range[GCC_ZERO_LENGTH_ARRAY]; + struct comedi_krange range[GCC_ZERO_LENGTH_ARRAY]; }; /* some silly little inline functions */ diff --git a/drivers/staging/comedi/comedilib.h b/drivers/staging/comedi/comedilib.h index f27ef837c3d2..c2729312d57e 100644 --- a/drivers/staging/comedi/comedilib.h +++ b/drivers/staging/comedi/comedilib.h @@ -103,7 +103,7 @@ int comedi_get_rangetype(void *dev, unsigned int subdevice, unsigned int comedi_get_subdevice_flags(void *dev, unsigned int subdevice); int comedi_get_len_chanlist(void *dev, unsigned int subdevice); int comedi_get_krange(void *dev, unsigned int subdevice, unsigned int - chan, unsigned int range, comedi_krange *krange); + chan, unsigned int range, struct comedi_krange *krange); unsigned int comedi_get_buf_head_pos(void *dev, unsigned int subdevice); int comedi_set_user_int_count(void *dev, unsigned int subdevice, unsigned int buf_user_count); @@ -177,7 +177,7 @@ unsigned int comedi_get_subdevice_flags(unsigned int minor, unsigned int subdevice); int comedi_get_len_chanlist(unsigned int minor, unsigned int subdevice); int comedi_get_krange(unsigned int minor, unsigned int subdevice, unsigned int - chan, unsigned int range, comedi_krange *krange); + chan, unsigned int range, struct comedi_krange *krange); unsigned int comedi_get_buf_head_pos(unsigned int minor, unsigned int subdevice); int comedi_set_user_int_count(unsigned int minor, unsigned int subdevice, diff --git a/drivers/staging/comedi/drivers/cb_pcidas64.c b/drivers/staging/comedi/drivers/cb_pcidas64.c index b6fc5c119701..707e3ccc9d72 100644 --- a/drivers/staging/comedi/drivers/cb_pcidas64.c +++ b/drivers/staging/comedi/drivers/cb_pcidas64.c @@ -1203,7 +1203,7 @@ COMEDI_PCI_INITCLEANUP(driver_cb_pcidas, pcidas64_pci_table); static unsigned int ai_range_bits_6xxx(const struct comedi_device * dev, unsigned int range_index) { - const comedi_krange *range = + const struct comedi_krange *range = &board(dev)->ai_range_table->range[range_index]; unsigned int bits = 0; diff --git a/drivers/staging/comedi/drivers/comedi_test.c b/drivers/staging/comedi/drivers/comedi_test.c index a31817b12629..e679328a4f8f 100644 --- a/drivers/staging/comedi/drivers/comedi_test.c +++ b/drivers/staging/comedi/drivers/comedi_test.c @@ -442,7 +442,7 @@ static short fake_sawtooth(struct comedi_device *dev, unsigned int range_index, struct comedi_subdevice *s = dev->read_subdev; unsigned int offset = s->maxdata / 2; u64 value; - const comedi_krange *krange = &s->range_table->range[range_index]; + const struct comedi_krange *krange = &s->range_table->range[range_index]; u64 binary_amplitude; binary_amplitude = s->maxdata; @@ -463,7 +463,7 @@ static short fake_squarewave(struct comedi_device *dev, unsigned int range_index struct comedi_subdevice *s = dev->read_subdev; unsigned int offset = s->maxdata / 2; u64 value; - const comedi_krange *krange = &s->range_table->range[range_index]; + const struct comedi_krange *krange = &s->range_table->range[range_index]; current_time %= devpriv->usec_period; value = s->maxdata; diff --git a/drivers/staging/comedi/drivers/das16.c b/drivers/staging/comedi/drivers/das16.c index b959ba8e29fb..0219c32e853c 100644 --- a/drivers/staging/comedi/drivers/das16.c +++ b/drivers/staging/comedi/drivers/das16.c @@ -1375,7 +1375,7 @@ static int das16_attach(struct comedi_device * dev, struct comedi_devconfig * it unsigned int dma_chan; int timer_mode; unsigned long flags; - comedi_krange *user_ai_range, *user_ao_range; + struct comedi_krange *user_ai_range, *user_ao_range; iobase = it->options[0]; #if 0 @@ -1496,7 +1496,7 @@ static int das16_attach(struct comedi_device * dev, struct comedi_devconfig * it (it->options[4] || it->options[5])) { // allocate single-range range table devpriv->user_ai_range_table = - kmalloc(sizeof(struct comedi_lrange) + sizeof(comedi_krange), + kmalloc(sizeof(struct comedi_lrange) + sizeof(struct comedi_krange), GFP_KERNEL); // initialize ai range devpriv->user_ai_range_table->length = 1; @@ -1509,7 +1509,7 @@ static int das16_attach(struct comedi_device * dev, struct comedi_devconfig * it if (it->options[6] || it->options[7]) { // allocate single-range range table devpriv->user_ao_range_table = - kmalloc(sizeof(struct comedi_lrange) + sizeof(comedi_krange), + kmalloc(sizeof(struct comedi_lrange) + sizeof(struct comedi_krange), GFP_KERNEL); // initialize ao range devpriv->user_ao_range_table->length = 1; diff --git a/drivers/staging/comedi/drivers/jr3_pci.c b/drivers/staging/comedi/drivers/jr3_pci.c index 8f481b545643..bb0e499d8b83 100644 --- a/drivers/staging/comedi/drivers/jr3_pci.c +++ b/drivers/staging/comedi/drivers/jr3_pci.c @@ -156,7 +156,7 @@ typedef struct { int model_no; struct { int length; - comedi_krange range; + struct comedi_krange range; } range[9]; const struct comedi_lrange *range_table_list[8 * 7 + 2]; unsigned int maxdata_list[8 * 7 + 2]; diff --git a/drivers/staging/comedi/drivers/ni_mio_common.c b/drivers/staging/comedi/drivers/ni_mio_common.c index ce8c704565d2..542bd0dcd44d 100644 --- a/drivers/staging/comedi/drivers/ni_mio_common.c +++ b/drivers/staging/comedi/drivers/ni_mio_common.c @@ -2818,7 +2818,7 @@ static int ni_m_series_ao_config_chanlist(struct comedi_device * dev, } } for (i = 0; i < n_chans; i++) { - const comedi_krange *krange; + const struct comedi_krange *krange; chan = CR_CHAN(chanspec[i]); range = CR_RANGE(chanspec[i]); krange = s->range_table->range + range; diff --git a/drivers/staging/comedi/drivers/serial2002.c b/drivers/staging/comedi/drivers/serial2002.c index ca41baa37645..96430d2955b1 100644 --- a/drivers/staging/comedi/drivers/serial2002.c +++ b/drivers/staging/comedi/drivers/serial2002.c @@ -63,7 +63,7 @@ static const serial2002_board serial2002_boards[] = { typedef struct { // HACK... int length; - comedi_krange range; + struct comedi_krange range; } serial2002_range_table_t; typedef struct { diff --git a/drivers/staging/comedi/kcomedilib/get.c b/drivers/staging/comedi/kcomedilib/get.c index a7d4ff638444..b6b726a69f14 100644 --- a/drivers/staging/comedi/kcomedilib/get.c +++ b/drivers/staging/comedi/kcomedilib/get.c @@ -149,7 +149,7 @@ int comedi_get_n_ranges(void *d, unsigned int subdevice, unsigned int chan) * ALPHA (non-portable) */ int comedi_get_krange(void *d, unsigned int subdevice, unsigned int chan, - unsigned int range, comedi_krange *krange) + unsigned int range, struct comedi_krange *krange) { struct comedi_device *dev = (struct comedi_device *) d; struct comedi_subdevice *s = dev->subdevices + subdevice; @@ -163,7 +163,7 @@ int comedi_get_krange(void *d, unsigned int subdevice, unsigned int chan, if (range >= lr->length) return -EINVAL; - memcpy(krange, lr->range + range, sizeof(comedi_krange)); + memcpy(krange, lr->range + range, sizeof(struct comedi_krange)); return 0; } diff --git a/drivers/staging/comedi/range.c b/drivers/staging/comedi/range.c index 3778873cd5e7..ac200d929f35 100644 --- a/drivers/staging/comedi/range.c +++ b/drivers/staging/comedi/range.c @@ -42,7 +42,7 @@ const struct comedi_lrange range_unknown = { 1, {{0, 1000000, UNIT_none}} }; range info structure writes: - n comedi_krange structures to rangeinfo->range_ptr + n struct comedi_krange structures to rangeinfo->range_ptr */ int do_rangeinfo_ioctl(struct comedi_device *dev, struct comedi_rangeinfo *arg) { @@ -78,7 +78,7 @@ int do_rangeinfo_ioctl(struct comedi_device *dev, struct comedi_rangeinfo *arg) } if (copy_to_user(it.range_ptr, lr->range, - sizeof(comedi_krange) * lr->length)) + sizeof(struct comedi_krange) * lr->length)) return -EFAULT; return 0;