The device field is not actually necessary. If the device is NULL, the logging won't print the device name, but the driver is actually fine.
Since the are no devices in the PBL, drop the check for the device field to be able to use the functions in spi-nor.c in the PBL. Signed-off-by: Michael Tretter <[email protected]> --- drivers/mtd/spi-nor/spi-nor.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c index 73c27df51dea..1acf124cd0cf 100644 --- a/drivers/mtd/spi-nor/spi-nor.c +++ b/drivers/mtd/spi-nor/spi-nor.c @@ -1086,8 +1086,7 @@ static int spansion_quad_enable(struct spi_nor *nor) static int spi_nor_check(struct spi_nor *nor) { - if (!nor->dev || !nor->read || !nor->write || - !nor->read_reg || !nor->write_reg) { + if (!nor->read || !nor->write || !nor->read_reg || !nor->write_reg) { pr_err("spi-nor: please fill all the necessary fields!\n"); return -EINVAL; } -- 2.47.3
