summaryrefslogtreecommitdiff
path: root/target/linux/rdc-2.6/files
diff options
context:
space:
mode:
authornico <nico@3c298f89-4303-0410-b956-a3cf2f4a3e73>2007-09-01 05:25:44 +0000
committernico <nico@3c298f89-4303-0410-b956-a3cf2f4a3e73>2007-09-01 05:25:44 +0000
commit947d2b4338bf25e837e9a39ff3b86b51df68981d (patch)
tree866f594e2775e31272cf42c442db060512547fd8 /target/linux/rdc-2.6/files
parentba66ef99cb91896fe3b3de47c4f0b3406288e9e3 (diff)
small rdc-2.6 fixes (from sn9, thanks!)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@8568 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/rdc-2.6/files')
-rw-r--r--target/linux/rdc-2.6/files/arch/i386/mach-rdc/gpio.c4
-rw-r--r--target/linux/rdc-2.6/files/arch/i386/mach-rdc/wdt.c5
2 files changed, 4 insertions, 5 deletions
diff --git a/target/linux/rdc-2.6/files/arch/i386/mach-rdc/gpio.c b/target/linux/rdc-2.6/files/arch/i386/mach-rdc/gpio.c
index 2c3886771d..dbd03270f1 100644
--- a/target/linux/rdc-2.6/files/arch/i386/mach-rdc/gpio.c
+++ b/target/linux/rdc-2.6/files/arch/i386/mach-rdc/gpio.c
@@ -19,7 +19,7 @@
static inline int rdc_gpio_is_valid(unsigned gpio)
{
- return ((gpio > RDC_MAX_GPIO) ? 0 : 1);
+ return (gpio <= RDC_MAX_GPIO);
}
static unsigned int rdc_gpio_read(unsigned gpio)
@@ -53,6 +53,8 @@ int rdc_gpio_get_value(unsigned gpio)
{
if (rdc_gpio_is_valid(gpio))
return (int)rdc_gpio_read(gpio);
+ else
+ return -EINVAL;
}
EXPORT_SYMBOL(rdc_gpio_get_value);
diff --git a/target/linux/rdc-2.6/files/arch/i386/mach-rdc/wdt.c b/target/linux/rdc-2.6/files/arch/i386/mach-rdc/wdt.c
index 12ae4c5ec1..39956f35a7 100644
--- a/target/linux/rdc-2.6/files/arch/i386/mach-rdc/wdt.c
+++ b/target/linux/rdc-2.6/files/arch/i386/mach-rdc/wdt.c
@@ -212,7 +212,7 @@ static int __devinit rdc321x_wdt_probe(struct platform_device *pdev)
if ( (err = misc_register(&rdc321x_wdt_misc)) < 0 ) {
printk(KERN_ERR PFX "misc_register failed\n");
- goto no_misc;
+ return err;
}
/* Reset the watchdog */
@@ -230,9 +230,6 @@ static int __devinit rdc321x_wdt_probe(struct platform_device *pdev)
printk(KERN_INFO PFX "init success\n");
return 0;
-
-no_misc:
- return err;
}
static int rdc321x_wdt_remove(struct platform_device *pdev)