@@ -4417,16 +4417,6 @@ static const struct component_master_ops wcd938x_comp_ops = {
4417
4417
.unbind = wcd938x_unbind ,
4418
4418
};
4419
4419
4420
- static int wcd938x_compare_of (struct device * dev , void * data )
4421
- {
4422
- return dev -> of_node == data ;
4423
- }
4424
-
4425
- static void wcd938x_release_of (struct device * dev , void * data )
4426
- {
4427
- of_node_put (data );
4428
- }
4429
-
4430
4420
static int wcd938x_add_slave_components (struct wcd938x_priv * wcd938x ,
4431
4421
struct device * dev ,
4432
4422
struct component_match * * matchptr )
@@ -4442,17 +4432,17 @@ static int wcd938x_add_slave_components(struct wcd938x_priv *wcd938x,
4442
4432
}
4443
4433
4444
4434
of_node_get (wcd938x -> rxnode );
4445
- component_match_add_release (dev , matchptr , wcd938x_release_of ,
4446
- wcd938x_compare_of , wcd938x -> rxnode );
4435
+ component_match_add_release (dev , matchptr , component_release_of ,
4436
+ component_compare_of , wcd938x -> rxnode );
4447
4437
4448
4438
wcd938x -> txnode = of_parse_phandle (np , "qcom,tx-device" , 0 );
4449
4439
if (!wcd938x -> txnode ) {
4450
4440
dev_err (dev , "%s: Tx-device node not defined\n" , __func__ );
4451
4441
return - ENODEV ;
4452
4442
}
4453
4443
of_node_get (wcd938x -> txnode );
4454
- component_match_add_release (dev , matchptr , wcd938x_release_of ,
4455
- wcd938x_compare_of , wcd938x -> txnode );
4444
+ component_match_add_release (dev , matchptr , component_release_of ,
4445
+ component_compare_of , wcd938x -> txnode );
4456
4446
return 0 ;
4457
4447
}
4458
4448
0 commit comments