From: aleph Date: Fri, 6 May 2011 17:13:30 +0000 (+0000) Subject: mt29f driver: initialize correctly kblock virtual table when unbuffered. X-Git-Tag: 2.7.0~86 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=df4e6ced4e1f46eaaa79359e71860f99f30e08cb;p=bertos.git mt29f driver: initialize correctly kblock virtual table when unbuffered. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4880 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/bertos/cpu/cortex-m3/drv/mt29f_sam3.c b/bertos/cpu/cortex-m3/drv/mt29f_sam3.c index 73faca1d..30afed07 100644 --- a/bertos/cpu/cortex-m3/drv/mt29f_sam3.c +++ b/bertos/cpu/cortex-m3/drv/mt29f_sam3.c @@ -877,8 +877,11 @@ bool mt29f_init(Mt29f *chip, struct Heap *heap, unsigned chip_select) bool mt29f_initUnbuffered(Mt29f *chip, struct Heap *heap, unsigned chip_select) { + if (!commonInit(chip, heap, chip_select)) + return false; + chip->fd.priv.vt = &mt29f_unbuffered_vt; - return commonInit(chip, heap, chip_select); + return true; }