Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 54ea17a5 authored by Rafał Miłecki's avatar Rafał Miłecki Committed by Brian Norris
Browse files

mtd: spi-nor: drop jedec_probe /helper/ function



It's a one-liner doing no magic and its name may be confusing because
it does not have to use JEDEC (e.g. when using alternative read_id).

Signed-off-by: default avatarRafał Miłecki <zajec5@gmail.com>
Acked-by: default avatarHuang Shijie <shijie8@gmail.com>
Signed-off-by: default avatarBrian Norris <computersforpeace@gmail.com>
parent ab75e89c
Loading
Loading
Loading
Loading
+1 −6
Original line number Diff line number Diff line
@@ -671,11 +671,6 @@ static const struct spi_device_id *spi_nor_read_id(struct spi_nor *nor)
	return ERR_PTR(-ENODEV);
}

static const struct spi_device_id *jedec_probe(struct spi_nor *nor)
{
	return nor->read_id(nor);
}

static int spi_nor_read(struct mtd_info *mtd, loff_t from, size_t len,
			size_t *retlen, u_char *buf)
{
@@ -958,7 +953,7 @@ int spi_nor_scan(struct spi_nor *nor, const struct spi_device_id *id,
	if (info->jedec_id) {
		const struct spi_device_id *jid;

		jid = jedec_probe(nor);
		jid = nor->read_id(nor);
		if (IS_ERR(jid)) {
			return PTR_ERR(jid);
		} else if (jid != id) {