[PATCH 13/14] of: partition: Register the of partition fixup for of partition users

Sascha Hauer s.hauer at pengutronix.de
Thu Mar 30 22:33:22 PDT 2017


at24, at25 and mci core are using of_parse_partitions(). Register the
fixup for them aswell.

Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
 drivers/eeprom/at24.c  | 1 +
 drivers/eeprom/at25.c  | 2 ++
 drivers/mci/mci-core.c | 4 +++-
 3 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/eeprom/at24.c b/drivers/eeprom/at24.c
index 4ae3776554..1227286fbe 100644
--- a/drivers/eeprom/at24.c
+++ b/drivers/eeprom/at24.c
@@ -500,6 +500,7 @@ static int at24_probe(struct device_d *dev)
 		goto err_devfs_create;
 
 	of_parse_partitions(&at24->cdev, dev->device_node);
+	of_partitions_register_fixup(&at24->cdev);
 
 	return 0;
 
diff --git a/drivers/eeprom/at25.c b/drivers/eeprom/at25.c
index f7f8368c4b..1caaebd371 100644
--- a/drivers/eeprom/at25.c
+++ b/drivers/eeprom/at25.c
@@ -360,6 +360,8 @@ static int at25_probe(struct device_d *dev)
 
 	dev_dbg(dev, "%s probed\n", at25->cdev.name);
 	of_parse_partitions(&at25->cdev, dev->device_node);
+	of_partitions_register_fixup(&at25->cdev);
+
 	return 0;
 
 fail:
diff --git a/drivers/mci/mci-core.c b/drivers/mci/mci-core.c
index 055a5e2b06..6ad0f48ec3 100644
--- a/drivers/mci/mci-core.c
+++ b/drivers/mci/mci-core.c
@@ -1621,8 +1621,10 @@ static int mci_register_partition(struct mci_part *part)
 		rc = 0; /* it's not a failure */
 	}
 
-	if (np)
+	if (np) {
 		of_parse_partitions(&part->blk.cdev, np);
+		of_partitions_register_fixup(&part->blk.cdev);
+	}
 
 	return 0;
 }
-- 
2.11.0




More information about the barebox mailing list