On Sun, 16 Sep 2007 12:53:27 +0200 Sylvain Munaut <[EMAIL PROTECTED]> wrote:
>
> +++ b/arch/powerpc/sysdev/bestcomm/Makefile
> @@ -0,0 +1,8 @@
> +#
> +# Makefile for BestComm & co
> +#
> +
> +bestcomm-core-objs   := bestcomm.o sram.o
> +
> +obj-$(CONFIG_PPC_BESTCOMM)           += bestcomm-core.o

Or just obj-y since the whole makefile is dependent on CONFIG_PPC_BESTCOMM.

> +++ b/arch/powerpc/sysdev/bestcomm/bestcomm.c
>
> +#include <asm/io.h>
> +#include <asm/irq.h>
> +#include <asm/prom.h>
> +#include <asm/mpc52xx.h>
> +#include <asm/of_device.h>
> +#include <asm/of_platform.h>

Please include linux/of_device.h and linux/of_platform.h instead.
And linux/of.h instead of asm/prom.h.

> +     ofn_bcom = op->node;
> +     of_node_get(ofn_bcom);

The usual idiom is ofn_bcom = of_get_node(op->node);

> +     /* Save the node */
> +     bcom_eng->ofnode = ofn_bcom;
> +
> +     /* Get, reserve & map io */
> +     if (of_address_to_resource(bcom_eng->ofnode, 0, &res_bcom)) {
                                   ^^^^^^^^^^^^^^^^
Any reason not to use ofn_bcom here?

> +     /* Error path */
> +error_unmap:
> +     iounmap(bcom_eng->regs);
> +error_release:
> +     release_mem_region(res_bcom.start, sizeof(struct mpc52xx_sdma));
> +error_sramclean:
> +     bcom_sram_cleanup();
> +error_ofput:
> +     of_node_put(bcom_eng->ofnode);
                    ^^^^^^^^^^^^^^^^
And here?  Also bcom_eng doesn't get freed in the error path.

> +++ b/arch/powerpc/sysdev/bestcomm/bestcomm_priv.h
> +#include <linux/spinlock.h>
> +#include <asm/io.h>
> +#include <asm/prom.h>

Again please include linux/of.h instead of asm/prom.h

> +++ b/arch/powerpc/sysdev/bestcomm/sram.c
> +
> +#include <asm/io.h>
> +#include <asm/mmu.h>
> +#include <asm/prom.h>

And again.

-- 
Cheers,
Stephen Rothwell                    [EMAIL PROTECTED]
http://www.canb.auug.org.au/~sfr/

Attachment: pgpWOZFPJj8EE.pgp
Description: PGP signature

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

Reply via email to