[PATCH] checkpatch: mark 'devm_rtc_device_register' deprecated

Ciprian Costea posted 1 patch 1 year, 3 months ago
scripts/checkpatch.pl | 1 +
1 file changed, 1 insertion(+)
[PATCH] checkpatch: mark 'devm_rtc_device_register' deprecated
Posted by Ciprian Costea 1 year, 3 months ago
From: Ciprian Marian Costea <ciprianmarian.costea@oss.nxp.com>

devm_rtc_device_register() is marked as deprecated in its
declaration comment [1].

Furthermore, comments [2] and [3] emphasize that devm_rtc_device_register()
is deprecated and that devm_rtc_allocate_device()
and [devm_]rtc_register_device should be used instead.

Add devm_rtc_device_register() to the list of deprecated apis.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/rtc/class.c#n455
[2] https://lore.kernel.org/lkml/20220921114624.3250848-2-linux@rasmusvillemoes.dk/
[3] https://lore.kernel.org/lkml/6659aa90-53c5-4a91-a9f9-01120c88f107@oss.nxp.com/

Signed-off-by: Ciprian Marian Costea <ciprianmarian.costea@oss.nxp.com>
---
 scripts/checkpatch.pl | 1 +
 1 file changed, 1 insertion(+)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 4427572b2477..daa1fd2d4a5b 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -848,6 +848,7 @@ our %deprecated_apis = (
 	"kunmap"				=> "kunmap_local",
 	"kmap_atomic"				=> "kmap_local_page",
 	"kunmap_atomic"				=> "kunmap_local",
+	"devm_rtc_device_register"	=> "devm_rtc_allocate_device' and 'devm_rtc_register_device",
 );
 
 #Create a search pattern for all these strings to speed up a loop below
-- 
2.45.2