Skip to contentSkip to conversation

regulator: fixed: Use of_match_ptr() for of_match_table entry

PATCH Applied Axel Lin 2 participants 2 messages Jun 1, 2012 Voltage and current regulator framework

lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/1 regulator: fixed: Use of_match_ptr() for of_match_table entry

Use the new of_match_ptr() macro for the of_match_table pointer entry to avoid having to #define match NULL.

---
 drivers/regulator/fixed.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/regulator/fixed.c +1 -3
index f09fe7b..8bda365 100644
@@ -296,8 +296,6 @@ static const struct of_device_id fixed_of_match[] __devinitconst = {
 	{},
 };
 MODULE_DEVICE_TABLE(of, fixed_of_match);
-#else
-#define fixed_of_match NULL
 #endif
 
 static struct platform_driver regulator_fixed_voltage_driver = {
@@ -306,7 +304,7 @@ static struct platform_driver regulator_fixed_voltage_driver = {
 	.driver		= {
 		.name		= "reg-fixed-voltage",
 		.owner		= THIS_MODULE,
-		.of_match_table = fixed_of_match,
+		.of_match_table = of_match_ptr(fixed_of_match),
 	},
 };
 
Signature · 1 line
1.7.9.5
Applied
#1 lore raw
Quoted 2 lines · Axel Lin

Use the new of_match_ptr() macro for the of_match_table pointer entry to avoid having to #define match NULL.

Applied, thanks.