From c830cb6fa69d9f8fe07047c9a4b9e33a3e558e36 Mon Sep 17 00:00:00 2001 From: Anton Vorontsov Date: Thu, 19 Feb 2009 19:02:23 +0300 Subject: [PATCH] --- yaml --- r: 138505 b: refs/heads/master c: c026c98739c7e435440e76cbcd96e0f8ebeeada0 h: refs/heads/master i: 138503: f4dd45b94909ee4ae2b379c8f3d6468e490ca8aa v: v3 --- [refs] | 2 +- trunk/arch/powerpc/platforms/83xx/usb.c | 3 ++- trunk/arch/powerpc/sysdev/fsl_soc.c | 4 ++++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 2521e9ff4623..0bb463fce313 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 30c404699dd650f213d480d263c775915a0e1297 +refs/heads/master: c026c98739c7e435440e76cbcd96e0f8ebeeada0 diff --git a/trunk/arch/powerpc/platforms/83xx/usb.c b/trunk/arch/powerpc/platforms/83xx/usb.c index cc99c280aad9..11e1fac17c7f 100644 --- a/trunk/arch/powerpc/platforms/83xx/usb.c +++ b/trunk/arch/powerpc/platforms/83xx/usb.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include @@ -210,7 +211,7 @@ int mpc837x_usb_cfg(void) int ret = 0; np = of_find_compatible_node(NULL, NULL, "fsl-usb2-dr"); - if (!np) + if (!np || !of_device_is_available(np)) return -ENODEV; prop = of_get_property(np, "phy_type", NULL); diff --git a/trunk/arch/powerpc/sysdev/fsl_soc.c b/trunk/arch/powerpc/sysdev/fsl_soc.c index 115cb16351fd..a01c89d3f9bd 100644 --- a/trunk/arch/powerpc/sysdev/fsl_soc.c +++ b/trunk/arch/powerpc/sysdev/fsl_soc.c @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include @@ -328,6 +329,9 @@ static int __init fsl_usb_of_init(void) struct fsl_usb2_platform_data usb_data; const unsigned char *prop = NULL; + if (!of_device_is_available(np)) + continue; + memset(&r, 0, sizeof(r)); memset(&usb_data, 0, sizeof(usb_data));