diff options
author | James Maki <jmaki@multitech.com> | 2010-09-10 10:34:47 -0500 |
---|---|---|
committer | James Maki <jmaki@multitech.com> | 2010-09-10 10:34:47 -0500 |
commit | 0a12962e327153aa05dab8982a989287eba4bee3 (patch) | |
tree | fc8fa8981812e404820684d298fb8994c7a7ae8c | |
parent | d91650c87d5cf593087e9b14bf7ce7dda63b8fe3 (diff) | |
download | cdp-io-controller-0a12962e327153aa05dab8982a989287eba4bee3.tar.gz cdp-io-controller-0a12962e327153aa05dab8982a989287eba4bee3.tar.bz2 cdp-io-controller-0a12962e327153aa05dab8982a989287eba4bee3.zip |
clean up formatting
-rw-r--r-- | io-module/mts_io.c | 34 |
1 files 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"); |