Skip to content

Commit

Permalink
mmc: dw_mmc-bluefield: simplify the probe() function
Browse files Browse the repository at this point in the history
This commit removes the unnecessary of-node check since the
dw_mci_bluefield_match[] structure has only one entry.

Signed-off-by: Liming Sun <lsun@mellanox.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
  • Loading branch information
lsun100 authored and storulf committed Dec 17, 2018
1 parent 7566ec3 commit 3df407b
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions drivers/mmc/host/dw_mmc-bluefield.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,7 @@ MODULE_DEVICE_TABLE(of, dw_mci_bluefield_match);

static int dw_mci_bluefield_probe(struct platform_device *pdev)
{
const struct dw_mci_drv_data *drv_data = NULL;
const struct of_device_id *match;

if (pdev->dev.of_node) {
match = of_match_node(dw_mci_bluefield_match,
pdev->dev.of_node);
drv_data = match->data;
}

return dw_mci_pltfm_register(pdev, drv_data);
return dw_mci_pltfm_register(pdev, &bluefield_drv_data);
}

static struct platform_driver dw_mci_bluefield_pltfm_driver = {
Expand Down

0 comments on commit 3df407b

Please sign in to comment.