On 10/25/11 09:33, michael.hennerich@xxxxxxxxxx wrote: > From: Michael Hennerich <michael.hennerich@xxxxxxxxxx> > > This patch type casts the switch control variable to 32 bits in order to > prevent a call __ucmpdi2 generated by some versions of gcc. > > This fixes an undefined reference to `__ucmpdi2' when compiled for arch/blackfin Yikes, we'll have to be careful with this one. > > Signed-off-by: Michael Hennerich <michael.hennerich@xxxxxxxxxx> Acked-by: Jonathan Cameron <jic23@xxxxxxxxx> > --- > drivers/staging/iio/adc/ad7192.c | 2 +- > drivers/staging/iio/adc/ad7280a.c | 6 +++--- > drivers/staging/iio/dds/ad9832.c | 2 +- > drivers/staging/iio/dds/ad9834.c | 4 ++-- > drivers/staging/iio/impedance-analyzer/ad5933.c | 4 ++-- > 5 files changed, 9 insertions(+), 9 deletions(-) > > diff --git a/drivers/staging/iio/adc/ad7192.c b/drivers/staging/iio/adc/ad7192.c > index 31c376b..d8bf559 100644 > --- a/drivers/staging/iio/adc/ad7192.c > +++ b/drivers/staging/iio/adc/ad7192.c > @@ -795,7 +795,7 @@ static ssize_t ad7192_set(struct device *dev, > return -EBUSY; > } > > - switch (this_attr->address) { > + switch ((u32) this_attr->address) { > case AD7192_REG_GPOCON: > if (val) > st->gpocon |= AD7192_GPOCON_BPDSW; > diff --git a/drivers/staging/iio/adc/ad7280a.c b/drivers/staging/iio/adc/ad7280a.c > index 372d059..0c212e0 100644 > --- a/drivers/staging/iio/adc/ad7280a.c > +++ b/drivers/staging/iio/adc/ad7280a.c > @@ -600,7 +600,7 @@ static ssize_t ad7280_read_channel_config(struct device *dev, > struct iio_dev_attr *this_attr = to_iio_dev_attr(attr); > unsigned val; > > - switch (this_attr->address) { > + switch ((u32) this_attr->address) { > case AD7280A_CELL_OVERVOLTAGE: > val = 1000 + (st->cell_threshhigh * 1568) / 100; > break; > @@ -636,7 +636,7 @@ static ssize_t ad7280_write_channel_config(struct device *dev, > if (ret) > return ret; > > - switch (this_attr->address) { > + switch ((u32) this_attr->address) { > case AD7280A_CELL_OVERVOLTAGE: > case AD7280A_CELL_UNDERVOLTAGE: > val = ((val - 1000) * 100) / 1568; /* LSB 15.68mV */ > @@ -652,7 +652,7 @@ static ssize_t ad7280_write_channel_config(struct device *dev, > val = clamp(val, 0L, 0xFFL); > > mutex_lock(&indio_dev->mlock); > - switch (this_attr->address) { > + switch ((u32) this_attr->address) { > case AD7280A_CELL_OVERVOLTAGE: > st->cell_threshhigh = val; > break; > diff --git a/drivers/staging/iio/dds/ad9832.c b/drivers/staging/iio/dds/ad9832.c > index 0db0b3a..ef0be2c 100644 > --- a/drivers/staging/iio/dds/ad9832.c > +++ b/drivers/staging/iio/dds/ad9832.c > @@ -88,7 +88,7 @@ static ssize_t ad9832_write(struct device *dev, > goto error_ret; > > mutex_lock(&indio_dev->mlock); > - switch (this_attr->address) { > + switch ((u32) this_attr->address) { > case AD9832_FREQ0HM: > case AD9832_FREQ1HM: > ret = ad9832_write_frequency(st, this_attr->address, val); > diff --git a/drivers/staging/iio/dds/ad9834.c b/drivers/staging/iio/dds/ad9834.c > index c468f69..2e29f6f 100644 > --- a/drivers/staging/iio/dds/ad9834.c > +++ b/drivers/staging/iio/dds/ad9834.c > @@ -77,7 +77,7 @@ static ssize_t ad9834_write(struct device *dev, > goto error_ret; > > mutex_lock(&indio_dev->mlock); > - switch (this_attr->address) { > + switch ((u32) this_attr->address) { > case AD9834_REG_FREQ0: > case AD9834_REG_FREQ1: > ret = ad9834_write_frequency(st, this_attr->address, val); > @@ -153,7 +153,7 @@ static ssize_t ad9834_store_wavetype(struct device *dev, > > mutex_lock(&indio_dev->mlock); > > - switch (this_attr->address) { > + switch ((u32) this_attr->address) { > case 0: > if (sysfs_streq(buf, "sine")) { > st->control &= ~AD9834_MODE; > diff --git a/drivers/staging/iio/impedance-analyzer/ad5933.c b/drivers/staging/iio/impedance-analyzer/ad5933.c > index 1086e0b..ece7707 100644 > --- a/drivers/staging/iio/impedance-analyzer/ad5933.c > +++ b/drivers/staging/iio/impedance-analyzer/ad5933.c > @@ -329,7 +329,7 @@ static ssize_t ad5933_show(struct device *dev, > int ret = 0, len = 0; > > mutex_lock(&indio_dev->mlock); > - switch (this_attr->address) { > + switch ((u32) this_attr->address) { > case AD5933_OUT_RANGE: > len = sprintf(buf, "%d\n", > st->range_avail[(st->ctrl_hb >> 1) & 0x3]); > @@ -380,7 +380,7 @@ static ssize_t ad5933_store(struct device *dev, > } > > mutex_lock(&indio_dev->mlock); > - switch (this_attr->address) { > + switch ((u32) this_attr->address) { > case AD5933_OUT_RANGE: > for (i = 0; i < 4; i++) > if (val == st->range_avail[i]) { -- To unsubscribe from this list: send the line "unsubscribe linux-iio" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html