projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
de591da
)
[MTD] Use SEEK_{SET,CUR,END} instead of hardcoded values in mtdchar lseek()
author
Josef 'Jeff' Sipek
<jeffpc@josefsipek.net>
Sun, 17 Sep 2006 01:09:29 +0000
(21:09 -0400)
committer
David Woodhouse
<dwmw2@infradead.org>
Sun, 17 Sep 2006 16:04:23 +0000
(17:04 +0100)
Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
drivers/mtd/mtdchar.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/mtd/mtdchar.c
b/drivers/mtd/mtdchar.c
index fb8b4f7e48d3a14a295f5661b9014908f1110dd4..5b6acfcb2b880be00cc77be7abafbf0c71b264da 100644
(file)
--- a/
drivers/mtd/mtdchar.c
+++ b/
drivers/mtd/mtdchar.c
@@
-62,15
+62,12
@@
static loff_t mtd_lseek (struct file *file, loff_t offset, int orig)
struct mtd_info *mtd = mfi->mtd;
switch (orig) {
- case 0:
- /* SEEK_SET */
+ case SEEK_SET:
break;
- case 1:
- /* SEEK_CUR */
+ case SEEK_CUR:
offset += file->f_pos;
break;
- case 2:
- /* SEEK_END */
+ case SEEK_END:
offset += mtd->size;
break;
default: