]> git.baikalelectronics.ru Git - kernel.git/commit
mtd: spi-nor: slightly refactor the spi_nor_setup()
authorMichael Walle <michael@walle.cc>
Wed, 23 Feb 2022 13:43:43 +0000 (14:43 +0100)
committerTudor Ambarus <tudor.ambarus@microchip.com>
Fri, 25 Feb 2022 16:11:11 +0000 (18:11 +0200)
commit95b56b03cf7fb02b0a22c2ec50389a069f197b75
treedf572df415ec51ef261728181958118770d09266
parent575b5ced94da23451c3e5ada4e2b9e02b42ed3b2
mtd: spi-nor: slightly refactor the spi_nor_setup()

Instead of always using a function pointer (and initializing it to our
default), just call the default function if the flash didn't set its own
one. That will make the call flow easier to follow.

Also mark the parameter as optional now.

Signed-off-by: Michael Walle <michael@walle.cc>
Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Reviewed-by: Pratyush Yadav <p.yadav@ti.com>
Link: https://lore.kernel.org/r/20220223134358.1914798-18-michael@walle.cc
drivers/mtd/spi-nor/core.c
drivers/mtd/spi-nor/core.h