diff mbox series

[-next] watchdog: pm8916_wdt: Remove redundant of_match_ptr()

Message ID 20230811062707.2301583-1-ruanjinjie@huawei.com (mailing list archive)
State Accepted
Headers show
Series [-next] watchdog: pm8916_wdt: Remove redundant of_match_ptr() | expand

Commit Message

Jinjie Ruan Aug. 11, 2023, 6:27 a.m. UTC
The driver depends on CONFIG_OF, it is not necessary to use
of_match_ptr() here.

Signed-off-by: Ruan Jinjie <ruanjinjie@huawei.com>
---
 drivers/watchdog/pm8916_wdt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Guenter Roeck Aug. 11, 2023, 12:21 p.m. UTC | #1
On 8/10/23 23:27, Ruan Jinjie wrote:
> The driver depends on CONFIG_OF, it is not necessary to use
> of_match_ptr() here.
> 
> Signed-off-by: Ruan Jinjie <ruanjinjie@huawei.com>

Reviewed-by: Guenter Roeck <linux@roeck-us.net>

> ---
>   drivers/watchdog/pm8916_wdt.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/watchdog/pm8916_wdt.c b/drivers/watchdog/pm8916_wdt.c
> index f4bfbffaf49c..f3fcbeb0852c 100644
> --- a/drivers/watchdog/pm8916_wdt.c
> +++ b/drivers/watchdog/pm8916_wdt.c
> @@ -266,7 +266,7 @@ static struct platform_driver pm8916_wdt_driver = {
>   	.probe = pm8916_wdt_probe,
>   	.driver = {
>   		.name = "pm8916-wdt",
> -		.of_match_table = of_match_ptr(pm8916_wdt_id_table),
> +		.of_match_table = pm8916_wdt_id_table,
>   		.pm = &pm8916_wdt_pm_ops,
>   	},
>   };
diff mbox series

Patch

diff --git a/drivers/watchdog/pm8916_wdt.c b/drivers/watchdog/pm8916_wdt.c
index f4bfbffaf49c..f3fcbeb0852c 100644
--- a/drivers/watchdog/pm8916_wdt.c
+++ b/drivers/watchdog/pm8916_wdt.c
@@ -266,7 +266,7 @@  static struct platform_driver pm8916_wdt_driver = {
 	.probe = pm8916_wdt_probe,
 	.driver = {
 		.name = "pm8916-wdt",
-		.of_match_table = of_match_ptr(pm8916_wdt_id_table),
+		.of_match_table = pm8916_wdt_id_table,
 		.pm = &pm8916_wdt_pm_ops,
 	},
 };