Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
69d79186
Commit
69d79186
authored
Dec 14, 2007
by
Kyungmin Park
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[MTD] [OneNAND] Use pre-alloced oob buffer instead of local buffer
Signed-off-by:
Kyungmin Park
<
kyungmin.park@samsung.com
>
parent
978cb38a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
drivers/mtd/onenand/onenand_base.c
drivers/mtd/onenand/onenand_base.c
+5
-4
No files found.
drivers/mtd/onenand/onenand_base.c
View file @
69d79186
...
...
@@ -1217,7 +1217,7 @@ int onenand_bbt_read_oob(struct mtd_info *mtd, loff_t from,
static
int
onenand_verify_oob
(
struct
mtd_info
*
mtd
,
const
u_char
*
buf
,
loff_t
to
)
{
struct
onenand_chip
*
this
=
mtd
->
priv
;
u_char
oobbuf
[
64
]
;
u_char
*
oob_buf
=
this
->
oob_buf
;
int
status
,
i
;
this
->
command
(
mtd
,
ONENAND_CMD_READOOB
,
to
,
mtd
->
oobsize
);
...
...
@@ -1226,9 +1226,9 @@ static int onenand_verify_oob(struct mtd_info *mtd, const u_char *buf, loff_t to
if
(
status
)
return
status
;
this
->
read_bufferram
(
mtd
,
ONENAND_SPARERAM
,
oobbuf
,
0
,
mtd
->
oobsize
);
this
->
read_bufferram
(
mtd
,
ONENAND_SPARERAM
,
oob
_
buf
,
0
,
mtd
->
oobsize
);
for
(
i
=
0
;
i
<
mtd
->
oobsize
;
i
++
)
if
(
buf
[
i
]
!=
0xFF
&&
buf
[
i
]
!=
oobbuf
[
i
])
if
(
buf
[
i
]
!=
0xFF
&&
buf
[
i
]
!=
oob
_
buf
[
i
])
return
-
EBADMSG
;
return
0
;
...
...
@@ -2307,7 +2307,8 @@ static int onenand_write_user_prot_reg(struct mtd_info *mtd, loff_t from,
static
int
onenand_lock_user_prot_reg
(
struct
mtd_info
*
mtd
,
loff_t
from
,
size_t
len
)
{
unsigned
char
oob_buf
[
64
];
struct
onenand_chip
*
this
=
mtd
->
priv
;
u_char
*
oob_buf
=
this
->
oob_buf
;
size_t
retlen
;
int
ret
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment