[PATCH 1/3] [POWERPC] FSL UPM: routines to manage FSL UPMs

Stephen Rothwell sfr at canb.auug.org.au
Sun Dec 23 13:24:57 EST 2007


On Fri, 21 Dec 2007 23:39:25 +0300 Anton Vorontsov <avorontsov at ru.mvista.com> wrote:
>
> +int fsl_upm_get_for(struct device_node *node, const char *name,
> +		    struct fsl_upm *upm)
> +{
> +	int ret;
> +	struct device_node *lbus;
> +	struct resource lbc_res;
> +	ptrdiff_t mxmr_offs;
> +
> +	lbus = of_get_parent(node);
> +	if (!lbus) {
> +		pr_err("FSL UPM: can't get parent local bus node\n");
> +		return -ENOENT;
> +	}
> +
> +	ret = of_address_to_resource(lbus, 0, &lbc_res);

of_node_put(lbus) as of_get_parent() gets a reference.

> +static inline void fsl_upm_start_pattern(struct fsl_upm *upm, u32 pat_offset)
> +{
> +	spin_lock_irqsave(&upm_lock, upm_lock_flags);

I may be wrong, but don't we need the "flags" argument to
spin_lock_irqsave to be on the stack?  And the save and restore to be in
the same function?

-- 
Cheers,
Stephen Rothwell                    sfr at canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20071223/f4bf483a/attachment.pgp>


More information about the Linuxppc-dev mailing list