From 3c38a2fe6ff7b614ef8ff307a931285a62972ca4 Mon Sep 17 00:00:00 2001 From: Jon Hunter Date: Mon, 17 Oct 2022 19:55:42 +0100 Subject: [PATCH] pwm: tachometer: Fix build for Linux v6.1 Upstream Linux kernel commit b88c48bfdd85 ("pwm: core: Get rid of unused devm_of_pwm_get()") has removed the function devm_of_pwm_get() which breaks building the Tegra PWM tachometer driver with Linux v6.1-rc1. Fix this by updating the driver to use the function devm_fwnode_pwm_get() instead. Bug 3831575 Change-Id: I89def599312baa4d3b6b25b1275835233e942af0 Signed-off-by: Jon Hunter Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2793510 Reviewed-by: Laxman Dewangan GVS: Gerrit_Virtual_Submit --- drivers/hwmon/generic-pwm-tachometer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwmon/generic-pwm-tachometer.c b/drivers/hwmon/generic-pwm-tachometer.c index b183502e..92650ff6 100644 --- a/drivers/hwmon/generic-pwm-tachometer.c +++ b/drivers/hwmon/generic-pwm-tachometer.c @@ -55,7 +55,7 @@ static int pwm_tach_probe(struct platform_device *pdev) platform_set_drvdata(pdev, ptt); dev_set_drvdata(&pdev->dev, ptt); - ptt->pwm = devm_of_pwm_get(&pdev->dev, pdev->dev.of_node, NULL); + ptt->pwm = devm_fwnode_pwm_get(&pdev->dev, &pdev->dev.of_node->fwnode, NULL); if (IS_ERR(ptt->pwm)) { if (PTR_ERR(ptt->pwm) != -EPROBE_DEFER) { dev_err(&pdev->dev, "Failed to get pwm: %ld\n",