Trivial cleanup in ocp_uart.c
David Gibson
david at gibson.dropbear.id.au
Fri Jun 21 10:52:16 EST 2002
On Thu, Jun 20, 2002 at 08:50:26AM -0700, Tom Rini wrote:
>
> On Thu, Jun 20, 2002 at 05:34:40PM +1000, David Gibson wrote:
>
> > ocp_uart.c allocates private space with ocp_alloc_dev, but never uses
> > it.
>
> Er... So you pass 0 to ocp_alloc_dev() ? Which will allocate
> (sizeof(*ocp_dev) + 0 + 31), so we don't actually break out of this
> loop which I take it was your intent.
No that wasn't my intent. It's just that we never use the private
space, so there's no point allocating it. Passing zero is the best we
can do for now (and it's what every other ocp driver except i2c does
now). Actually I'd like drivers to include struct ocp_dev as part of
their own internal private structures rather than the other way around
(i.e. I think the ocpdev field should go away entirely).
I2C needs some rearranging to do this though (rearranging which will
also let the vaddr field be removed).
> And I think it can be used, once it gets registered to the ocp_list (and
> something later accesses it).
*Nothing* scans the ocp_list (well, except ocp_register() and
ocp_unregister()). This is why I think ocp_register() is a pointless
interface.
--
David Gibson | For every complex problem there is a
david at gibson.dropbear.id.au | solution which is simple, neat and
| wrong. -- H.L. Mencken
http://www.ozlabs.org/people/dgibson
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
More information about the Linuxppc-embedded
mailing list