Skip to content

Commit 4b60c32

Browse files
bijudasalexandrebelloni
authored andcommitted
rtc: da9063: Use device_get_match_data()
Replace of_match_node()->device_get_match_data() for the data associated with device match. Signed-off-by: Biju Das <[email protected]> Reviewed-by: Geert Uytterhoeven <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
1 parent 8681de6 commit 4b60c32

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

drivers/rtc/rtc-da9063.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -377,22 +377,18 @@ static int da9063_rtc_probe(struct platform_device *pdev)
377377
{
378378
struct da9063_compatible_rtc *rtc;
379379
const struct da9063_compatible_rtc_regmap *config;
380-
const struct of_device_id *match;
381380
int irq_alarm;
382381
u8 data[RTC_DATA_LEN];
383382
int ret;
384383

385384
if (!pdev->dev.of_node)
386385
return -ENXIO;
387386

388-
match = of_match_node(da9063_compatible_reg_id_table,
389-
pdev->dev.of_node);
390-
391387
rtc = devm_kzalloc(&pdev->dev, sizeof(*rtc), GFP_KERNEL);
392388
if (!rtc)
393389
return -ENOMEM;
394390

395-
rtc->config = match->data;
391+
rtc->config = device_get_match_data(&pdev->dev);
396392
if (of_device_is_compatible(pdev->dev.of_node, "dlg,da9063-rtc")) {
397393
struct da9063 *chip = dev_get_drvdata(pdev->dev.parent);
398394

0 commit comments

Comments
 (0)