Skip to content
Commit 38a8dda9 authored by Daniel Mack's avatar Daniel Mack Committed by Ulf Hansson
Browse files

mmc: pxamci: make GPIO lookups from pdata optional



A recent commit introduced a call to mmc_of_parse() and removed the
explicit assignment of GPIOs in the pdata structure. This will leave
them set to 0, which is a valid GPIO per se, so the code that looks
at these members will try to allocate them and fail.

To fix this properly, make the following changes:

a) Refrain from allocating and assiging a pdata struct from
   pxamci_of_init(). It's a hack to do it this way anyway.
   Instead, move the only remaining member of interest in
   'struct pxamci_host' and assign the value from either
   the passed in pdata pointer or with the value read from DT.

b) Let the only user of 'detect_delay_ms' look at the member of
   'struct pxamci_host', not the pdata.

c) Make more code in pxamci_probe() dependent on the presence of
   actual pdata.

This will also ease the removal of pdata one day.

Signed-off-by: default avatarDaniel Mack <daniel@zonque.org>
Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent 61951fd6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment