Re: [PATCH] cw1200: fix some obvious mistakes

From: Solomon Peachy
Date: Sun Jun 02 2013 - 09:28:04 EST

On Sun, Jun 02, 2013 at 08:29:54AM -0400, Solomon Peachy wrote:
> > * Add comments about passing GPIO numbers in platform_data:
> > You should not use IORESOURCE_IO, which is for legacy ISA
> > I/O ports on PCs, not for GPIOs.
> Fair enough. The use of resources was something already in the driver
> when I inherited it, but I've seen this pattern a lot elsewhere. Is
> there a specific driver I should reference instead?

Reading linux/ioport.h I don't see a type that seems to be a better fit.
It's not MEM, REG, IRQ, DMA, or BUS. IO seems to be the only type that

The reason the driver uses struct resources instead of straight-up
numeric GPIO fields is for the 'name' field in the resources.

Given that the use of platform_data pretty much makes it impossible to
have more than one of these devices in a system at a time, there doesn't
seem to be a point to using named resources.

So I'll change these resource lists to using straight-up ints.

- Solomon
Solomon Peachy pizza at shaftnet dot org
Delray Beach, FL ^^ (email/xmpp) ^^
Quidquid latine dictum sit, altum viditur.

Attachment: pgp00000.pgp
Description: PGP signature