Re: [RFC v2 3/8] ci13xxx_udc: rename register layouts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

On Wed, 11 Apr 2012 12:54:41 +0300, Felipe Balbi <balbi@xxxxxx> wrote:
> why do you need separate functions to read capability or operational
> registers ? They look the same. You could just define them a little
> differently:
> static u32 hw_read(void *base, u32 offset, u32 mask)
> {
> 	return ioread32(base + offset) & mask;
> }
> then, when calling it you can use:
> hw_read(hw_bank.op, ADDRESS, mask);
> hw_read(hw_bank.cap, ADDRESS, mask);

That's what I've done in the "redo register access" patch. The reason I
didn't do this here is that I wanted to change one thing at a time. It
might make sense to squash these patches together, too.

To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at

B and H Foto and Electronics Corp.

[Linux Media]     [Video for Linux]     [Linux Input]     [Linux Audio Users]     [Photo]     [Yosemite News]    [Yosemite Photos]    [Free Online Dating]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]     [More Archives]

Add to Google Powered by Linux