From 2f2933245ea16b47d1352f7f3fdbb3a560e895c0 Mon Sep 17 00:00:00 2001 From: tangyuxin <462747508@qq.com> Date: Tue, 3 Sep 2019 16:55:10 +0800 Subject: [PATCH] =?UTF-8?q?[components][drivers][sdio]=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=20SDIO=20product=20=E4=B8=BA=E7=A9=BA=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/drivers/sdio/sdio.c | 10 ++++++++++ 1 file changed, 10 insertions(+) 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; -- GitLab