Hi,

On Wed, Jan 30, 2008 at 11:08:57AM -0600, Kim Phillips wrote:
> diff --git a/arch/powerpc/platforms/83xx/usb.c 
> b/arch/powerpc/platforms/83xx/usb.c
> index 681230a..14c83f1 100644
> --- a/arch/powerpc/platforms/83xx/usb.c
> +++ b/arch/powerpc/platforms/83xx/usb.c
> @@ -124,10 +124,14 @@ int mpc831x_usb_cfg(void)
>       }
>  
>       /* Configure clock */
> -     temp = in_be32(immap + MPC83XX_SCCR_OFFS);
> -     temp &= ~MPC83XX_SCCR_USB_MASK;
> -     temp |= MPC83XX_SCCR_USB_DRCM_11;  /* 1:3 */
> -     out_be32(immap + MPC83XX_SCCR_OFFS, temp);
> +     if (of_find_compatible_node(NULL, NULL, "fsl,mpc8315-usb2-dr"))
> +             clrsetbits_be32(immap + MPC83XX_SCCR_OFFS,
> +                             MPC8315_SCCR_USB_MASK,
> +                             MPC8315_SCCR_USB_DRCM_11);

You need an of_node_put here.

Also, it's weird to check for the global presence of a compatible
device. You already have the device node pointer in the function, why
don't you just check to see if that device is compatible instead?


-Olof

_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev

Reply via email to