Commit 0eb468b6 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Greg Kroah-Hartman

eeprom: at25: Convert to use fwnode_device_is_compatible()

Replace open coded fwnode_device_is_compatible() in the driver.
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20230119175742.77723-1-andriy.shevchenko@linux.intel.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 863cf332
......@@ -437,12 +437,6 @@ static int at25_probe(struct spi_device *spi)
struct spi_eeprom *pdata;
bool is_fram;
err = device_property_match_string(&spi->dev, "compatible", "cypress,fm25");
if (err >= 0)
is_fram = true;
else
is_fram = false;
/*
* Ping the chip ... the status register is pretty portable,
* unlike probing manufacturer IDs. We do expect that system
......@@ -462,6 +456,8 @@ static int at25_probe(struct spi_device *spi)
at25->spi = spi;
spi_set_drvdata(spi, at25);
is_fram = fwnode_device_is_compatible(dev_fwnode(&spi->dev), "cypress,fm25");
/* Chip description */
pdata = dev_get_platdata(&spi->dev);
if (pdata) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment