kernel: Make the patches apply on top of 4.19
[openwrt/openwrt.git] / target / linux / generic / pending-4.19 / 404-mtd-add-more-helper-functions.patch
index 94c59df01dcf26e66659f57b7d45bdad30364d0c..f50d933e1bc7d73af1aa713343a6917963d75df1 100644 (file)
@@ -11,7 +11,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
 
 --- a/drivers/mtd/mtdpart.c
 +++ b/drivers/mtd/mtdpart.c
-@@ -1235,6 +1235,24 @@ int mtd_is_partition(const struct mtd_in
+@@ -1190,6 +1190,24 @@ int mtd_is_partition(const struct mtd_in
  }
  EXPORT_SYMBOL_GPL(mtd_is_partition);
  
@@ -38,8 +38,8 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
  {
 --- a/include/linux/mtd/mtd.h
 +++ b/include/linux/mtd/mtd.h
-@@ -494,6 +494,24 @@ static inline uint32_t mtd_mod_by_eb(uin
-       return do_div(sz, mtd->erasesize);
+@@ -507,6 +507,24 @@ static inline void mtd_align_erase_req(s
+               req->len += mtd->erasesize - mod;
  }
  
 +static inline uint64_t mtd_roundup_to_eb(uint64_t sz, struct mtd_info *mtd)