diff options
author | Michael Hennerich <michael.hennerich@analog.com> | 2011-10-25 08:51:04 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-11-27 00:28:56 (GMT) |
commit | e15fbc91a4304a977ed99c3eb21bab7015e86c11 (patch) | |
tree | b1cfbe3c7800f9f9192ea4a3a7e6a9df2e049d07 /drivers/staging/iio/dds | |
parent | 53b99be7647bc1d821a817c58d1504547ca0c75f (diff) | |
download | linux-fsl-qoriq-e15fbc91a4304a977ed99c3eb21bab7015e86c11.tar.xz |
iio: introduce type casts to avoid __ucmpdi2 calls
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
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/iio/dds')
-rw-r--r-- | drivers/staging/iio/dds/ad9832.c | 2 | ||||
-rw-r--r-- | drivers/staging/iio/dds/ad9834.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/drivers/staging/iio/dds/ad9832.c b/drivers/staging/iio/dds/ad9832.c index 9b4ff60..b58baec4 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; |