Skip to content

Commit 5d59b6a

Browse files
robherringsuperna9999
authored andcommitted
firmware: meson: Use device_get_match_data()
Use preferred device_get_match_data() instead of of_match_device() to get the driver match data. With this, adjust the includes to explicitly include the correct headers. Signed-off-by: Rob Herring <robh@kernel.org> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://lore.kernel.org/r/20231006224644.445295-1-robh@kernel.org Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
1 parent 0d423c4 commit 5d59b6a

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

drivers/firmware/meson/meson_sm.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@
1313
#include <linux/io.h>
1414
#include <linux/module.h>
1515
#include <linux/of.h>
16-
#include <linux/of_device.h>
16+
#include <linux/of_platform.h>
1717
#include <linux/platform_device.h>
1818
#include <linux/printk.h>
19+
#include <linux/property.h>
1920
#include <linux/types.h>
2021
#include <linux/sizes.h>
2122
#include <linux/slab.h>
@@ -297,7 +298,7 @@ static int __init meson_sm_probe(struct platform_device *pdev)
297298
if (!fw)
298299
return -ENOMEM;
299300

300-
chip = of_match_device(meson_sm_ids, dev)->data;
301+
chip = device_get_match_data(dev);
301302
if (!chip)
302303
return -EINVAL;
303304

0 commit comments

Comments
 (0)