From bd9e32efdd8f06063c9ee37dd6d0bebf535b86c1 Mon Sep 17 00:00:00 2001 From: Furquan Shaikh Date: Mon, 15 May 2017 23:28:41 -0700 Subject: drivers/spi/spi_flash: Pass in spi_slave structure as const to probe functions Pointer to spi_slave structure can be passed in as const to spi flash probe functions since the probe functions do not need to modify the slave properties. BUG=b:38330715 Change-Id: I956ee777c62dbb811fd6ce2aeb6ae090e1892acd Signed-off-by: Furquan Shaikh Reviewed-on: https://review.coreboot.org/19707 Reviewed-by: Aaron Durbin Tested-by: build bot (Jenkins) --- src/soc/intel/common/block/fast_spi/fast_spi_flash.c | 2 +- src/soc/mediatek/mt8173/flash_controller.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/soc') diff --git a/src/soc/intel/common/block/fast_spi/fast_spi_flash.c b/src/soc/intel/common/block/fast_spi/fast_spi_flash.c index 9f973b91ef..77801445be 100644 --- a/src/soc/intel/common/block/fast_spi/fast_spi_flash.c +++ b/src/soc/intel/common/block/fast_spi/fast_spi_flash.c @@ -280,7 +280,7 @@ static int fast_spi_flash_status(const struct spi_flash *flash, * The size of the flash component is always taken from density field in the * SFDP table. FLCOMP.C0DEN is no longer used by the Flash Controller. */ -int spi_flash_programmer_probe(struct spi_slave *dev, +int spi_flash_programmer_probe(const struct spi_slave *dev, int force, struct spi_flash *flash) { BOILERPLATE_CREATE_CTX(ctx); diff --git a/src/soc/mediatek/mt8173/flash_controller.c b/src/soc/mediatek/mt8173/flash_controller.c index 29a1c2f9a7..ee950b8f81 100644 --- a/src/soc/mediatek/mt8173/flash_controller.c +++ b/src/soc/mediatek/mt8173/flash_controller.c @@ -228,7 +228,7 @@ static int nor_erase(const struct spi_flash *flash, u32 offset, size_t len) return 0; } -int spi_flash_programmer_probe(struct spi_slave *spi, +int spi_flash_programmer_probe(const struct spi_slave *spi, int force, struct spi_flash *flash) { static int done; -- cgit v1.2.3