From 0a12962e327153aa05dab8982a989287eba4bee3 Mon Sep 17 00:00:00 2001 From: James Maki Date: Fri, 10 Sep 2010 10:34:47 -0500 Subject: clean up formatting --- io-module/mts_io.c | 34 ++++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/io-module/mts_io.c b/io-module/mts_io.c index e91bcb2..e683af1 100644 --- a/io-module/mts_io.c +++ b/io-module/mts_io.c @@ -385,8 +385,8 @@ static inline int spi_readn(struct spi_device *spi, u8 *buf, size_t len) void __iomem *adc_base; struct clk *adc_clk; -#define ADC_CONVERT_RESET(base) writel(0x01, base + ADC_CR_OFFSET) -#define ADC_CONVERT_START(base) writel(0x02, base + ADC_CR_OFFSET) +#define ADC_CONVERT_RESET(base) writel(0x01, (base) + ADC_CR_OFFSET) +#define ADC_CONVERT_START(base) writel(0x02, (base) + ADC_CR_OFFSET) #define BLINK_PER_SEC 8 #define BLINK_INTERVAL (HZ / BLINK_PER_SEC) @@ -617,15 +617,20 @@ static ssize_t mts_attr_store_sout(struct device *dev, bit = SOUT_EXTSERIAL_DSR_BIT; } else if (!strcmp(attr->attr.name, "extserial-dcd")) { bit = SOUT_EXTSERIAL_DCD_BIT; - } else if (!strcmp(attr->attr.name, "led-cd") || !strcmp(attr->attr.name, "led-sdk-b")) { + } else if (!strcmp(attr->attr.name, "led-cd") || + !strcmp(attr->attr.name, "led-sdk-b")) { bit = SOUT_LED_CD_BIT; - } else if (!strcmp(attr->attr.name, "led-dtr") || !strcmp(attr->attr.name, "led-sdk-f")) { + } else if (!strcmp(attr->attr.name, "led-dtr") || + !strcmp(attr->attr.name, "led-sdk-f")) { bit = SOUT_LED_DTR; - } else if (!strcmp(attr->attr.name, "led-sig1") || !strcmp(attr->attr.name, "led-sdk-c")) { + } else if (!strcmp(attr->attr.name, "led-sig1") || + !strcmp(attr->attr.name, "led-sdk-c")) { bit = SOUT_LED_SIG1_BIT; - } else if (!strcmp(attr->attr.name, "led-sig2") || !strcmp(attr->attr.name, "led-sdk-d")) { + } else if (!strcmp(attr->attr.name, "led-sig2") || + !strcmp(attr->attr.name, "led-sdk-d")) { bit = SOUT_LED_SIG2_BIT; - } else if (!strcmp(attr->attr.name, "led-sig3") || !strcmp(attr->attr.name, "led-sdk-e")) { + } else if (!strcmp(attr->attr.name, "led-sig3") || + !strcmp(attr->attr.name, "led-sdk-e")) { bit = SOUT_LED_SIG3_BIT; } else { log_notice("sout attr does not exists"); @@ -669,15 +674,20 @@ static ssize_t mts_attr_show_sout(struct device *dev, bit = SOUT_EXTSERIAL_DSR_BIT; } else if (!strcmp(attr->attr.name, "extserial-dcd")) { bit = SOUT_EXTSERIAL_DCD_BIT; - } else if (!strcmp(attr->attr.name, "led-cd") || !strcmp(attr->attr.name, "led-sdk-b")) { + } else if (!strcmp(attr->attr.name, "led-cd") || + !strcmp(attr->attr.name, "led-sdk-b")) { bit = SOUT_LED_CD_BIT; - } else if (!strcmp(attr->attr.name, "led-dtr") || !strcmp(attr->attr.name, "led-sdk-f")) { + } else if (!strcmp(attr->attr.name, "led-dtr") || + !strcmp(attr->attr.name, "led-sdk-f")) { bit = SOUT_LED_DTR; - } else if (!strcmp(attr->attr.name, "led-sig1") || !strcmp(attr->attr.name, "led-sdk-c")) { + } else if (!strcmp(attr->attr.name, "led-sig1") || + !strcmp(attr->attr.name, "led-sdk-c")) { bit = SOUT_LED_SIG1_BIT; - } else if (!strcmp(attr->attr.name, "led-sig2") || !strcmp(attr->attr.name, "led-sdk-d")) { + } else if (!strcmp(attr->attr.name, "led-sig2") || + !strcmp(attr->attr.name, "led-sdk-d")) { bit = SOUT_LED_SIG2_BIT; - } else if (!strcmp(attr->attr.name, "led-sig3") || !strcmp(attr->attr.name, "led-sdk-e")) { + } else if (!strcmp(attr->attr.name, "led-sig3") || + !strcmp(attr->attr.name, "led-sdk-e")) { bit = SOUT_LED_SIG3_BIT; } else { log_notice("sout attr does not exists"); -- cgit v1.2.3