[PATCH 31/61] mpc8272ads: Check the board in the probe function.

Scott Wood scottwood at freescale.com
Wed Jul 18 11:35:39 EST 2007


Signed-off-by: Scott Wood <scottwood at freescale.com>
---
 arch/powerpc/boot/dts/mpc8272ads.dts     |    2 +-
 arch/powerpc/platforms/82xx/mpc8272ads.c |    7 ++-----
 2 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/arch/powerpc/boot/dts/mpc8272ads.dts b/arch/powerpc/boot/dts/mpc8272ads.dts
index 16a77f4..8c69cd0 100644
--- a/arch/powerpc/boot/dts/mpc8272ads.dts
+++ b/arch/powerpc/boot/dts/mpc8272ads.dts
@@ -11,7 +11,7 @@
 
 / {
 	model = "MPC8272ADS";
-	compatible = "MPC8260ADS";
+	compatible = "fsl,mpc8272ads";
 	#address-cells = <1>;
 	#size-cells = <1>;
 
diff --git a/arch/powerpc/platforms/82xx/mpc8272ads.c b/arch/powerpc/platforms/82xx/mpc8272ads.c
index 29c2932..fbf9c67 100644
--- a/arch/powerpc/platforms/82xx/mpc8272ads.c
+++ b/arch/powerpc/platforms/82xx/mpc8272ads.c
@@ -599,11 +599,8 @@ static void __init mpc8272ads_setup_arch(void)
  */
 static int __init mpc8272ads_probe(void)
 {
-	/* We always match for now, eventually we should look at
-	 * the flat dev tree to ensure this is the board we are
-	 * supposed to run on
-	 */
-	return 1;
+	unsigned long root = of_get_flat_dt_root();
+	return of_flat_dt_is_compatible(root, "fsl,mpc8272ads");
 }
 
 #define RMR_CSRE 0x00000001
-- 
1.5.0.3




More information about the Linuxppc-dev mailing list