From 90dc5a173cdf2f10330605eaf685a3bd2d277e88 Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Tue, 22 Sep 2009 00:24:14 +0200 Subject: [PATCH] jz4740-ac: Fix some small bugs --- target/linux/xburst/files-2.6.31/drivers/misc/jz4740-adc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/linux/xburst/files-2.6.31/drivers/misc/jz4740-adc.c b/target/linux/xburst/files-2.6.31/drivers/misc/jz4740-adc.c index eb034055a..7da3bccc3 100644 --- a/target/linux/xburst/files-2.6.31/drivers/misc/jz4740-adc.c +++ b/target/linux/xburst/files-2.6.31/drivers/misc/jz4740-adc.c @@ -161,7 +161,7 @@ uint32_t val) cfg = readl(adc->base + JZ_REG_ADC_CFG); - cfg &= mask; + cfg &= ~mask; cfg |= val; writel(cfg, adc->base + JZ_REG_ADC_CFG); @@ -293,7 +293,7 @@ static int __devinit jz4740_adc_probe(struct platform_device *pdev) } ret = device_create_file(&pdev->dev, &dev_attr_adcin); - if (!ret) { + if (ret) { dev_err(&pdev->dev, "Failed to create sysfs file: %d\n", ret); goto err_free_irq; }