From: Andreas Ruprecht Date: Fri, 2 Dec 2011 16:56:55 +0000 (+0100) Subject: Staging: iio/accel: Changed data type of mask in store_measurement_mode() to u8 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=bba42776f5bade198d3bf918689da02acb63dadb;p=mv-sheeva.git Staging: iio/accel: Changed data type of mask in store_measurement_mode() to u8 In sca3000_store_measurement_mode() we parse a value from a string buffer via kstrtou8, and store the parsed value into a u8 after and-ing it with mask. As we are only interested in the lowest two bits here and mask is initialized with a fixed value 0x03, mask may as well be a u8. Signed-off-by: Andreas Ruprecht Acked-by: Jonathan Cameron Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/iio/accel/sca3000_core.c b/drivers/staging/iio/accel/sca3000_core.c index 12ee6f8d375..12f1e4bc769 100644 --- a/drivers/staging/iio/accel/sca3000_core.c +++ b/drivers/staging/iio/accel/sca3000_core.c @@ -382,7 +382,7 @@ sca3000_store_measurement_mode(struct device *dev, struct iio_dev *indio_dev = dev_get_drvdata(dev); struct sca3000_state *st = iio_priv(indio_dev); int ret; - int mask = 0x03; + u8 mask = 0x03; u8 val; mutex_lock(&st->lock);