Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci-2.6.23
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci-2.6.23
Commits
22c60f5f
Commit
22c60f5f
authored
Apr 04, 2005
by
Thomas Gleixner
Committed by
Thomas Gleixner
May 23, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[MTD] NAND: Move the NULL check into the calling function
Signed-off-by:
Thomas Gleixner
<
tglx@linutronix.de
>
parent
bb75ba4c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
drivers/mtd/nand/nand_base.c
drivers/mtd/nand/nand_base.c
+8
-8
No files found.
drivers/mtd/nand/nand_base.c
View file @
22c60f5f
...
...
@@ -59,7 +59,7 @@
* The AG-AND chips have nice features for speed improvement,
* which are not supported yet. Read / program 4 pages in one go.
*
* $Id: nand_base.c,v 1.1
39 2005/04/04 18:02:23 dbrown
Exp $
* $Id: nand_base.c,v 1.1
40 2005/04/04 18:56:29 gleixner
Exp $
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
...
...
@@ -1060,8 +1060,8 @@ out:
*/
static
int
nand_read
(
struct
mtd_info
*
mtd
,
loff_t
from
,
size_t
len
,
size_t
*
retlen
,
u_char
*
buf
)
{
return
nand_do_read_ecc
(
mtd
,
from
,
len
,
retlen
,
buf
,
NULL
,
NULL
,
0xff
);
}
return
nand_do_read_ecc
(
mtd
,
from
,
len
,
retlen
,
buf
,
NULL
,
&
mtd
->
oobinfo
,
0xff
);
}
/**
...
...
@@ -1079,6 +1079,9 @@ static int nand_read (struct mtd_info *mtd, loff_t from, size_t len, size_t * re
static
int
nand_read_ecc
(
struct
mtd_info
*
mtd
,
loff_t
from
,
size_t
len
,
size_t
*
retlen
,
u_char
*
buf
,
u_char
*
oob_buf
,
struct
nand_oobinfo
*
oobsel
)
{
/* use userspace supplied oobinfo, if zero */
if
(
oobsel
==
NULL
)
oobsel
=
&
mtd
->
oobinfo
;
return
nand_do_read_ecc
(
mtd
,
from
,
len
,
retlen
,
buf
,
oob_buf
,
oobsel
,
0xff
);
}
...
...
@@ -1091,7 +1094,7 @@ static int nand_read_ecc (struct mtd_info *mtd, loff_t from, size_t len,
* @retlen: pointer to variable to store the number of read bytes
* @buf: the databuffer to put data
* @oob_buf: filesystem supplied oob data buffer (can be NULL)
* @oobsel: oob selection structure
(can be NULL)
* @oobsel: oob selection structure
* @flags: flag to indicate if nand_get_device/nand_release_device should be preformed
* and how many corrected error bits are acceptable:
* bits 0..7 - number of tolerable errors
...
...
@@ -1103,10 +1106,7 @@ int nand_do_read_ecc (struct mtd_info *mtd, loff_t from, size_t len,
size_t
*
retlen
,
u_char
*
buf
,
u_char
*
oob_buf
,
struct
nand_oobinfo
*
oobsel
,
int
flags
)
{
/* use userspace supplied oobinfo, if zero */
if
(
oobsel
==
NULL
)
oobsel
=
&
mtd
->
oobinfo
;
int
i
,
j
,
col
,
realpage
,
page
,
end
,
ecc
,
chipnr
,
sndcmd
=
1
;
int
read
=
0
,
oob
=
0
,
ecc_status
=
0
,
ecc_failed
=
0
;
struct
nand_chip
*
this
=
mtd
->
priv
;
...
...
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