diff options
| author | tangyuxin <[email protected]> | 2019-09-03 16:55:10 +0800 |
|---|---|---|
| committer | tangyuxin <[email protected]> | 2019-09-03 16:55:10 +0800 |
| commit | 2f2933245ea16b47d1352f7f3fdbb3a560e895c0 (patch) | |
| tree | e15dc98dcda035ae4869045f1ae7e8f96ff2eb9e | |
| parent | 53e0a69608489a1cb5bd3b46e36a10327d79bec2 (diff) | |
[components][drivers][sdio]修复 SDIO product 为空的问题
| -rw-r--r-- | components/drivers/sdio/sdio.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/components/drivers/sdio/sdio.c b/components/drivers/sdio/sdio.c index f31f5b81a8..65bf87b895 100644 --- a/components/drivers/sdio/sdio.c +++ b/components/drivers/sdio/sdio.c @@ -709,6 +709,16 @@ static rt_int32_t sdio_initialize_function(struct rt_mmcsd_card *card, if (ret) goto err1; + /* + * product/manufacturer id is optional for function CIS, so + * copy it from the card structure as needed. + */ + if (func->product == 0) + { + func->manufacturer = card->cis.manufacturer; + func->product = card->cis.product; + } + card->sdio_function[func_num] = func; return 0; |
