Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-elphel
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
linux-elphel
Commits
d9d60df7
Commit
d9d60df7
authored
Mar 13, 2016
by
Oleg Dzhimiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
little cleanup
parent
8686c289
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
27 deletions
+0
-27
elphel393-init.c
src/drivers/elphel/elphel393-init.c
+0
-27
No files found.
src/drivers/elphel/elphel393-init.c
View file @
d9d60df7
...
...
@@ -153,7 +153,6 @@ static int elphel393_init_probe(struct platform_device *pdev)
loff_t
*
ppos
;
loff_t
pos
;
int
ret
;
char
*
test
;
char
*
ps
,
*
pe
;
pr_debug
(
"Probing"
);
...
...
@@ -218,16 +217,6 @@ static int elphel393_init_probe(struct platform_device *pdev)
if
(
!
boardinfo
)
return
-
ENOMEM
;
//serial = kmalloc(13,GFP_KERNEL);
//if (!serial)
// return -ENOMEM;
// tmp buffer
//kbuf = kmalloc(size,GFP_KERNEL);
//if (!kbuf)
// return -ENOMEM;
while
(
count
){
len
=
min_t
(
size_t
,
count
,
size
);
ret
=
mtd_read_user_prot_reg
(
mtd
,
*
ppos
,
len
,
&
retlen
,
kbuf
);
...
...
@@ -245,29 +234,13 @@ static int elphel393_init_probe(struct platform_device *pdev)
ps
=
strnstr
(
kbuf
,
"<rev>"
,
size
);
pe
=
strnstr
(
kbuf
,
"</rev>"
,
size
);
strncpy
(
revision
,
ps
+
sizeof
(
"<rev>"
)
-
1
,
pe
-
ps
-
(
sizeof
(
"<rev>"
)
-
1
));
strncpy
(
boardinfo
,
kbuf
,
retlen
);
break
;
}
*
ppos
+=
retlen
;
count
-=
retlen
;
}
//kfree(kbuf);
//look in the nand drivers how to do this:
//read the factory info string from NAND flash otp area - look in the 1st page?
//parse the string:
//string start 1st occurence of <board>
//string end 1st occurence of </board>
//parse all of the entries
//<revision>
//<serial>
//mtd_read_user_prot_reg(mtd,(loff_t)0x0,);
//struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, uint8_t *buf
elphel393_init_sysfs_register
(
pdev
);
return
0
;
}
...
...
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