[PATCH 1/1 v2] driver:mtd:spi-nor:fix spi_nor_scan overwrite platform ID point

bpqw bpqw at micron.com
Thu Oct 16 01:41:54 PDT 2014


>I really wasn't looking into details yet and I'm aware my patch does something else. I just say we should first fix the regression and then base next patches on top of that regression fix. I'm not NACKing your changes :)

I will take into account for your patch,and will cover all these isse in my next version patch.

By the way ,I still don't understand why you specify id NULL in you patch:

+	if (id) {
+		info = (void *)id->driver_data;
+		if (info->jedec_id) {
+			dev_warn(dev,
+				 "passed SPI device ID (%s) contains JEDEC, ignoring it, driver should be fixed!\n",
+				 id->name);
+			id = NULL;
 		}
 	}
 
+	if (!id) {
+		id = nor->read_id(nor);
+		if (IS_ERR(id))
+			return PTR_ERR(id);
+	}
+	info = (void *)id->driver_data;
+


More information about the linux-mtd mailing list