Re: [PATCH v8 2/5] nvmem: eeprom: at25: add support for FRAM

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 08. 06. 21 11:07, Greg Kroah-Hartman wrote:
+	int has_sernum;

bool?

OK.

+	spi_message_init(&m);
+	memset(t, 0, sizeof(t));

Are you allowed to send spi messages off of the stack?

I don't know, but it's functional. Copied from read function.


-	dev_info(&spi->dev, "%d %s %s eeprom%s, pagesize %u\n",
-		(chip.byte_len < 1024) ? chip.byte_len : (chip.byte_len / 1024),
-		(chip.byte_len < 1024) ? "Byte" : "KByte",
-		at25->chip.name,
-		(chip.flags & EE_READONLY) ? " (readonly)" : "",
-		at25->chip.page_size);
+	dev_info(&spi->dev, "%d %s %s %s%s, pagesize %u\n",
+		 (chip.byte_len < 1024) ? chip.byte_len : (chip.byte_len / 1024),
+		 (chip.byte_len < 1024) ? "Byte" : "KByte",
+		 at25->chip.name, is_fram ? "fram" : "eeprom",
+		 (chip.flags & EE_READONLY) ? " (readonly)" : "",
+		 at25->chip.page_size);

When drivers work properly, they should be quiet.  This whole dev_info()
should be removed in a later patch.

OK, didn't know, originally there is such info output. And keeping simplest smallest patch changes.



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux