9
0
Fork 0

mci: implement non-removable property

There is no need to check the card-detect status
for non-removable devices.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Lucas Stach 2014-06-03 22:34:48 +02:00 committed by Sascha Hauer
parent ec4b4a6406
commit f20e3eb414
2 changed files with 5 additions and 1 deletions

View File

@ -1572,7 +1572,8 @@ static int mci_card_probe(struct mci *mci)
struct mci_host *host = mci->host;
int i, rc, disknum, ret;
if (host->card_present && !host->card_present(host)) {
if (host->card_present && !host->card_present(host) &&
!host->non_removable) {
dev_err(&mci->dev, "no card inserted\n");
return -ENODEV;
}
@ -1839,4 +1840,6 @@ void mci_of_parse(struct mci_host *host)
host->dsr_val = dsr_val;
}
}
host->non_removable = of_property_read_bool(np, "non-removable");
}

View File

@ -302,6 +302,7 @@ struct mci_host {
unsigned max_req_size;
unsigned dsr_val; /**< optional dsr value */
int use_dsr; /**< optional dsr usage flag */
bool non_removable; /**< device is non removable */
struct regulator *supply;
/** init the host interface */