summaryrefslogtreecommitdiffstats
path: root/kernel/arch/blackfin
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/arch/blackfin')
-rw-r--r--kernel/arch/blackfin/include/asm/uaccess.h9
-rw-r--r--kernel/arch/blackfin/mach-bf561/boards/cm_bf561.c3
-rw-r--r--kernel/arch/blackfin/mach-bf561/boards/ezkit.c3
3 files changed, 9 insertions, 6 deletions
diff --git a/kernel/arch/blackfin/include/asm/uaccess.h b/kernel/arch/blackfin/include/asm/uaccess.h
index 90612a7f2..8cd0184ea 100644
--- a/kernel/arch/blackfin/include/asm/uaccess.h
+++ b/kernel/arch/blackfin/include/asm/uaccess.h
@@ -177,11 +177,12 @@ static inline int bad_user_access_length(void)
static inline unsigned long __must_check
copy_from_user(void *to, const void __user *from, unsigned long n)
{
- if (access_ok(VERIFY_READ, from, n))
+ if (likely(access_ok(VERIFY_READ, from, n))) {
memcpy(to, (const void __force *)from, n);
- else
- return n;
- return 0;
+ return 0;
+ }
+ memset(to, 0, n);
+ return n;
}
static inline unsigned long __must_check
diff --git a/kernel/arch/blackfin/mach-bf561/boards/cm_bf561.c b/kernel/arch/blackfin/mach-bf561/boards/cm_bf561.c
index c6db52ba3..10c577718 100644
--- a/kernel/arch/blackfin/mach-bf561/boards/cm_bf561.c
+++ b/kernel/arch/blackfin/mach-bf561/boards/cm_bf561.c
@@ -146,7 +146,8 @@ static struct platform_device hitachi_fb_device = {
#include <linux/smc91x.h>
static struct smc91x_platdata smc91x_info = {
- .flags = SMC91X_USE_32BIT | SMC91X_NOWAIT,
+ .flags = SMC91X_USE_8BIT | SMC91X_USE_16BIT | SMC91X_USE_32BIT |
+ SMC91X_NOWAIT,
.leda = RPC_LED_100_10,
.ledb = RPC_LED_TX_RX,
};
diff --git a/kernel/arch/blackfin/mach-bf561/boards/ezkit.c b/kernel/arch/blackfin/mach-bf561/boards/ezkit.c
index 2de71e8c1..93c22468c 100644
--- a/kernel/arch/blackfin/mach-bf561/boards/ezkit.c
+++ b/kernel/arch/blackfin/mach-bf561/boards/ezkit.c
@@ -134,7 +134,8 @@ static struct platform_device net2272_bfin_device = {
#include <linux/smc91x.h>
static struct smc91x_platdata smc91x_info = {
- .flags = SMC91X_USE_32BIT | SMC91X_NOWAIT,
+ .flags = SMC91X_USE_8BIT | SMC91X_USE_16BIT | SMC91X_USE_32BIT |
+ SMC91X_NOWAIT,
.leda = RPC_LED_100_10,
.ledb = RPC_LED_TX_RX,
};