Second round of Renesas ARM based SoC fixes for v3.11

* Lager board: do not annotate gpio_buttons as __initdata
  - This avoids accessing uninitialised memory if keys are pressed
    after kernel initialisation completes.
  - Bug introduced in gpio-keys were enabled in v3.11-rc1

* Bock-W board: fix SDHI0 PFC settings
  - Allow detection of SD card
  - Bug introduced in SDHI support was added in v3.11-rc1

* shdma: fixup sh_dmae_get_partial() calculation error
  - Bug introduced in 2.6.34-rc1.

* armadillo800eva board: Don't request GPIO 166 in board code
  - Allow use of touchscreen
  - Bug introduced in v3.11-rc1
ARM: shmobile: lager: do not annotate gpio_buttons as __initdata

When the gpio-keys device is registered using
platform_device_register_data() the platform data argument,
lager_keys_pdata is duplicated and thus should be marked as __initdata
to avoid wasting memory. However, this is not true of gpio_buttons,
a reference to it rather than its value is duplicated when lager_keys_pdata
is duplicated.

This avoids accessing freed memory if gpio-key events occur
after unused kernel memory is freed late in the kernel's boot.

This but was added when support for gpio-keys was added to lager
in c3842e4fcbb7664276443b79187b7808c2e80a35
("ARM: shmobile: lager: support GPIO switches") which was included
in v3.11-rc1.

Tested-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
1 file changed