#include <linux/spi/spi.h>
 #include <linux/spi/eeprom.h>
 #include <linux/property.h>
-#include <linux/of.h>
-#include <linux/of_device.h>
 #include <linux/math.h>
 
 /*
        int                     sr;
        u8 id[FM25_ID_LEN];
        u8 sernum[FM25_SN_LEN];
+       bool is_fram;
        int i;
-       const struct of_device_id *match;
-       bool is_fram = 0;
 
-       match = of_match_device(of_match_ptr(at25_of_match), &spi->dev);
-       if (match && !strcmp(match->compatible, "cypress,fm25"))
-               is_fram = 1;
+       err = device_property_match_string(&spi->dev, "compatible", "cypress,fm25");
+       if (err >= 0)
+               is_fram = true;
+       else
+               is_fram = false;
 
        at25 = devm_kzalloc(&spi->dev, sizeof(struct at25_data), GFP_KERNEL);
        if (!at25)