mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-29 08:01:08 +00:00
mmc: Only retrieve cd pin when GPIO is enabled
The driver only needs to retrieve the pin for the ACPI info. The driver itself works without depending on GPIO. Signed-off-by: Harm Berntsen <harm.berntsen@nedap.com> CC: Simon Glass <sjg@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
e8fcb61852
commit
7b4fe6dac1
1 changed files with 4 additions and 2 deletions
|
@ -52,9 +52,11 @@ static int pci_mmc_probe(struct udevice *dev)
|
|||
|
||||
static int pci_mmc_of_to_plat(struct udevice *dev)
|
||||
{
|
||||
struct pci_mmc_priv *priv = dev_get_priv(dev);
|
||||
if (CONFIG_IS_ENABLED(DM_GPIO)) {
|
||||
struct pci_mmc_priv *priv = dev_get_priv(dev);
|
||||
|
||||
gpio_request_by_name(dev, "cd-gpios", 0, &priv->cd_gpio, GPIOD_IS_IN);
|
||||
gpio_request_by_name(dev, "cd-gpios", 0, &priv->cd_gpio, GPIOD_IS_IN);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue