Directly get the match data with device_get_match_data().
Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
static int rockchip_mbox_probe(struct platform_device *pdev)
{
struct rockchip_mbox *mb;
- const struct of_device_id *match;
const struct rockchip_mbox_data *drv_data;
struct resource *res;
int ret, irq, i;
if (!pdev->dev.of_node)
return -ENODEV;
- match = of_match_node(rockchip_mbox_of_match, pdev->dev.of_node);
- drv_data = (const struct rockchip_mbox_data *)match->data;
+ drv_data = (const struct rockchip_mbox_data *) device_get_match_data(&pdev->dev);
mb = devm_kzalloc(&pdev->dev, sizeof(*mb), GFP_KERNEL);
if (!mb)