* [PATCH] spi: store names in struct spi_device_id as pointers
@ 2020-12-11 9:58 Sascha Hauer
0 siblings, 0 replies; only message in thread
From: Sascha Hauer @ 2020-12-11 9:58 UTC (permalink / raw)
To: Barebox List
Instead of putting an array for the names into struct spi_device_id
use pointers. This saves around 3000 bytes of binary space in a ARM32
barebox build.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
include/linux/mod_devicetable.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h
index 1fbb3dc5c1..2c04454260 100644
--- a/include/linux/mod_devicetable.h
+++ b/include/linux/mod_devicetable.h
@@ -21,7 +21,7 @@ struct pci_device_id {
#define SPI_NAME_SIZE 32
struct spi_device_id {
- char name[SPI_NAME_SIZE];
+ const char *name;
unsigned long driver_data;
};
--
2.20.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-12-11 9:58 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-11 9:58 [PATCH] spi: store names in struct spi_device_id as pointers Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox