Commit 96313508 authored by Li Qiang's avatar Li Qiang Committed by Miquel Raynal
Browse files

mtd: rawnand: realtek: Make rtl_ecc_engine_ops const



The rtl_ecc_engine_ops structure is only used to provide a set of
callback functions and is never modified after initialization.
Mark it as const so it can be placed in the read-only section, which
improves safety and allows better compiler optimization.

Signed-off-by: default avatarLi Qiang <liqiang01@kylinos.cn>
Signed-off-by: default avatarMiquel Raynal <miquel.raynal@bootlin.com>
parent 0d9c80aa
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -380,7 +380,7 @@ static void rtl_ecc_cleanup_ctx(struct nand_device *nand)
		nand_ecc_cleanup_req_tweaking(&ctx->req_ctx);
}

static struct nand_ecc_engine_ops rtl_ecc_engine_ops = {
static const struct nand_ecc_engine_ops rtl_ecc_engine_ops = {
	.init_ctx = rtl_ecc_init_ctx,
	.cleanup_ctx = rtl_ecc_cleanup_ctx,
	.prepare_io_req = rtl_ecc_prepare_io_req,