[U-Boot] [PATCH] M28: Added guarding for reserved bits in GPIO driver

Mike Frysinger vapier at gentoo.org
Tue Nov 22 22:09:18 CET 2011


On Tuesday 22 November 2011 09:41:48 Robert Deliën wrote:
> +       switch(PAD_BANK(gp)) {

needs a space after that "switch"

> +       case 0:
> +               bank_pins = MXS_BANK0_PINS;
> +               break;
> +       case 1:
> +               bank_pins = MXS_BANK1_PINS;
> +               break;
> +       case 2:
> +               bank_pins = MXS_BANK2_PINS;
> +               break;
> +       case 3:
> +               bank_pins = MXS_BANK3_PINS;
> +               break;
> +       case 4:
> +               bank_pins = MXS_BANK4_PINS;
> +               break;
> +       default:
> +               bank_pins = 0;
> +       }

static const int all_bank_pins[] = {
	MXS_BANK0_PINS,
	MXS_BANK1_PINS,
	MXS_BANK2_PINS,
	MXS_BANK3_PINS,
	MXS_BANK4_PINS,
};
bank_pins = all_bank_pins[PAD_PANK(gp)];
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20111122/9f361726/attachment.pgp>


More information about the U-Boot mailing list