Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

mtd: Avoid magic values

Nvmem producer config ID "-1" is actually defined, so use the definition
rather than hardcoding it with a magic value.

Suggested-by: Michael Walle <michael@walle.cc>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Michael Walle <michael@walle.cc>
Link: https://lore.kernel.org/linux-mtd/20230307192536.470997-1-miquel.raynal@bootlin.com

+1 -1
+1 -1
drivers/mtd/mtdcore.c
··· 519 519 struct device_node *node = mtd_get_of_node(mtd); 520 520 struct nvmem_config config = {}; 521 521 522 - config.id = -1; 522 + config.id = NVMEM_DEVID_NONE; 523 523 config.dev = &mtd->dev; 524 524 config.name = dev_name(&mtd->dev); 525 525 config.owner = THIS_MODULE;