aboutsummaryrefslogtreecommitdiffstats
path: root/package/mtd/src/jffs2.c
diff options
context:
space:
mode:
Diffstat (limited to 'package/mtd/src/jffs2.c')
-rw-r--r--package/mtd/src/jffs2.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/package/mtd/src/jffs2.c b/package/mtd/src/jffs2.c
index 512f22278c..aaf9be5a92 100644
--- a/package/mtd/src/jffs2.c
+++ b/package/mtd/src/jffs2.c
@@ -244,9 +244,9 @@ int mtd_replace_jffs2(const char *mtd, int fd, int ofs, const char *filename)
pad(erasesize);
free(buf);
-#ifdef target_brcm
- trx_fixup(outfd, mtd);
-#endif
+ if (trx_fixup) {
+ trx_fixup(outfd, mtd);
+ }
return (mtdofs - ofs);
}
@@ -347,9 +347,9 @@ int mtd_write_jffs2(const char *mtd, const char *filename, const char *dir)
err = 0;
-#ifdef target_brcm
- trx_fixup(outfd, mtd);
-#endif
+ if (trx_fixup) {
+ trx_fixup(outfd, mtd);
+ }
done:
close(outfd);