From eafd4cc4c48689250c0bf54d4721c65b714407d0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Christian=20L=C3=BCtke-Stetzkamp?= Date: Wed, 4 Apr 2018 22:15:37 +0200 Subject: [PATCH] staging: mt7621-mmc: Remove unnecessary setting of dev.platform_data MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit In the probe function, pdev->dev.platform_data is set to &msdc0_hw, but the only get access to that is also in the probe function. So that assignment is removed. The msdc0_hw structure is still available to the driver as part of the msdc_host structure. Signed-off-by: Christian Lütke-Stetzkamp Reviewed-by: NeilBrown Signed-off-by: Greg Kroah-Hartman --- drivers/staging/mt7621-mmc/sd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/mt7621-mmc/sd.c b/drivers/staging/mt7621-mmc/sd.c index 9e507cd..e8846b7 100644 --- a/drivers/staging/mt7621-mmc/sd.c +++ b/drivers/staging/mt7621-mmc/sd.c @@ -2701,7 +2701,7 @@ static int msdc_drv_probe(struct platform_device *pdev) struct msdc_hw *hw; int ret, irq; - pdev->dev.platform_data = &msdc0_hw; + hw = &msdc0_hw; if (of_property_read_bool(pdev->dev.of_node, "mtk,wp-en")) msdc0_hw.flags |= MSDC_WP_PIN_EN; @@ -2711,7 +2711,6 @@ static int msdc_drv_probe(struct platform_device *pdev) if (!mmc) return -ENOMEM; - hw = (struct msdc_hw *)pdev->dev.platform_data; irq = platform_get_irq(pdev, 0); //BUG_ON((!hw) || (!mem) || (irq < 0)); /* --- by chhung */ -- 2.7.4