[PATCH v6 2/5] ARM: boards: protonic-imx6: make use of barebox_set_serial_number()
Oleksij Rempel
o.rempel at pengutronix.de
Tue May 3 02:12:17 PDT 2022
Replace board specific serial-number fixup with common
barebox_set_serial_number().
Signed-off-by: Oleksij Rempel <o.rempel at pengutronix.de>
---
arch/arm/boards/protonic-imx6/board.c | 20 +-------------------
1 file changed, 1 insertion(+), 19 deletions(-)
diff --git a/arch/arm/boards/protonic-imx6/board.c b/arch/arm/boards/protonic-imx6/board.c
index 52cf39917a..0fadd148b4 100644
--- a/arch/arm/boards/protonic-imx6/board.c
+++ b/arch/arm/boards/protonic-imx6/board.c
@@ -196,30 +196,12 @@ static int prt_imx6_set_mac(struct prt_imx6_priv *priv,
return 0;
}
-static int prt_of_fixup_serial(struct device_node *dstroot, void *arg)
-{
- struct device_node *srcroot = arg;
- const char *ser;
- int len;
-
- ser = of_get_property(srcroot, "serial-number", &len);
- return of_set_property(dstroot, "serial-number", ser, len, 1);
-}
-
-static void prt_oftree_fixup_serial(const char *serial)
-{
- struct device_node *root = of_get_root_node();
-
- of_set_property(root, "serial-number", serial, strlen(serial) + 1, 1);
- of_register_fixup(prt_of_fixup_serial, root);
-}
-
static int prt_imx6_set_serial(struct prt_imx6_priv *priv,
struct prti6q_rfid_contents *rfid)
{
rfid->serial[9] = 0; /* Failsafe */
dev_info(priv->dev, "Serial number: %s\n", rfid->serial);
- prt_oftree_fixup_serial(rfid->serial);
+ barebox_set_serial_number(rfid->serial);
return 0;
}
--
2.30.2
More information about the barebox
mailing list