From: Olof Johansson <olof@lixom•net>
To: Stephen Rothwell <sfr@canb•auug.org.au>
Cc: linuxppc-dev@ozlabs•org, Roel Kluin <12o3l@tiscali•nl>
Subject: Re: [PATCH] pasemi: clean up gpio_mdio init
Date: Sun, 4 Nov 2007 19:10:45 -0600 [thread overview]
Message-ID: <20071105011045.GA14077@lixom.net> (raw)
In-Reply-To: <20071105112307.13d4b8bb.sfr@canb.auug.org.au>
Hi,
On Mon, Nov 05, 2007 at 11:23:07AM +1100, Stephen Rothwell wrote:
> Just a couple of small things ...
Thanks! Unless someone finds something bigger, I'll update this before
I push it out through git, but I won't repost.
> On Sun, 4 Nov 2007 15:37:09 -0600 Olof Johansson <olof@lixom•net> wrote:
> >
> > + ip = of_get_property(phy_dn, "interrupts", NULL);
> > + regp = of_get_property(phy_dn, "reg", NULL);
> > + if (!ip || !regp)
> > + continue;
> > + new_bus->irq[*regp] = irq_create_mapping(NULL, *ip);
>
> Paranoid me says to check that *regp is in range.
Yeah, good point.
>
> > int gpio_mdio_init(void)
> > {
> > + struct device_node *np;
> > +
> > + np = of_find_compatible_node(NULL, "gpio", "1682m-gpio");
> > + if (!np)
> > + return -ENODEV;
> > + gpio_regs = of_iomap(np, 0);
>
> of_node_put(np); ?
Yup.
Thanks for the review,
-Olof
prev parent reply other threads:[~2007-11-05 1:01 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-04 16:53 [PATCH] Balance alloc/free and ioremap/iounmap in gpio_mdio_probe (powerpc/platforms/pasemi/gpio_mdio.c) Roel Kluin
2007-11-04 17:18 ` Nathan Lynch
2007-11-04 17:44 ` Roel Kluin
2007-11-04 17:47 ` Olof Johansson
2007-11-04 17:46 ` Roel Kluin
2007-11-04 21:37 ` [PATCH] pasemi: clean up gpio_mdio init Olof Johansson
2007-11-05 0:23 ` Stephen Rothwell
2007-11-05 1:10 ` Olof Johansson [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20071105011045.GA14077@lixom.net \
--to=olof@lixom$(echo .)net \
--cc=12o3l@tiscali$(echo .)nl \
--cc=linuxppc-dev@ozlabs$(echo .)org \
--cc=sfr@canb$(echo .)auug.org.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox