diff for duplicates of <20200916124418.833-4-p.yadav@ti.com> diff --git a/a/1.txt b/N1/1.txt index 8b13789..71ac5f9 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -1 +1,36 @@ +It is a thin wrapper around nor->controller_ops->erase(). In a future +commit DTR support will be added. These ops can not be supported by the +erase() hook and this helper will make it easier to reject those calls. +Signed-off-by: Pratyush Yadav <p.yadav@ti.com> +--- + drivers/mtd/spi-nor/core.c | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/drivers/mtd/spi-nor/core.c b/drivers/mtd/spi-nor/core.c +index cbfc4c2df79d..7009cb702e22 100644 +--- a/drivers/mtd/spi-nor/core.c ++++ b/drivers/mtd/spi-nor/core.c +@@ -94,6 +94,11 @@ static int spi_nor_write_reg(struct spi_nor *nor, u8 opcode, const u8 *buf, + return nor->controller_ops->write_reg(nor, opcode, buf, len); + } + ++static int spi_nor_controller_ops_erase(struct spi_nor *nor, loff_t offs) ++{ ++ return nor->controller_ops->erase(nor, offs); ++} ++ + /** + * spi_nor_spimem_read_data() - read data from flash's memory region via + * spi-mem +@@ -1145,7 +1150,7 @@ static int spi_nor_erase_sector(struct spi_nor *nor, u32 addr) + + return spi_mem_exec_op(nor->spimem, &op); + } else if (nor->controller_ops->erase) { +- return nor->controller_ops->erase(nor, addr); ++ return spi_nor_controller_ops_erase(nor, addr); + } + + /* +-- +2.28.0 diff --git a/a/content_digest b/N1/content_digest index d63af56..a3c0e2c 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -13,5 +13,41 @@ " Boris Brezillon <boris.brezillon@collabora.com>\0" "\00:1\0" "b\0" + "It is a thin wrapper around nor->controller_ops->erase(). In a future\n" + "commit DTR support will be added. These ops can not be supported by the\n" + "erase() hook and this helper will make it easier to reject those calls.\n" + "\n" + "Signed-off-by: Pratyush Yadav <p.yadav@ti.com>\n" + "---\n" + " drivers/mtd/spi-nor/core.c | 7 ++++++-\n" + " 1 file changed, 6 insertions(+), 1 deletion(-)\n" + "\n" + "diff --git a/drivers/mtd/spi-nor/core.c b/drivers/mtd/spi-nor/core.c\n" + "index cbfc4c2df79d..7009cb702e22 100644\n" + "--- a/drivers/mtd/spi-nor/core.c\n" + "+++ b/drivers/mtd/spi-nor/core.c\n" + "@@ -94,6 +94,11 @@ static int spi_nor_write_reg(struct spi_nor *nor, u8 opcode, const u8 *buf,\n" + " \treturn nor->controller_ops->write_reg(nor, opcode, buf, len);\n" + " }\n" + " \n" + "+static int spi_nor_controller_ops_erase(struct spi_nor *nor, loff_t offs)\n" + "+{\n" + "+\treturn nor->controller_ops->erase(nor, offs);\n" + "+}\n" + "+\n" + " /**\n" + " * spi_nor_spimem_read_data() - read data from flash's memory region via\n" + " * spi-mem\n" + "@@ -1145,7 +1150,7 @@ static int spi_nor_erase_sector(struct spi_nor *nor, u32 addr)\n" + " \n" + " \t\treturn spi_mem_exec_op(nor->spimem, &op);\n" + " \t} else if (nor->controller_ops->erase) {\n" + "-\t\treturn nor->controller_ops->erase(nor, addr);\n" + "+\t\treturn spi_nor_controller_ops_erase(nor, addr);\n" + " \t}\n" + " \n" + " \t/*\n" + "-- \n" + 2.28.0 -768b4496145d224bda2905519f0e3c1fe91ce50fb99c2c4568c96793b906c456 +3d087a44540572734a2a50f1b9d926d9fc09a61fc2e23612917785d285470553
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox